300TC 机载系统 完整功能,(1)采集影像(2)采集和解析惯导数据(3)惯导磁场校正
This commit is contained in:
103
Header_Files/udpserver.h
Normal file
103
Header_Files/udpserver.h
Normal file
@ -0,0 +1,103 @@
|
||||
#ifndef UDPSERVER_H
|
||||
#define UDPSERVER_H
|
||||
|
||||
#include <iostream>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <ctime>
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QUdpSocket>
|
||||
#include <QObject>
|
||||
#include <QThread>
|
||||
#include <QDir>
|
||||
|
||||
#include "ximeaimager.h"
|
||||
#include "sbgrecorder.h"
|
||||
#include "fileoperation.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
#include <sbgEComLib.h>
|
||||
#include <stdlib.h>
|
||||
}
|
||||
|
||||
|
||||
class sbgMagCibWorkThread:public QThread
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
sbgMagCibWorkThread();
|
||||
|
||||
int m_iMagCalibStopControl;
|
||||
void displayMagCalibResults(SbgEComMagCalibMode mode, const SbgEComMagCalibResults *pMagCalibResults);
|
||||
protected:
|
||||
void run();
|
||||
private:
|
||||
// 0:串口打开错误;
|
||||
// 1:磁场矫正失败;
|
||||
// 2:Unable to get onboard magnetic calibration results;
|
||||
// 3:磁场数据无效:invalid;
|
||||
// 4:写入磁场数据失败;
|
||||
// 5:POOR;
|
||||
// 6:GOOD;
|
||||
// 7:OPTIMAL;
|
||||
int m_iMagCalibState;
|
||||
|
||||
void signalWrap(int state);
|
||||
|
||||
signals:
|
||||
void magCalibStateSignal(int);
|
||||
|
||||
};
|
||||
|
||||
class UdpServer:public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
UdpServer();
|
||||
QThread * m_RecordThread;
|
||||
QThread * m_RecordSbgThread;
|
||||
QThread * m_CopyFileThread;
|
||||
|
||||
private slots:
|
||||
void processPendingDatagrams();
|
||||
|
||||
private:
|
||||
QUdpSocket * m_udpSocket;
|
||||
|
||||
sbgMagCibWorkThread * m_sbgMagCibWorkThread;
|
||||
|
||||
QHostAddress m_clientIpAddress;
|
||||
quint16 m_clientPort;
|
||||
|
||||
XimeaImager * m_imager;
|
||||
sbgtc::SbgRecorder * m_sbgRecorder;
|
||||
FileOperation * m_copyFile;
|
||||
double getTimeDifferenceBetweenSystemAndSbg(double secondSbg);
|
||||
|
||||
void sender(int status);
|
||||
|
||||
signals:
|
||||
void systemStart();
|
||||
void systemStop();
|
||||
void startRecordHyperspectralSignal();
|
||||
void startCopyFileSignal();
|
||||
void startDeleteFileSignal();
|
||||
|
||||
void recordXimeaOnlySignal(double,QString);
|
||||
|
||||
public slots:
|
||||
void onRecordFinished();
|
||||
|
||||
void sendSerialPortStatus(int serialPortStatus);
|
||||
void sendSbgMagCalibState(int SbgMagCalibState);
|
||||
|
||||
void sendSbgSolutionModeState(int SolutionMode);
|
||||
void sendSbgAccuracyState(int Accuracy);
|
||||
|
||||
void sendXimeaImageStatus(int ximeaImageStatus);
|
||||
void sendCopyFileStatus(int fileStatus);
|
||||
};
|
||||
#endif // UDPSERVER_H
|
Reference in New Issue
Block a user