forked from mpusz/mp-units
feat: quantity_from_zero() enabled for absolute point origins
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user