-
Notifications
You must be signed in to change notification settings - Fork 1
/
Settings.cpp
100 lines (83 loc) · 2.43 KB
/
Settings.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
94
95
96
97
98
99
100
#include "Settings.hpp"
#include <iostream>
Settings::Settings()
:defaultDeclination_(9.3),
defaultUTMZone_(13),
defaultNS_(1),
defaultEW_(-1),
defaultFCAMinAngle_(5.0),
aprsServer_("localhost"),
aprsCallsign_("NOCALL"),
aprsCallpass_("0"),
aprsPort_(2023),
publishAPRS_(true)
{
defaultCS_=theCoordSysBuilder_.getCoordSys(QString("WGS84 Lat/Lon"));
equipQualSDMap_["Interferometer"]["Very Good"]=3.0;
equipQualSDMap_["Interferometer"]["Good"]=6.0;
equipQualSDMap_["Interferometer"]["OK"]=9.0;
equipQualSDMap_["Long Base Avg"]["Very Good"]=5.0;
equipQualSDMap_["Long Base Avg"]["Good"]=9.0;
equipQualSDMap_["Long Base Avg"]["OK"]=13.0;
equipQualSDMap_["ELPER"]["Very Good"]=6.0;
equipQualSDMap_["ELPER"]["Good"]=12.0;
equipQualSDMap_["ELPER"]["OK"]=18.0;
equipQualSDMap_["Beam"]["Very Good"]=9.0;
equipQualSDMap_["Beam"]["Good"]=18.0;
equipQualSDMap_["Beam"]["OK"]=27.0;
}
Settings::Settings(const Settings &right)
:theCoordSysBuilder_(right.theCoordSysBuilder_),
defaultCS_(right.defaultCS_),
equipQualSDMap_(right.equipQualSDMap_),
defaultDeclination_(right.defaultDeclination_),
defaultUTMZone_(right.defaultUTMZone_),
defaultNS_(right.defaultNS_),
defaultEW_(right.defaultEW_),
defaultFCAMinAngle_(right.defaultFCAMinAngle_),
aprsServer_(right.aprsServer_),
aprsCallsign_(right.aprsCallsign_),
aprsCallpass_(right.aprsCallpass_),
aprsPort_(right.aprsPort_),
publishAPRS_(right.publishAPRS_)
{
}
CoordSys Settings::getCoordSys(const QString &csName) const
{
return (theCoordSysBuilder_.getCoordSys(csName));
}
QList<QString> Settings::getSupportedCoordSys() const
{
return (theCoordSysBuilder_.qGetSupportedCoordSys());
}
double Settings::getStandardDeviation(const QString &equipType,
const QString &quality) const
{
return (equipQualSDMap_[equipType][quality]);
}
const CoordSys &Settings::getDefaultCS() const { return defaultCS_;};
QString Settings::getDefaultCSName() const
{
QString theName=defaultCS_.getBaseName();
return (theName);
}
void Settings::setDefaultCS(const QString & csName)
{
defaultCS_=theCoordSysBuilder_.getCoordSys(csName);
}
void Settings::setDefaultNSHemisphere(int NS)
{
defaultNS_=NS;
}
void Settings::setDefaultEWHemisphere(int EW)
{
defaultEW_=EW;
}
int Settings::getDefaultNSHemisphere() const
{
return defaultNS_;
}
int Settings::getDefaultEWHemisphere() const
{
return defaultEW_;
}