3 Commits
1.8.2 ... 1.8.6

Author SHA1 Message Date
a7fd9e4fa9 添加3个升降桌 2025-03-06 19:16:21 +08:00
5af6a039c2 x马达扫描速度接受小数 2025-02-27 14:18:02 +08:00
b779118d72 1、记录x马达位置用于拼接影像;
2、修复了航线读写错误问题;
2025-02-27 11:18:26 +08:00
13 changed files with 189 additions and 31 deletions

View File

@ -178,7 +178,8 @@ HPPA::HPPA(QWidget *parent)
connect(this->ui.ymotor_backward_btn, SIGNAL(released()), this, SLOT(onyMotorStop())); connect(this->ui.ymotor_backward_btn, SIGNAL(released()), this, SLOT(onyMotorStop()));
//<2F>ٶ<EFBFBD> //<2F>ٶ<EFBFBD>
QRegExp rx("\\d{0,3}[1-9]$"); //QRegExp rx("\\d{0,3}.[1-9]$");
QRegExp rx("^\\d+(\\.\\d+)?$");
ui.xmotor_speed_lineEdit->setValidator(new QRegExpValidator(rx)); ui.xmotor_speed_lineEdit->setValidator(new QRegExpValidator(rx));
//<2F><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD> //<2F><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
@ -417,7 +418,6 @@ void HPPA::onStartRecordStep1()
return; return;
} }
//<2F><>ʼ<EFBFBD>ɼ<EFBFBD> //<2F><>ʼ<EFBFBD>ɼ<EFBFBD>
m_RecordState += 1; m_RecordState += 1;
@ -454,10 +454,15 @@ void HPPA::onStartRecordStep1()
//ɾ<><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>tab //ɾ<><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>tab
ui.ImageViewerTabWidget->clear(); ui.ImageViewerTabWidget->clear();
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼x<C2BC><78><EFBFBD><EFBFBD>λ<EFBFBD>õ<EFBFBD><C3B5>ļ<EFBFBD>
string x_location = directory + "\\" + m_FilenameLineEdit->text().toStdString() + "x_location.pos";
m_hTimesFile = fopen(x_location.c_str(), "w+");
//<2F><>ʼѭ<CABC><D1AD> //<2F><>ʼѭ<CABC><D1AD>
m_ForLoopControl->setLoopCount(m_pathPlan->getRecordLineTableWidget()->rowCount());//Ϊѭ<CEAA><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߳<EFBFBD><DFB3><EFBFBD><EFBFBD><EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> m_ForLoopControl->setLoopCount(m_pathPlan->getRecordLineTableWidget()->rowCount());//Ϊѭ<CEAA><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߳<EFBFBD><DFB3><EFBFBD><EFBFBD><EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
emit StartLoopSignal(); emit StartLoopSignal();
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>ɫ //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>ɫ
for (size_t i = 0; i < m_pathPlan->getRecordLineTableWidget()->rowCount(); i++) for (size_t i = 0; i < m_pathPlan->getRecordLineTableWidget()->rowCount(); i++)
{ {
@ -521,6 +526,8 @@ void HPPA::onStartRecordStep2(int lineNumber)
m_yMotor->SettingSpeed(m_lManualSpeedOfYMotor); m_yMotor->SettingSpeed(m_lManualSpeedOfYMotor);
m_yMotor->MoveToLocation(ymotorPositionOfLine1); m_yMotor->MoveToLocation(ymotorPositionOfLine1);
m_timerYmotorLocationFeedBackAfterRecord->start(500); m_timerYmotorLocationFeedBackAfterRecord->start(500);
fclose(m_hTimesFile);
} }
else if (lineNumber == -2) else if (lineNumber == -2)
{ {
@ -529,6 +536,7 @@ void HPPA::onStartRecordStep2(int lineNumber)
//ֹͣy<D6B9><79><EFBFBD><EFBFBD><EFBFBD>˶<EFBFBD> //ֹͣy<D6B9><79><EFBFBD><EFBFBD><EFBFBD>˶<EFBFBD>
m_yMotor->StopMotormove(); m_yMotor->StopMotormove();
fclose(m_hTimesFile);
} }
} }
@ -1258,6 +1266,10 @@ void HPPA::ontimerMoveXmotor()
} }
ByteBack MotorState = m_xMotor->GetState(); ByteBack MotorState = m_xMotor->GetState();
//<2F><>ȡϵͳʱ<CDB3><CAB1><EFBFBD><EFBFBD>x<EFBFBD><78><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD>ã<EFBFBD><C3A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
long long timeOs = getNanosecondsSinceMidnight();
BroadcastXMotorPosSignal(timeOs, MotorState.Location);
fprintf(m_hTimesFile, "%lld,%d\n", timeOs, MotorState.Location);
//<2F><>x<EFBFBD><78><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD>slider<65><72> //<2F><>x<EFBFBD><78><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD>slider<65><72>
if (MotorState.Speed != 0) if (MotorState.Speed != 0)
@ -1271,8 +1283,7 @@ void HPPA::ontimerMoveXmotor()
} }
//<2F>ɼ<EFBFBD><C9BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>x<EFBFBD><78><EFBFBD><EFBFBD>س<EFBFBD>ʼλ<CABC>ã<EFBFBD><C3A3><EFBFBD>ʼ<EFBFBD>ɼ<EFBFBD>ǰ<EFBFBD><C7B0>¼<EFBFBD><C2BC>λ<EFBFBD>ã<EFBFBD>m_lXmotorLocationOfStartRecord<72><64> //<2F>ɼ<EFBFBD><C9BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>x<EFBFBD><78><EFBFBD><EFBFBD>س<EFBFBD>ʼλ<CABC>ã<EFBFBD><C3A3><EFBFBD>ʼ<EFBFBD>ɼ<EFBFBD>ǰ<EFBFBD><C7B0>¼<EFBFBD><C2BC>λ<EFBFBD>ã<EFBFBD>m_lXmotorLocationOfStartRecord<72><64>
if (MotorState.Speed == 0 && MotorState.Location != m_lXmotorLocationOfStartRecord //x<><78><EFBFBD><EFBFBD>λ<EFBFBD>ô<EFBFBD><C3B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD>ӽ<EFBFBD><D3BD><EFBFBD><EFBFBD>أ<EFBFBD><D8A3><EFBFBD>֡<EFBFBD><D6A1>û<EFBFBD>вɼ<D0B2><C9BC><EFBFBD> if (MotorState.Speed == 0 && MotorState.Location != m_lXmotorLocationOfStartRecord)//x<><78><EFBFBD><EFBFBD>λ<EFBFBD>ô<EFBFBD><C3B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD>ӽ<EFBFBD><D3BD><EFBFBD><EFBFBD>أ<EFBFBD><D8A3><EFBFBD>֡<EFBFBD><D6A1>û<EFBFBD>вɼ<D0B2><C9BC><EFBFBD>
|| !m_Imager->getRecordControlState())//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֹͣ<CDA3>ɼ<EFBFBD><C9BC><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϻص<CFBB><D8B5><EFBFBD>ʼλ<CABC>ã<EFBFBD><C3A3><EFBFBD>1<EFBFBD><31><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֹͣ<CDA3>ɼ<EFBFBD><C9BC><EFBFBD><EFBFBD><EFBFBD>2<EFBFBD><32>֡<EFBFBD><D6A1><EFBFBD>ɼ<EFBFBD><C9BC><EFBFBD><EFBFBD>ˣ<EFBFBD><CBA3><EFBFBD><EFBFBD><EFBFBD><EFBBB9><EFBFBD>˶<EFBFBD>
{ {
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֹͣ<CDA3>ɼ<EFBFBD> //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֹͣ<CDA3>ɼ<EFBFBD>
m_Imager->setRecordControlState(false); m_Imager->setRecordControlState(false);
@ -1280,7 +1291,21 @@ void HPPA::ontimerMoveXmotor()
//x<><78><EFBFBD><EFBFBD>زɼ<D8B2>ǰ<EFBFBD><C7B0>λ<EFBFBD><CEBB> //x<><78><EFBFBD><EFBFBD>زɼ<D8B2>ǰ<EFBFBD><C7B0>λ<EFBFBD><CEBB>
m_xMotor->SettingSpeed(m_lManualSpeedOfXMotor); m_xMotor->SettingSpeed(m_lManualSpeedOfXMotor);
m_xMotor->MoveToLocation(m_lXmotorLocationOfStartRecord); m_xMotor->MoveToLocation(m_lXmotorLocationOfStartRecord);
//qDebug() << "x<><78><EFBFBD><EFBFBD>λ<EFBFBD>û<EFBFBD>ԭ<EFBFBD><D4AD>x<EFBFBD><78><EFBFBD><EFBFBD>λ<EFBFBD>ô<EFBFBD><C3B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD>ӽ<EFBFBD><D3BD><EFBFBD><EFBFBD>أ<EFBFBD><D8A3><EFBFBD>֡<EFBFBD><D6A1>û<EFBFBD>вɼ<D0B2><C9BC><EFBFBD><EAA3AC><EFBFBD><EFBFBD>ֹͣ<CDA3>ɼ<EFBFBD><C9BC><EFBFBD>";
qDebug() << "11111111111111111111111111111111111111111111111111";
} }
if (!m_Imager->getRecordControlState())//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֹͣ<CDA3>ɼ<EFBFBD><C9BC><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϻص<CFBB><D8B5><EFBFBD>ʼλ<CABC>ã<EFBFBD><C3A3><EFBFBD>1<EFBFBD><31><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֹͣ<CDA3>ɼ<EFBFBD><C9BC><EFBFBD><EFBFBD><EFBFBD>2<EFBFBD><32>֡<EFBFBD><D6A1><EFBFBD>ɼ<EFBFBD><C9BC><EFBFBD><EFBFBD>ˣ<EFBFBD><CBA3><EFBFBD><EFBFBD><EFBFBD><EFBBB9><EFBFBD>˶<EFBFBD>
{
//x<><78><EFBFBD><EFBFBD>زɼ<D8B2>ǰ<EFBFBD><C7B0>λ<EFBFBD><CEBB>
m_xMotor->SettingSpeed(m_lManualSpeedOfXMotor);
m_xMotor->MoveToLocation(m_lXmotorLocationOfStartRecord);
//qDebug() << "x<><78><EFBFBD><EFBFBD>λ<EFBFBD>û<EFBFBD>ԭ<EFBFBD><D4AD><EFBFBD><EFBFBD>1<EFBFBD><31><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֹͣ<CDA3><D6B9><EFBFBD><EFBFBD><EFBFBD>ɼ<EFBFBD><C9BC><EFBFBD><EFBFBD><EFBFBD>2<EFBFBD><32>֡<EFBFBD><D6A1><EFBFBD>ɼ<EFBFBD><C9BC><EFBFBD><EFBFBD>ˣ<EFBFBD><CBA3><EFBFBD><EFBFBD><EFBFBD><EFBBB9><EFBFBD>˶<EFBFBD><CBB6><EFBFBD>";
qDebug() << "222222222222222222222222222222222222222222222222222222";
}
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD>ɼ<EFBFBD><C9BC>ߵIJɼ<C4B2><C9BC><EFBFBD><EFBFBD><EFBFBD> //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD>ɼ<EFBFBD><C9BC>ߵIJɼ<C4B2><C9BC><EFBFBD><EFBFBD><EFBFBD>
if (MotorState.Speed == 0 && MotorState.Location == m_lXmotorLocationOfStartRecord//<2F><>x<EFBFBD><78><EFBFBD><EFBFBD>س<EFBFBD>ʼλ<CABC><CEBB> if (MotorState.Speed == 0 && MotorState.Location == m_lXmotorLocationOfStartRecord//<2F><>x<EFBFBD><78><EFBFBD><EFBFBD>س<EFBFBD>ʼλ<CABC><CEBB>

View File

@ -242,6 +242,8 @@ private:
PathPlan* m_pathPlan; PathPlan* m_pathPlan;
FILE* m_hTimesFile;
public Q_SLOTS: public Q_SLOTS:
void onPlotHyperspectralImageRgbImage(); void onPlotHyperspectralImageRgbImage();
void PlotSpectral(int state); void PlotSpectral(int state);
@ -337,6 +339,7 @@ signals:
void StartLoopSignal(); void StartLoopSignal();
void StartRecordSignal(); void StartRecordSignal();
void CopyFileThreadSignal(QString, QString); void CopyFileThreadSignal(QString, QString);
void BroadcastXMotorPosSignal(long long, int);
void RecordWhiteSignal(); void RecordWhiteSignal();
void RecordDarlSignal(); void RecordDarlSignal();

View File

@ -208,17 +208,21 @@ void ImagerOperationBase::start_record()
string directory = fileOperation->getDirectoryFromString(); string directory = fileOperation->getDirectoryFromString();
string imgPath = directory + "\\" + m_FileName2Save + "_" + std::to_string(m_FileSavedCounter); string imgPath = directory + "\\" + m_FileName2Save + "_" + std::to_string(m_FileSavedCounter);
FILE* m_fImage = fopen(imgPath.c_str(), "w+b"); FILE* m_fImage = fopen((imgPath + ".bil").c_str(), "w+b");
size_t x; size_t x;
double pixelValueTmp; double pixelValueTmp;
string timesFile = imgPath + ".times";
FILE* hTimesFile = fopen(timesFile.c_str(), "w+");
imagerStartCollect(); imagerStartCollect();
while (m_bRecordControlState) while (m_bRecordControlState)
{ {
m_iFrameCounter++; m_iFrameCounter++;
getFrame(buffer); getFrame(buffer);
long long timeOs = getNanosecondsSinceMidnight();
//<2F><>ȥ<EFBFBD><C8A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӦΪbuffer<65><72>dark<72><6B><EFBFBD><EFBFBD>unsigned short<72><74><EFBFBD><EFBFBD><EFBFBD>Ե<EFBFBD>dark>bufferʱ<72><CAB1>buffer-dark=65535 //<2F><>ȥ<EFBFBD><C8A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӦΪbuffer<65><72>dark<72><6B><EFBFBD><EFBFBD>unsigned short<72><74><EFBFBD><EFBFBD><EFBFBD>Ե<EFBFBD>dark>bufferʱ<72><CAB1>buffer-dark=65535
if (m_HasDark) if (m_HasDark)
@ -259,6 +263,7 @@ void ImagerOperationBase::start_record()
} }
x = fwrite(buffer, 2, m_FrameSize, m_fImage); x = fwrite(buffer, 2, m_FrameSize, m_fImage);
fprintf(hTimesFile, "%d\n", timeOs);
//<2F><>rgb<67><62><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><D4B1>ڽ<EFBFBD><DABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ //<2F><>rgb<67><62><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><D4B1>ڽ<EFBFBD><DABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
m_RgbImage->FillRgbImage(buffer);//?????????????????????????????????????????????????????????????????????????????????????????????????????? m_RgbImage->FillRgbImage(buffer);//??????????????????????????????????????????????????????????????????????????????????????????????????????
@ -298,6 +303,7 @@ void ImagerOperationBase::start_record()
//QThread::msleep(1001); //QThread::msleep(1001);
fclose(m_fImage); fclose(m_fImage);
fclose(hTimesFile);
} }
void ImagerOperationBase::setFrameNumber(int FrameNumber) void ImagerOperationBase::setFrameNumber(int FrameNumber)

