From 20625720ff9542972b28fb04a77d46bd6fad9f05 Mon Sep 17 00:00:00 2001 From: thesourcerer8 Date: Thu, 28 Jul 2022 22:10:41 +0200 Subject: [PATCH] Trying to add column descriptions This code should add title attributes, so that you get an explanation of the column when you hover over it with the mouse. I haven't tested it yet, please test and add explanations --- html/almanac.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/html/almanac.js b/html/almanac.js index bd90e93..d20a3c8 100644 --- a/html/almanac.js +++ b/html/almanac.js @@ -15,6 +15,28 @@ function maketable(str, arr) append("tr"); var columns = ["sv", "best-tle", "best-tle-dist", "best-tle-norad", "best-tle-int-desig", "eph-ecefX", "eph-ecefY", "eph-ecefZ", "tle-ecefX", "tle-ecefY", "tle-ecefZ", "eph-latitude", "eph-longitude", "tle-latitude", "tle-longitude", "tle-eciX", "tle-eciY", "tle-eciZ", "t0e", "t", "E", "M0"]; + var columndescriptions = {"sv":"Satellite Vehicle, an identifier for a satellite, other satellis could take over this number in case of failures", + "best-tle": "From TLE database, closest satellite to the reported position", + "best-tle-dist": "Distance to the closest satellite to the reported position", + "best-tle-norad": "?", + "best-tle-int-desig": "?", + "eph-ecefX": "?", + "eph-ecefY": "?", + "eph-ecefZ": "?", + "tle-ecefX": "?", + "tle-ecefY": "?", + "tle-ecefZ": "?", + "eph-latitude": "Latitute of the ephemeris", + "eph-longitude": "Longitude of the ephemeris", + "tle-latitude": "?", + "tle-longitude": "?", + "tle-eciX": "?", + "tle-eciY": "?", + "tle-eciZ": "?", + "t0e":"?", + "t":"?", + "E":"?", + "M0":"?"}; // append the header row thead.append("tr") @@ -22,6 +44,7 @@ function maketable(str, arr) .data(columns) .enter() .append("th") + .attr("title",columndescriptions[column]) .text(function(column) { if(column == "delta_hz_corr") return "ΔHz";