Skip to content

Conversation

@michalgwo
Copy link
Contributor

There is a discrepancy between the altitude returned on Android and iOS. Android returns the altitude above the WGS84 reference ellipsoid (docs), but iOS returns the altitude above mean sea level (docs).

The altitude above mean sea level is more common, so it's worth having it. This PR makes the library return both.

I didn't implement web, because I don't have any experience with it. According to the documentation, web target returns the altitude above the WGS84, so the previous altitude is now under the ellipsoidalAltitude. mslAltitude on web returns null for now - implementation is to-do, after this PR is merged, I can open an issue.

There are 2 breaking changes in this PR:

  1. There is no Location.altitude anymore, instead, there are 2 properties Location.mslAltitude and Location.ellipsoidalAltitude
  2. Altitude.meters is now nullable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant