You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The $GPGSV is long time standard but I've never seen $GNGGA before. $G?GGA contains the UTC time in the first field.
I'm not sure if this applies to the hardware of Bangle.js version 2 but there is some evidence:
https://ava.upuaut.net/?p=768
"Side note on the Ublox 8 series GPGGA is replaced by GNGGA by default to indicate the navigation information is from multiple GNSS sources (I.e American GPS and Russian GLONASS normally)."
The event Bangle.GPS with Call type: Bangle.on('GPS', function(fix) { ... });
provides a "fix" object with contains "time": Date, // Current Time (or undefined if not known)"
It seems to me that the parser which fills fix.time does only look for "GPGGA" and always returns "undefined" on Bangle.js2, even in the GPS fix state.
This leads to a crash in the GPS Info App:
The function formatTime(fix.time) in gps-info.js crashes in toUTCString() if fix.time contains "undefined".
Workaround:
function formatTime(now) {
if (now == undefined) { return "no GPS time available"; }
else {
var fd = now.toUTCString().split(" ");
var time = fd[4].substr(0, 5);
var date = [fd[0], fd[1], fd[2]].join(" ");
return time + " - " + date; }
}
-> Probably all Apps that rely on fix.time will not work on Bangle.js2
The text was updated successfully, but these errors were encountered:
Pull request created: #1167
The PR also contains an improvement: "The 4-dot progress indicator is replaced by the number of satellites in view."
HilmarSt
changed the title
App crash on Bangle.js 2 with GPS NMEA telegram GNGGA instead of GPGGA (contains UTC time)
App crash on Bangle.js 2 related to GPS time
Dec 27, 2021
Eventually GPS time is not usable on Bangle.js 2
On my Bangle.js 2 there are 2 cyclic NMEA telegrams, e.g.:
The $GPGSV is long time standard but I've never seen $GNGGA before. $G?GGA contains the UTC time in the first field.
I'm not sure if this applies to the hardware of Bangle.js version 2 but there is some evidence:
The event Bangle.GPS with Call type: Bangle.on('GPS', function(fix) { ... });
provides a "fix" object with contains "time": Date, // Current Time (or undefined if not known)"
It seems to me that the parser which fills fix.time does only look for "GPGGA" and always returns "undefined" on Bangle.js2, even in the GPS fix state.
This leads to a crash in the GPS Info App:
The function formatTime(fix.time) in gps-info.js crashes in toUTCString() if fix.time contains "undefined".
Workaround:
-> Probably all Apps that rely on fix.time will not work on Bangle.js2
The text was updated successfully, but these errors were encountered: