From 6b201ceb7f26f556ad15bb971e082daaa79b04a6 Mon Sep 17 00:00:00 2001 From: Pavel Machek Date: Fri, 16 Aug 2024 21:31:28 +0200 Subject: [PATCH] sixths: simplify climb/descent display, scalable altitude warnings. --- apps/sixths/sixths.app.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/sixths/sixths.app.js b/apps/sixths/sixths.app.js index 138a1b5c2..160847020 100644 --- a/apps/sixths/sixths.app.js +++ b/apps/sixths/sixths.app.js @@ -323,6 +323,10 @@ function gpsHandle() { msg = ""; if (Math.abs(fix.alt - cur_altitude) > 20) msg += "!"; + if (Math.abs(fix.alt - cur_altitude) > 80) + msg += "!"; + if (Math.abs(fix.alt - cur_altitude) > 320) + msg += "!"; msg += fmt.fmtSpeed(fix.speed); if (!last_fstart) @@ -738,8 +742,8 @@ function walkHandle() { base_alt = ext_alt; ext_alt = cur; } - - msg += fmt.fmtAlt(cur-base_alt) + fmt.fmtAlt(tot_down) + fmt.fmtAlt(tot_up); + + msg += " " + fmt.fmtAlt(tot_down-cur+base_alt) + " " + fmt.fmtAlt(tot_up+cur-base_alt); return msg + "\n"; }