View File

@ -7,6 +7,7 @@
#include <string> #include <string>
#include <opencv2/core/core.hpp> #include <opencv2/core/core.hpp>
#include "ImagerOperationBase.h" #include "ImagerOperationBase.h"
#include "utility_tc.h"
class ImagerOperationBase :public QObject class ImagerOperationBase :public QObject
{ {

View File

@ -247,7 +247,7 @@ void PathPlan::onReadRecordLineFile_btn()
return; return;
} }
FILE* RecordLineFileHandle = fopen(RecordLineFilePath.toStdString().c_str(), "r"); FILE* RecordLineFileHandle = fopen(RecordLineFilePath.toStdString().c_str(), "rb");
double height, fov, swath, offset, repetitiveRate, LastLineThreshold, number; double height, fov, swath, offset, repetitiveRate, LastLineThreshold, number;
//<2F><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD> //<2F><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>

View File

@ -287,13 +287,16 @@ void ResononNirImager::start_record()
FileOperation* fileOperation = new FileOperation(); FileOperation* fileOperation = new FileOperation();
string directory = fileOperation->getDirectoryFromString(); string directory = fileOperation->getDirectoryFromString();
string imgPath = directory + "\\" + m_FileName2Save + "_" + std::to_string(m_FileSavedCounter)+".bil"; string imgPath = directory + "\\" + m_FileName2Save + "_" + std::to_string(m_FileSavedCounter);
FILE* m_fImage = fopen(imgPath.c_str(), "w+b"); FILE* m_fImage = fopen((imgPath + ".bil").c_str(), "w+b");
size_t x; size_t x;
double pixelValueTmp; double pixelValueTmp;
string timesFile = imgPath + ".times";
FILE* hTimesFile = fopen(timesFile.c_str(), "w+");
reConnectImage();//nir<69>ڶ<EFBFBD><DAB6>βɼ<CEB2>ʱ<EFBFBD><CAB1>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>imagerStartCollect()<29><EFBFBD><E1B1A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> reConnectImage();//nir<69>ڶ<EFBFBD><DAB6>βɼ<CEB2>ʱ<EFBFBD><CAB1>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>imagerStartCollect()<29><EFBFBD><E1B1A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
imagerStartCollect(); imagerStartCollect();
while (m_bRecordControlState) while (m_bRecordControlState)
@ -301,6 +304,8 @@ void ResononNirImager::start_record()
m_iFrameCounter++; m_iFrameCounter++;
getFrame(buffer); getFrame(buffer);
long long timeOs = getNanosecondsSinceMidnight();
//qDebug() << "time ns-------------------: " << timeOs;
//<2F><>ȥ<EFBFBD><C8A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӦΪbuffer<65><72>dark<72><6B><EFBFBD><EFBFBD>unsigned short<72><74><EFBFBD><EFBFBD><EFBFBD>Ե<EFBFBD>dark>bufferʱ<72><CAB1>buffer-dark=65535 //<2F><>ȥ<EFBFBD><C8A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӦΪbuffer<65><72>dark<72><6B><EFBFBD><EFBFBD>unsigned short<72><74><EFBFBD><EFBFBD><EFBFBD>Ե<EFBFBD>dark>bufferʱ<72><CAB1>buffer-dark=65535
if (m_HasDark) if (m_HasDark)
@ -341,6 +346,7 @@ void ResononNirImager::start_record()
} }
x = fwrite(buffer, 2, m_FrameSize, m_fImage); x = fwrite(buffer, 2, m_FrameSize, m_fImage);
fprintf(hTimesFile, "%lld\n", timeOs);
//<2F><>rgb<67><62><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><D4B1>ڽ<EFBFBD><DABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ //<2F><>rgb<67><62><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><D4B1>ڽ<EFBFBD><DABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
m_RgbImage->FillRgbImage(buffer);//?????????????????????????????????????????????????????????????????????????????????????????????????????? m_RgbImage->FillRgbImage(buffer);//??????????????????????????????????????????????????????????????????????????????????????????????????????
@ -356,6 +362,7 @@ void ResononNirImager::start_record()
if (m_iFrameCounter >= m_iFrameNumber) if (m_iFrameCounter >= m_iFrameNumber)
{ {
break; break;
//qDebug() << "<22><><EFBFBD><EFBFBD>ֹͣ<CDA3>ɼ<EFBFBD><C9BC><EFBFBD>֡<EFBFBD><D6A1><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD><C6B5>";
} }
} }
@ -380,6 +387,7 @@ void ResononNirImager::start_record()
//QThread::msleep(1001); //QThread::msleep(1001);
fclose(m_fImage); fclose(m_fImage);
fclose(hTimesFile);
} }
void ResononNirImager::WriteHdr() void ResononNirImager::WriteHdr()

