Skip to content

Conversation

@jgoppert
Copy link
Member

@jgoppert jgoppert commented Mar 8, 2022

Closes Issue #1719

Do not merge yet, awaiting flight test.

@vooon vooon added this to the Version 1.14 milestone Mar 8, 2022
@Alefunk
Copy link

Alefunk commented Mar 30, 2022

Hey, i just noticed that the whole ECEF transformation is obsolete with this change. You could simply use ENU instead of ECEF as function argument in send_fake_gps() and remove the member variable ecef_origin completely.
To still have access to the local geodetic variable in send_fake_gps() use this function as described here:

const GeographicLib::Geocentric& earth = GeographicLib::Geocentric::WGS84();
GeographicLib::LocalCartesian proj(map_origin.x(), map_origin.y(), map_origin.z(), earth);
proj.Reverse(pos_enu.x(), pos_enu.y(), pos_enu.z(), geodetic.x(), geodetic.y(), geodetic.z());

Because the ellipsoid height will be returned, it is necessary to convert the height to the geoid height like here or by using the mavros function:

geodetic.z() += m_uas->ellipsoid_to_geoid_height(...);

Don't forget to convert the enu coordinates into ned coordinates with the build in mavros helper function (ftf::transform_frame_enu_ned(pos_enu);).

@vooon vooon modified the milestones: Version 1.14, Version 1.15 Sep 24, 2022
@vooon vooon modified the milestones: Version 1.15, Version 1.16 Dec 30, 2022
@vooon vooon modified the milestones: Version 1.16, Version 1.17 May 5, 2023
@vooon vooon modified the milestones: Version 1.17, Version 1.18 Sep 9, 2023
@vooon vooon modified the milestones: Version 1.18, Version 1.19 Mar 3, 2024
@vooon vooon modified the milestones: Version 1.19, Version 1.20 Jun 7, 2024
@vooon vooon modified the milestones: Version 1.20, Version 1.21 Oct 10, 2024
@vooon vooon removed this from the Version 1.21 milestone Sep 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants