Closed johannessen closed 6 months ago
Thanks for the report!
It seems like the waypoint latitude, in the case of your device, is left-padded with a 0xF instead. My device seems to use 0x0 as left-padding. The fix should handle 0xF now.
The HX870 puts fffffffff0
into the DSC address field for waypoints manually created in the device. But the UI for editing waypoint coordinates on the device itself is a bit masochistic … most people would probably use YCE15 instead, which fills the DSC address with ffffffffff
. The latter behaviour is consistent with how ff
is generally used as padding and as marker for missing data on the device.
I did mention this briefly in https://johannessen.github.io/hx870/#wpt-def, but reading that again now, I agree it isn't very clear at all. 🙂
I propose a slightly different fix here. See the commit comment.
Thanks! I've addressed this in follow-ups 523115e and e1b520b
It seems that the position decoding subroutine doesn’t account for the fact that degrees of latitude only have two digits.
On the
hx870
branch, given the following waypoint definition in the HX870 device:Expected output: 001WPT (1, 4300) 11° 06.0000’ N 10° 00.6000’ E
Actual output: 001WPT (1, 4300) NaN° 06.0000’ N 10° 00.6000’ E