Update gps-info.js

Sum up number of GPS and Beidou satellites in view.
pull/1167/head
Hilmar Strauch 2021-12-24 12:42:25 +01:00 committed by GitHub
parent 3615d7fe4c
commit d76a89b89a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -109,8 +109,13 @@ function onGPS(fix) {
}
function onGPSraw(nmea) {
var nofBD = 0;
var nofGP = 0;
if (nmea.slice(3,6) == "GSV") {
SATinView = nmea.slice(11,13);
// console.log(nmea);
if (nmea.slice(0,7) == "$BDGSV,") nofBD = nmea.slice(11,13);
if (nmea.slice(0,7) == "$GPGSV,") nofGP = nmea.slice(11,13);
SATinView = nofBD + nofGP;
}
}