forked from FOSS/BangleApps
clkinfogps fixes
parent
f0e863dfcd
commit
b673479736
|
@ -26,7 +26,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
var onGPS = function(fix) {
|
var onGPS = function(fix) {
|
||||||
console.log(fix);
|
//console.log(fix);
|
||||||
last_fix.time = fix.time;
|
last_fix.time = fix.time;
|
||||||
|
|
||||||
// we got a fix
|
// we got a fix
|
||||||
|
@ -55,7 +55,7 @@
|
||||||
if (!last_fix.fix)
|
if (!last_fix.fix)
|
||||||
return formatTime(last_fix.time);
|
return formatTime(last_fix.time);
|
||||||
|
|
||||||
return geo.gpsToOSMapRef(last_fix);
|
return geo.gpsToOSMapRef(last_fix.fix);
|
||||||
};
|
};
|
||||||
|
|
||||||
var info = {
|
var info = {
|
||||||
|
|
|
@ -123,6 +123,6 @@ exports.gpsToOSGrid = function(gps_fix) {
|
||||||
|
|
||||||
// string with an OS Map grid reference
|
// string with an OS Map grid reference
|
||||||
exports.gpsToOSMapRef = function(gps_fix) {
|
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);
|
return to_map_ref(6, os.easting, os.northing);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue