From cd87342bd9c07dfc5da143cc927bbcdabcbb7705 Mon Sep 17 00:00:00 2001 From: Pavel Machek Date: Sun, 23 Jun 2024 14:43:35 +0200 Subject: [PATCH] [] skyspy: display N/E for a fix, too. --- apps/skyspy/skyspy.app.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/apps/skyspy/skyspy.app.js b/apps/skyspy/skyspy.app.js index ae1109fe8..7cfa5145a 100644 --- a/apps/skyspy/skyspy.app.js +++ b/apps/skyspy/skyspy.app.js @@ -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); }, };