Esri / Esri/arcgis-runtime-toolkit-android

ArLocationDataSource: Update to include options for reporting height as MSL

Open
#137 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
59
Forks
40
PR merge metrics
No merged PRs in 30d

Description

Background:

* Android's location library reports altitude in WGS84/height above ellipsoid (HAE)
* iOS's location library and many of Esri's data products use height relative to Mean Sea Level (MSL)
* The difference between WGS84/HAE and MSL can be significant and varies by location, so it is not trivial for the user to correct.

Options:

1. Listen for and parse [NMEA messages](https://www.trimble.com/OEM_ReceiverHelp/V4.44/en/NMEA-0183messages_MessageOverview.html) - `GGA` and `GNS` in particular - to read the altitude provided in MSL by the GNSS device
* This is what the popular gpsTest app does to report MSL values - [source](https://github.com/barbeau/gpstest/blob/eb1e197f921a48db3efd8bc5078ce84dcbdd3664/GPSTest/src/main/java/com/android/gpstest/GpsStatusFragment.java#L468) and [source](https://github.com/barbeau/gpstest/blob/011c52408541bc601e011108e483ae2259947e8b/GPSTest/src/main/java/com/android/gpstest/util/NmeaUtils.java#L46)
* This is somewhat finicky as it depends on behavior that varies considerably between devices, but appears simplest in terms of toolkit implementation; otherwise we'd need to ship an elevation model.
2. Use a geoid model to correct elevation values before passing them on.
* [EGM2008](https://earth-info.nga.mil/GandG/wgs84/gravitymod/egm2008/egm08_gis.html) is available in a GIS format; perhaps we could use that
3. ~~Use GeometryEngine~~ doesn't currently support projectZ, so not an option
4. Use a web service
* Relatively simple to implement, but do we want to hard-code projection service into the location data source?
* Is it acceptable to wait on a web service for getting the altitude as often as once a second (or more often)? probably not

Additional Requirements:

* There needs to be an option to enable or disable this; customers may still want to use the more accurate HAE values rather than MSL
* Proposed: `returnAltitudeAsMeanSeaLevel`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.