@@ -65,6 +65,8 @@ TPointCoefficientId fromString(const std::string &term_name)
65
65
id = TPointCoefficientId::NPAE;
66
66
else if (term_name == " TF" )
67
67
id = TPointCoefficientId::TF;
68
+ else if (term_name.size () >= 2 && term_name[0 ] == ' T' && term_name[1 ] == ' X' )
69
+ id = TPointCoefficientId::TX;
68
70
}
69
71
70
72
return id;
@@ -137,6 +139,33 @@ AltAzCorrection computeSingleCoefficient(const TPointSingleCoefficient& coef, co
137
139
offsets.el = -coefValue * sin (PI_HALF - elevation); // The correction is from zenith, so change sign.
138
140
break ;
139
141
142
+ case TPointCoefficientId::TX:
143
+ if (coef.name == " TX" )
144
+ {
145
+ offsets.el = -coefValue * tan (PI_HALF - elevation); // The correction is from zenith, so change sign.
146
+ }
147
+ else if (coef.name == " TXL" )
148
+ {
149
+ offsets.el = -coefValue / tan (elevation);
150
+ }
151
+ else if (coef.name == " TX5" )
152
+ {
153
+ if (elevation > dpslr::math::units::degToRad (5 .))
154
+ offsets.el = -coefValue * tan (PI_HALF - elevation); // The correction is from zenith, so change sign.
155
+ }
156
+ else if (coef.name == " TX10" )
157
+ {
158
+ if (elevation > dpslr::math::units::degToRad (10 .))
159
+ offsets.el = -coefValue * tan (PI_HALF - elevation); // The correction is from zenith, so change sign.
160
+ }
161
+ else if (coef.name == " TX15" )
162
+ {
163
+ if (elevation > dpslr::math::units::degToRad (15 .))
164
+ offsets.el = -coefValue * tan (PI_HALF - elevation); // The correction is from zenith, so change sign.
165
+ }
166
+ break ;
167
+
168
+
140
169
case TPointCoefficientId::H:
141
170
{
142
171
// Parse harmonic term
0 commit comments