fix: Remove altitude support when reading geo URI

Please note that altitude is not yet supported as [RFC 5870](https://datatracker.ietf.org/doc/html/rfc5870) requires altitude to be othrometric, or height above the WGS-84 reference geoid. Support for geoid offset is discussed more in https://github.com/barbeau/gpstest/issues/296 and https://github.com/barbeau/gpstest/issues/530.
This commit is contained in:
Sean Barbeau
2021-06-25 15:24:14 -04:00
parent 931b987c4a
commit b6040949f1
2 changed files with 2 additions and 3 deletions

View File

@@ -23,9 +23,7 @@ You can scan a QR code that has a location embedded in the [Geo URI format (RFC
`geo:37.786971,-122.399677`
If altitude is included, then:
`geo:37.786971,-122.399677,15`
Please note that altitude is not yet supported as [RFC 5870](https://datatracker.ietf.org/doc/html/rfc5870) requires altitude to be othrometric, or height above the WGS-84 reference geoid. Support for geoid offset is discussed more in https://github.com/barbeau/gpstest/issues/296 and https://github.com/barbeau/gpstest/issues/530.
You can use the [ZXing QR Code Generator website](https://zxing.appspot.com/generator/) to create your own QR Codes.

View File

@@ -408,6 +408,7 @@ public class GpsTestActivity extends AppCompatActivity
String geoUri = scanResult.getContents();
Location l = IOUtils.getLocationFromGeoUri(geoUri);
if (l != null) {
l.removeAltitude(); // TODO - RFC 5870 requires altitude height above geoid, which we can't support yet (see #296 and #530), so remove altitude here
// Create a SHOW_RADAR intent out of the Geo URI and pass that to set ground truth
Intent showRadar = IOUtils.createShowRadarIntent(l);
recreateApp(showRadar);