-
Notifications
You must be signed in to change notification settings - Fork 21
/
NaviThread.h
65 lines (57 loc) · 1.6 KB
/
NaviThread.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#pragma once
#include "PSINSCore/KFApp.h"
#include "PSINSCore/PSINS.h"
#define TS (1.0/400.0)
#define Samples 2
#define NT_ALIGNINIT WM_USER+1101
#define NT_ALIGNUPDATE WM_USER+1102
#define NT_NaviINIT WM_USER+1111
#define NT_NAVIUPDATE WM_USER+1112 // ÓëKalmanÂ˲¨Ê±¼ä¸üÐÂÖغÏ
#define NT_KFINIT WM_USER+1113
#define NT_KFTUPDATE WM_USER+1114
#define NT_KFMUPDATE WM_USER+1115
#define NT_AVPUDT WM_USER+1201
typedef struct {
BOOL ComputerONOFF;
int alignType;
int alignTimeC, alignTImeF;
}NaviParaS;
typedef struct {
CVect3* wm;
CVect3* vm;
int nSamples;
double ts;
CVect3 vel;
} AlignUdtPkg;
class NaviThread :
public CWinThread
{
DECLARE_DYNCREATE(NaviThread)
public:
NaviThread();
virtual ~NaviThread();
public:
virtual BOOL InitInstance();
virtual int ExitInstance();
protected:
afx_msg void AlignInit(WPARAM wParam, LPARAM lParam);
afx_msg void AlignUpdate(WPARAM wParam, LPARAM lParam);
afx_msg void NaviInit(WPARAM wParam, LPARAM lParam);
afx_msg void NaviUpdate(WPARAM wParam, LPARAM lParam);
afx_msg void KFInit(WPARAM wParam, LPARAM lParam);
afx_msg void KFTimeUdt(WPARAM wParam, LPARAM lParam);
afx_msg void KFMeasUdt(WPARAM wParam, LPARAM lParam);
DECLARE_MESSAGE_MAP()
public:
CSINS sins;
HWND NTMainDlg;
double NTavp[9] = { 0.0 };
NaviParaS NPS;
CVect3 wmi[Samples], vmi[Samples]; // samples used to compute
CVect3 v0, p0;
BOOL AlignFished = FALSE, AlignInitFinish = FALSE;
BOOL NaviInitFinished = FALSE;
double tk; // INS system time
CAligni0 aligni0; // Alignment in inertial frame
void reInit();
};