forked from XiaoGongWei/MG_APP
-
Notifications
You must be signed in to change notification settings - Fork 1
/
QBaseObject.cpp
93 lines (83 loc) · 1.66 KB
/
QBaseObject.cpp
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#include "QBaseObject.h"
//Initialization data
void QBaseObject::initVar()
{
IsaddGPS = false;
IsaddGLOSS = false;
IsaddBDS = false;
IsaddGalieo = false;
m_SystemNum = 0;
}
//
QBaseObject::QBaseObject(void)
{
initVar();
}
//
QBaseObject::~QBaseObject(void)
{
}
//Setting up the file system. SystemStr:"G"(Turn on the GPS system);"GR":(Turn on the GPS+GLONASS system);"GRCE"(Open all)et al
//GPS, GLONASS, BDS, and Galieo are used respectively: the letters G, R, C, E
bool QBaseObject::setSatlitSys(QString SystemStr)
{
if (!(SystemStr.contains("G")||SystemStr.contains("R")||SystemStr.contains("C")||SystemStr.contains("E")))
return false;
m_SystemStr = SystemStr;// save systeam sat
//
if (SystemStr.contains("G"))
{
IsaddGPS = true;
m_SystemNum++;
}
else
IsaddGPS = false;
//
if (SystemStr.contains("R"))
{
IsaddGLOSS = true;
m_SystemNum++;
}
else
IsaddGLOSS = false;
//
if (SystemStr.contains("C"))
{
IsaddBDS = true;
m_SystemNum++;
}
else
IsaddBDS = false;
//
if (SystemStr.contains("E"))
{
IsaddGalieo = true;
m_SystemNum++;
}
else
IsaddGalieo = false;
return true;
}
//Sys = G R C E(Representing GPS, GLONASS, BDS, Galieo systems)Determine if the system data is needed
bool QBaseObject::isInSystem(char Sys)
{
if (IsaddGPS&&Sys == 'G')
return true;
else if (IsaddGLOSS&&Sys == 'R')
return true;
else if (IsaddBDS&&Sys == 'C')
return true;
else if (IsaddGalieo&&Sys == 'E')
return true;
return false;
}
//Get the current face set several systems
int QBaseObject::getSystemnum()
{
return m_SystemNum;
}
//Get the current face set several systems
QString QBaseObject::getSatlitSys()
{
return m_SystemStr;
}