@@ -58,6 +58,15 @@ class Settings {
5858 uint8_t B;
5959 };
6060
61+ struct ProjectionSetting {
62+ std::string satelliteNameInTLE;
63+ float scanAngle;
64+ float yaw;
65+ float pitch;
66+ float roll;
67+ float timeOffsetMs;
68+ };
69+
6170 friend std::istream& operator >>(std::istream& is, HTMLColor& color) {
6271 std::string rgb;
6372 is >> rgb;
@@ -105,35 +114,15 @@ class Settings {
105114 return mJpegQuality ;
106115 }
107116
108- std::string getSatNameInTLE () {
109- std::string name;
110- ini::extract (mIniParser .sections [getSateliteName ()][" SatNameInTLE" ], name);
111- return name;
112- }
113- float getScanAngle () {
114- float angle;
115- ini::extract (mIniParser .sections [getSateliteName ()][" ScanAngle" ], angle, 110 .8f );
116- return angle;
117- }
118- float getRoll () {
119- float roll;
120- ini::extract (mIniParser .sections [getSateliteName ()][" Roll" ], roll, 0 .0f );
121- return roll;
122- }
123- float getPitch () {
124- float pitch;
125- ini::extract (mIniParser .sections [getSateliteName ()][" Pitch" ], pitch, 0 .0f );
126- return pitch;
127- }
128- float getYaw () {
129- float yaw;
130- ini::extract (mIniParser .sections [getSateliteName ()][" Yaw" ], yaw, 0 .0f );
131- return yaw;
132- }
133- float getTimeOffsetMs () {
134- float timeOffset;
135- ini::extract (mIniParser .sections [getSateliteName ()][" TimeOffset" ], timeOffset, 0 .0f );
136- return timeOffset;
117+ ProjectionSetting getProjectionSetting (const std::string& satellite) {
118+ ProjectionSetting result;
119+ ini::extract (mIniParser .sections [satellite][" SatNameInTLE" ], result.satelliteNameInTLE );
120+ ini::extract (mIniParser .sections [satellite][" ScanAngle" ], result.scanAngle , 110 .8f );
121+ ini::extract (mIniParser .sections [satellite][" Roll" ], result.roll , 0 .0f );
122+ ini::extract (mIniParser .sections [satellite][" Pitch" ], result.pitch , 0 .0f );
123+ ini::extract (mIniParser .sections [satellite][" Yaw" ], result.yaw , 0 .0f );
124+ ini::extract (mIniParser .sections [satellite][" TimeOffset" ], result.timeOffsetMs , 0 .0f );
125+ return result;
137126 }
138127
139128 bool equadistantProjection () const {
0 commit comments