AndroidTacticalAssaultKit-CIV
AndroidTacticalAssaultKit-CIV copied to clipboard
No way to override heading when using external GPS via Bluetooth
Hi team,
I am using an external GPS and sending NMEA to ATAK via Bluetooth. The messages that matter in this case are RMC and GGA, which are made into respective packets and then combined to create a valid GPS CoT.
While the lat/lng, speed, and altitude are all represented correctly, including the fidelity of the signal (in my case "Estimated" as it is a dead reckoning system), the heading always defaults to the device's compass. That is to say, even if I am sending a NMEA with a course over ground of 150 degrees explicitly, ATAK will only show the marker with a heading of the onboard compass.
Looking into the code, it seems like there is a flag that could correct this- useOnlyGpsBearing
https://github.com/deptofdefense/AndroidTacticalAssaultKit-CIV/blob/22d11cba15dd5cfe385c0d0790670bc7e9ab7df4/atak/ATAK/app/src/main/java/com/atakmap/android/location/LocationMapComponent.java#L657
But it would appear that this is just set to false and there is no UI option to switch this flag. Am I correct in assuming that this is the missing piece that I would need? If so, are there any plans to allow for this preference to be set, or a workaround that you can suggest?
Thanks in advance
The logic maintains that gps is only used when the calculated speed is over private final static double GPS_BEARING_SPEED = 0.44704 * 5; // 1.0mph * 5 as described in LocationMapComponent.
The following preference referenced in your post is only used by plugins or pushed via a datapackage and there is no user side mechanism to set it.