View File

@ -9,7 +9,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>756</width> <width>523</width>
<height>463</height> <height>463</height>
</rect> </rect>
</property> </property>
@ -25,7 +25,7 @@
<rect> <rect>
<x>90</x> <x>90</x>
<y>250</y> <y>250</y>
<width>578</width> <width>341</width>
<height>134</height> <height>134</height>
</rect> </rect>
</property> </property>
@ -70,7 +70,7 @@
</rect> </rect>
</property> </property>
<property name="text"> <property name="text">
<string>版本1.8.2</string> <string>版本1.8.6</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" name="label_4"> <widget class="QLabel" name="label_4">

View File

@ -12,6 +12,10 @@ adjustTable::adjustTable(QWidget *parent)
connect(ui.objective_table2_up_btn, SIGNAL(clicked()), this, SLOT(onObjectivTable2Up_btn())); connect(ui.objective_table2_up_btn, SIGNAL(clicked()), this, SLOT(onObjectivTable2Up_btn()));
connect(ui.objective_table2_down_btn, SIGNAL(clicked()), this, SLOT(onObjectivTable2Down_btn())); connect(ui.objective_table2_down_btn, SIGNAL(clicked()), this, SLOT(onObjectivTable2Down_btn()));
connect(ui.objective_table2_stop_btn, SIGNAL(clicked()), this, SLOT(onObjectivTable2Stop_btn())); connect(ui.objective_table2_stop_btn, SIGNAL(clicked()), this, SLOT(onObjectivTable2Stop_btn()));
connect(ui.objective_table252_up_btn, SIGNAL(clicked()), this, SLOT(onObjectivTable252Up_btn()));
connect(ui.objective_table252_down_btn, SIGNAL(clicked()), this, SLOT(onObjectivTable252Down_btn()));
connect(ui.objective_table252_stop_btn, SIGNAL(clicked()), this, SLOT(onObjectivTable252Stop_btn()));
} }
adjustTable::~adjustTable() adjustTable::~adjustTable()
@ -63,3 +67,21 @@ void adjustTable::onObjectivTable2Stop_btn()
QString xx = "http://192.168.1.254/stopnow"; QString xx = "http://192.168.1.254/stopnow";
getRequest(xx); getRequest(xx);
} }
void adjustTable::onObjectivTable252Up_btn()
{
QString xx = "http://192.168.1.252/set_up";
getRequest(xx);
}
void adjustTable::onObjectivTable252Down_btn()
{
QString xx = "http://192.168.1.252/set_down";
getRequest(xx);
}
void adjustTable::onObjectivTable252Stop_btn()
{
QString xx = "http://192.168.1.252/stopnow";
getRequest(xx);
}

