From 87fde7ea1a38c9023e9d900ca579c9ac8c0b1a91 Mon Sep 17 00:00:00 2001 From: nousian <37895471+nousian@users.noreply.github.com> Date: Thu, 2 Jan 2020 17:33:37 +0200 Subject: [PATCH] Update doalles.js - added color coding added color coding to indicate large best-tle-dist -values. Bright red for 10000+ km and light red for 1000+ km. --- html/doalles.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/html/doalles.js b/html/doalles.js index 45e096c..0f3a46d 100644 --- a/html/doalles.js +++ b/html/doalles.js @@ -88,18 +88,22 @@ function maketable(str, arr) ret.value=""; } else if(row[column] != null && (column == "delta_hz_corr" || column =="delta_hz")) { - ret.value = row[column]; } else if((column == "tle-dist")) { - if(row["best-tle-dist"] != null) + if(row["best-tle-dist"] != null) { ret.value = row["best-tle-dist"].toFixed(1) + " km"; + + if (Math.abs(row["best-tle-dist"]) > 10000) + ret.color="red"; + else if (Math.abs(row["best-tle-dist"]) > 1000) + ret.color="#ffaaaa"; + } } else if((column == "alma-dist")) { if(row["alma-dist"] != null) ret.value = row["alma-dist"].toFixed(1) + " km"; } - else if(column == "norad") { ret.value = row["best-tle-norad"]; }