[] skyspy: display N/E for a fix, too.

pull/3507/head
Pavel Machek 2024-06-23 14:43:35 +02:00
parent 1fa0c219e3
commit cd87342bd9
1 changed files with 13 additions and 1 deletions

View File

@ -46,7 +46,19 @@ let fmt = {
return "bad mode?";
},
fmtPos: function(pos) {
return this.fmtAngle(pos.lat) + "\n" + this.fmtAngle(pos.lon);
let x = pos.lat;
let c = "N";
if (x<0) {
c = "S";
x = -x;
}
let s = c+this.fmtAngle(pos.lat) + "\n";
c = "E";
if (x<0) {
c = "W";
x = -x;
}
return s + c + this.fmtAngle(pos.lon);
},
};