mobile icon indicating copy to clipboard operation
mobile copied to clipboard

GNSS enhancements bundle

Open Withalion opened this issue 1 month ago • 9 comments

This PR includes multiple improvements to GNSS data handling, elevation handling and some more improvements.

  1. #4176 Adds geoid separation value to GPS information panel. The value is gathered from external GNSS devices. This value can be used to recalculate ellipsoid elevation to geoid elevation or vice versa. Also adds geoid_separation variable.

  2. #4210 Adds transformation of ellipsoidal elevation to geoid elevation with the default usage of EGM96 geoid model. This transformation is applied for internal provider (both iOS and android), fused provider on android, position tracking. photo showing GPS panel in Mergin Maps, with dialog open, which specifies that EGM96 model is used to calculate elevation

  3. #4228 Sometimes we didn't use QgsCoordinateTransformContext from the project, which would fail transformations if users used custom transformation.

  4. #4216 Introduced slight change for external providers. We don't trust the models used in GNSSes, the received data is tranformed to ellipsoid elevation and then again to geoid elevation using our model. Geoid separation is calculated by us. Besides this, the internal, android and simulated providers also return geoid separation data.

  5. Mock location detection - when using android position provider (fused in application) we detect if the position is mocked and we show this to users. GPS panel in Mergin Maps showing 'Mocked position provider' info

  6. #4238 In some cases using a more precise local geoid model is necessary for users. This PR added this support if a specific geoid model is specified for the project. The geoid model has to be specified in qgis plugin and it's grid shift file has to be packaged with the project to work correctly. Users will see that the project is using custom geoid model in GPS info panel.

Position inside of geoid area Position outside of geoid area
photo showing elevation and elevation separation info when using local geoid model photo showing uknown elevation and elevation separation info when using local geoid model

To summarise:

  • new form variable geoid_separation => should be used as @position_geoid_separation
  • new form variable altitude_ellipsoidal => should be used as @position_altitude_ellipsoidal
  • bluetooth (external GNSS) provider
    • we show geoid (orthometric) elevation now using EGM96 geoid model (bundled with app) by default and using custom model if setup
    • the provided data gets transformed to ellipsoid elevation and then using our model to geoid elevation again
    • we also show geoid separation (undulation)
  • internal provider
    • iOS
      • we show geoid (orthometric) elevation now using EGM96 geoid model (bundled with app) by default and using custom model if setup
      • we also show geoid separation (undulation)
      • for mocked position we either directly show the geoid elevation from GNSS or if ellipsoid elevation is available we transform it using the selected model
    • Android
      • we show geoid (orthometric) elevation now using EGM96 geoid model (bundled with app) by default and using custom model if setup
      • we also show geoid separation (undulation)
  • fused provider
    • we show geoid (orthometric) elevation now using EGM96 geoid model (bundled with app) by default and using custom model if setup
    • we also show geoid separation (undulation)
    • we detect mock position and show it to user
  • simulated provider
    • we show geoid (orthometric) elevation now using EGM96 geoid model (bundled with app) by default and using custom model if setup
    • we also show geoid separation (undulation)

Besides all of these, the altitude value in GPS info panel should show the elevation received from provider minus the antenna height. The same should apply for all elevation variables.

A tip for users setting up external GNSS receivers is to select fused provider on Android and internal provider on iOS, as these providers will show if mocked location is detected.

@wonder-sk soft ping if you want to have another look

Withalion avatar Nov 24 '25 15:11 Withalion

~~@IvaKuklica for testing #4165 #2615 #2725 #4221 feel free to use builds here:~~ ~~### 2025.8.0~~ ~~- iOS: 25.11.827911~~

Withalion avatar Nov 24 '25 16:11 Withalion

OLD

@IvaKuklica for testing #4165 #2615 #2725 #4221 #4237 feel free to use builds here:
### 2025.8.0 
- iOS: 25.12.831411
- Android: 
  - [arm-v8](https://play.google.com/apps/test/RQrgmETMGFo/ahAO29uNQ7jEmK5SmppqUp-WI8UZTaL9tKMI1-r2u_FTDcLNn6_qglwAfdle69sXgywriECQeB5EO8MyV_xmkf9LI6) - 737351
  - [arm-v7](https://play.google.com/apps/test/RQrgmETMGFo/ahAO29uNTwRNhiafZ9n6DataCn8t_g0vFjgMKscT_l9ZMAkav6538Y2OblcTDN1BSC4hEBfDgpEEqWgDI1DopTa-G) - 737311
- Windows: [here](https://github.com/MerginMaps/mobile/actions/runs/19851751707/artifacts/4734821292)

P.S: these include stuff until _custom geoid support_

Withalion avatar Dec 02 '25 08:12 Withalion

We should also subtract the height of antenna from the elevation in GPS panel

Withalion avatar Dec 02 '25 11:12 Withalion

Hi @Withalion

Testing of bluetooth (external GNSS) provider

Application (+ app version, build, operating system): 🍎 iOS: ios 26.1 / build 25.12.831411 - 25.11.827911 CRS: WGS84_EGM96 Project: test_orthometric_heights

  • SUMMARY:

~~During the testing of RX connection, the conversion of ellipsoid altitude to orthometric using EGM96 geoid model is incorrect. The Geoid altitude in MM application shows only negative value of Geoid separation (undulation). Also vertical accuracy displays a constant value of 9.5m.~~

  • ISSUE:

The difference between Mergin Maps application in iOS and Android vs. Emlid Flow is 2m. Probably the height in iOS seems to be displayed incorrectly.

Application (+ app version, build, operating system): 🤖 Samsung Galaxy A53 5G, Android 15 / Build 737351 CRS: WGS84_EGM96 Project: test_orthometric_heights GPS Antenna Heigh = 0.145 m

  • SUMMARY:

The difference between a feature recorded in Emlid Flow and Mergin Maps applications is on average 0.0075 m. When comparing individuals points recorded in the both applications, the values ranged from 0.001 to 0.013m.

IvaKuklica avatar Dec 03 '25 12:12 IvaKuklica

Hei @IvaKuklica could you fix that image at some point, looks like it's broken/unavailable.

Withalion avatar Dec 04 '25 07:12 Withalion

I also increased the click area for the information button, so it's easier to trigger the info popup on smaller screens.

Withalion avatar Dec 08 '25 11:12 Withalion

@IvaKuklica for testing #4165 #2615 #2725 #4221 #4237 feel free to use builds here:

2025.8.0

  • iOS: 25.12.834011
  • Android:

P.S: these include stuff until increased click area

Withalion avatar Dec 09 '25 08:12 Withalion

After agreement with others, let's do the following for the upcoming release:

  • cherry-pick elevation_diff variable
  • cherry-pick android 15 fix

tomasMizera avatar Dec 12 '25 15:12 tomasMizera

Some more context:

  • 2025.8.0 release will include just the two enhancements mentioned above
  • some release in early 2026 will include all the enhancements mentioned in this PR
  • few more changes were discussed to incorporate, that's why we moved this to later release

Withalion avatar Dec 12 '25 17:12 Withalion