feat: quantity_from_zero() enabled for absolute point origins

This commit is contained in:
Mateusz Pusz
2023-12-22 16:41:14 +01:00
parent a962182e13
commit f2abaa28bc
4 changed files with 21 additions and 19 deletions
+2 -2
View File
@@ -97,8 +97,8 @@ template<earth_gravity_model M>
hae_altitude<M> to_hae(msl_altitude msl, position<long double> pos)
{
const auto geoid_undulation =
isq::height(GeographicLibWhatsMyOffset(pos.lat.quantity_from(equator).numerical_value_in(si::degree),
pos.lon.quantity_from(prime_meridian).numerical_value_in(si::degree)) *
isq::height(GeographicLibWhatsMyOffset(pos.lat.quantity_from_zero().numerical_value_in(si::degree),
pos.lon.quantity_from_zero().numerical_value_in(si::degree)) *
si::metre);
return height_above_ellipsoid<M> + (msl - mean_sea_level - geoid_undulation);
}