View File

@ -24,6 +24,10 @@ public Q_SLOTS:
void onObjectivTable2Down_btn(); void onObjectivTable2Down_btn();
void onObjectivTable2Stop_btn(); void onObjectivTable2Stop_btn();
void onObjectivTable252Up_btn();
void onObjectivTable252Down_btn();
void onObjectivTable252Stop_btn();
private: private:
Ui::adjustTableClass ui; Ui::adjustTableClass ui;

View File

@ -6,33 +6,66 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>348</width> <width>687</width>
<height>194</height> <height>389</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>adjustTable</string> <string>adjustTable</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<property name="spacing">
<number>0</number>
</property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QGroupBox" name="groupBox_8">
<property name="title">
<string>252号升降台</string>
</property>
<layout class="QGridLayout" name="gridLayout_10">
<item row="0" column="0">
<widget class="QPushButton" name="objective_table252_up_btn">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>上升</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QPushButton" name="objective_table252_down_btn">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>下降</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QPushButton" name="objective_table252_stop_btn">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>停止</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="0" column="1">
<widget class="QGroupBox" name="groupBox_7"> <widget class="QGroupBox" name="groupBox_7">
<property name="title"> <property name="title">
<string>1号升降台</string> <string>253号升降台</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_11"> <layout class="QGridLayout" name="gridLayout_11">
<item row="0" column="0"> <item row="0" column="0">
@ -77,10 +110,10 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="0" column="2">
<widget class="QGroupBox" name="groupBox_6"> <widget class="QGroupBox" name="groupBox_6">
<property name="title"> <property name="title">
<string>2号升降台</string> <string>254号升降台</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_9"> <layout class="QGridLayout" name="gridLayout_9">
<item row="0" column="0"> <item row="0" column="0">

