Hello there,
My team owns and develops a Plugin for UE that heavily relies on GPS data and we encountered a strange behavior with a packed Android project that uses GPS with Unreal Engine 5.3.2.
We analyzed the circumstances where we cannot get precise GPS position data of an android device, taking into consideration the following topics:
- We know that you need to have GPS enabled on the device
- We know that there are several possibilities to get GPS data, but we need the best possible up to ~3 meters.
- We know that on android you need separate permissions depending on the desired precision.
- We know that weather (sun, clouds, rain, and even mist) can influence GPS precision.
- We know that it could take up to several minutes until you get a satellite “connection” to have a constantly updating GPS signal.
- We know that on UnrealEngine you need the “Mobile Location Services - Android Implementation” and “Mobile Location Services Blueprint Library” enabled
- We know that you need to build up a blueprint node system that checks for permissions, requests them, checks if location service is enabled, loops until its enabled by user, init location service, start location service, get location services implementation, bind to event OnLocationChanged, do something with the LocationServiceData
- We know that the “Init Location Services” blueprint node can be configured with the field accuracy, update frequency, and min distance filter
- We configured the project to use extra permissions
- Mobile data, Bluetooth, and WLAN could influence the GPS precision
- GPS accuracy may vary depending on the device used (hardware, manufacturer)
- Time could also be a factor i.E.: when there are not enough satellites around you
All of the above-listed topics are taken into consideration, but it looks like we don’t get fine GPS location data in the project.
We created an empty test project to verify that:
When starting the application on Android, you get asked what GPS precision level you want to use. That is working as seen on the image and selection works as well.
(Images in German, sorry for that)
Sadly, when selecting “precise” and continuing, there is no GPS icon in the menu bar which indicates that the GPS chip from the device is actually NOT actively used and searching for position data.
In the image you can also see that the permissions are granted.
Clarification: There are GPS (lon/lat) values available, but they are way off, and regardless of how much time passes, it does not get better. That indicates that COARSE_LOCATION, when not even an IP-based location is used.
We noticed a precision from 140 to 50 meters which is not accurate enough for our use-case.
Interesting side note: When you use another GPS app that actually uses the device’s GPS chip properly (with GPS icon in the menu bar) then the Android UnrealEngine project actually gets the data as well. But it is not working on its own.
The screenshots were created at the exact same real-world location, so it can not be that there are external influences explaining why the UnrealEngine Android app doesn’t get proper GPS data like other GPS apps.
Has anybody encountered a similar behavior and maybe can offer a solution?
More technical background information because this topic is not long enough:
Build Log:
Ue53GpsTestProject_build_log.txt (305.4 KB)
Device used for testing:
Project configuration screenshots:
If we missed some crucial information, please let us know.
And lastly, if anyone can share with us some way to contact UE’s technical support to report that, we’d highly appreciate it, we haven’t been able to reach them directly.
Thank you in advance.