Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix height above ellipsoid and undulation for SBF GPS #23942

Merged
merged 1 commit into from
Jun 7, 2023

Conversation

makeller1
Copy link
Contributor

@makeller1 makeller1 commented May 31, 2023

As pointed out in issue #23613, the ellipsoid height and undulation are calculated incorrectly. This likely occurred because Ardupilot has an opposite definition of undulation as the Septentrio receiver (and virtually all GPS receivers for that matter). Septentrio defines undulation as the distance from the ellipsoid to the geoid with up being positive (geoid is above ellipsoid). Ardupilot defines down as positive.

This PR reconciles the undulation definition and fixes the height above ellipsoid computed here.

@tridge, @hendjoshsr71 and/or @BluemarkInnovations

Platform
[X] All
[ ] AntennaTracker
[ ] Copter
[ ] Plane
[ ] Rover
[ ] Submarine

@rmackay9
Copy link
Contributor

Hi @makeller1,

Thanks for the PR. Can you change the commit title to start with "AP_GPS:"? Please note that I mean the commit title, not the PR title.

I've added this to the next dev call.

@makeller1 makeller1 force-pushed the sbf-undulation-fix branch from 861cba5 to 179e681 Compare June 1, 2023 17:22
@makeller1
Copy link
Contributor Author

Hi @makeller1,

Thanks for the PR. Can you change the commit title to start with "AP_GPS:"? Please note that I mean the commit title, not the PR title.

I've added this to the next dev call.

Done.

@BluemarkInnovations
Copy link
Contributor

Thanks for the PR. I made the initial commit, but during the development, a lot of changes were made prior to merging to the master code by multiple developers. I did some research on this and I agree that it looks that the ellipsoid height and undulation are calculated incorrectly. However it boils down how ArduPilot defined undulation. Having said that the current implementation is in any case in conflict with the definition in the AP_GPS code.

So a lot of words to say that I don't have the expertise for this bug/PR, but to me it looks that it is a bug that is fixed with this PR.

@rmackay9
Copy link
Contributor

rmackay9 commented Jun 5, 2023

We discussed this on the dev call (06-Jun-2023) and decided that we needed to see the data from the GPS to be sure this is correct.

@tridge apparently has a HiTec septentrio based GPS that he will test with.

@tridge tridge self-requested a review June 5, 2023 23:59
@tridge
Copy link
Contributor

tridge commented Jun 6, 2023

I have a septentrio mosaic here and will test

@tridge
Copy link
Contributor

tridge commented Jun 6, 2023

tested with a comparison of a ublox F9P and a septentrio mosaic on the same antenna, the PR is correct:
image

@rmackay9
Copy link
Contributor

rmackay9 commented Jun 6, 2023

Great news. I've added this to the Copter-4.4 project. It was added to Plane-4.4 but not Copter-4.4 for some reason.. we should always add to both if we add it to either.

@peterbarker peterbarker merged commit 6ba526f into ArduPilot:master Jun 7, 2023
@peterbarker
Copy link
Contributor

Merged, thanks!

@rmackay9
Copy link
Contributor

rmackay9 commented Jul 3, 2023

this is included in Copter-4.4.0-beta3

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.

6 participants