View File

@ -121,3 +121,28 @@ QList<QString> getFileInfo(QString file)
return result; return result;
} }
long long getNanosecondsSinceMidnight()
{
// 获取当前系统时间
auto now = std::chrono::system_clock::now();
// 转换为 time_t秒级别的时间戳
std::time_t t = std::chrono::system_clock::to_time_t(now);
std::tm local_tm = *std::localtime(&t); // 获取本地时间结构
// 将时间结构调整到当天 00:00:00
local_tm.tm_hour = 0;
local_tm.tm_min = 0;
local_tm.tm_sec = 0;
local_tm.tm_isdst = -1; // 让 mktime 自动判断夏令时
// 获取当天 00:00:00 的时间点
auto midnight = std::chrono::system_clock::from_time_t(std::mktime(&local_tm));
// 计算从当天 00:00:00 到现在的时间差
auto nanoseconds_since_midnight = std::chrono::duration_cast<std::chrono::nanoseconds>(now - midnight);
// 返回纳秒数
return nanoseconds_since_midnight.count();
}

View File

@ -6,6 +6,7 @@
#include <QString> #include <QString>
#include <QDebug> #include <QDebug>
#include <chrono>
QString getFileNameBaseOnTime(); QString getFileNameBaseOnTime();
@ -20,4 +21,6 @@ bool createDir(QString fullPath);
QList<QString> getFileInfo(QString file); QList<QString> getFileInfo(QString file);
long long getNanosecondsSinceMidnight();
#endif // UTILITY_TC_H #endif // UTILITY_TC_H

28
readme.txt Normal file
View File

@ -0,0 +1,28 @@
1、HPPA拼接
每条航线的开始帧的位置不一样,无法直接将相邻航线拼接一起,否则航向有错位。
1.1 步骤
1采集每帧的同时获取线性平台的位置并写入文件
2根据位置信息匹配帧号然后进行拼接
1.2 存在的问题及解决办法
1马达库不知道是否能够支持20hz及以上的访问频率
或者按照一定频率采集线性平台位置,通过时间进行插值获取每帧位置;
2列之间的重叠
通过一个可调参数进行旁向拼接设置;
1.3 拼接后裁剪
1.4 根据每个像素的xy坐标进行拼接放弃
2、bug修复
1反射率图像条纹白板和暗电流都采集30帧进行平均
2轨迹2位小数
3速度输入接受小数
3、hppa升降桌无线控制模块
如果没有配置过那么默认ip为http://192.168.1.254且默认wifi以iris1开头默认wifi密码为123456789。
配置网页为http://192.168.1.254/wificonfig.html配置密码是licahk*******
如果已经配置为252那么可用下面网址控制
http://192.168.1.252/stopnow
http://192.168.1.252/set_up
http://192.168.1.252/set_down
http://192.168.1.252/wificonfig.html