Skip to content

Commit

Permalink
use GeographicLib::Geoid::ConvertHeight
Browse files Browse the repository at this point in the history
  • Loading branch information
dakejahl committed Aug 21, 2024
1 parent 95a2795 commit e71aa91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mavros/include/mavros/mavros_uas.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class Data
inline double geoid_to_ellipsoid_height(const T lla)
{
if (egm96_5) {
return int(GeographicLib::Geoid::GEOIDTOELLIPSOID) * (*egm96_5)(lla->latitude, lla->longitude);
return egm96_5->ConvertHeight(lla->latitude, lla->longitude, 0.0, GeographicLib::Geoid::GEOIDTOELLIPSOID);
} else {
return 0.0;
}
Expand All @@ -181,7 +181,7 @@ class Data
inline double ellipsoid_to_geoid_height(const T lla)
{
if (egm96_5) {
return int(GeographicLib::Geoid::ELLIPSOIDTOGEOID) * (*egm96_5)(lla->latitude, lla->longitude);
return egm96_5->ConvertHeight(lla->latitude, lla->longitude, 0.0, GeographicLib::Geoid::ELLIPSOIDTOGEOID);
} else {
return 0.0;
}
Expand Down

0 comments on commit e71aa91

Please sign in to comment.