1
0
Fork 0

clkinfogps fixes

master
Hugh Barney 2023-04-22 01:48:53 +01:00
parent f0e863dfcd
commit b673479736
2 changed files with 3 additions and 3 deletions

View File

@ -26,7 +26,7 @@
};
var onGPS = function(fix) {
console.log(fix);
//console.log(fix);
last_fix.time = fix.time;
// we got a fix
@ -55,7 +55,7 @@
if (!last_fix.fix)
return formatTime(last_fix.time);
return geo.gpsToOSMapRef(last_fix);
return geo.gpsToOSMapRef(last_fix.fix);
};
var info = {

View File

@ -123,6 +123,6 @@ exports.gpsToOSGrid = function(gps_fix) {
// string with an OS Map grid reference
exports.gpsToOSMapRef = function(gps_fix) {
let os = OsGridRef.latLongToOsGrid(last_fix);
let os = OsGridRef.latLongToOsGrid(gps_fix);
return to_map_ref(6, os.easting, os.northing);
}