mirror of
https://github.com/barbeau/gpstest.git
synced 2025-12-05 18:46:30 -06:00
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:
@@ -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.
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user