pull/1/head
bert hubert 2019-08-02 11:13:36 +02:00
parent 7619731067
commit 5f559da18b
4 changed files with 14946 additions and 0 deletions

2
html/d3.v4.min.js vendored 100644

File diff suppressed because one or more lines are too long

121
html/doalles.js 100644
View File

@ -0,0 +1,121 @@
var repeat;
function maketable(str, arr)
{
var table=d3.select(str);
table.html("");
var thead=table.append("thead");
var tbody=table.append("tbody");
var rows=tbody.selectAll("tr").
data(arr).
enter().
append("tr");
var columns = ["sv", "iod", "eph-age-m", "sisa", "e1bhs", "e1bdvs", "e5bhs", "e5bdvs", "a0", "a1", "elev", "calc-elev", "db", "last-seen-s"];
// append the header row
thead.append("tr")
.selectAll("th")
.data(columns)
.enter()
.append("th")
.text(function(column) { return column; });
var cells = rows.selectAll("td").
data(function(row) {
return columns.map(function(column) {
var ret={};
ret.column = column;
ret.color="white";
if(column == "eph-age-m") {
var b = moment.duration(row[column], 'm');
ret.value = b.humanize();
}
else if(column == "last-seen-s") {
var b = moment.duration(row[column], 's');
ret.value = b.humanize();
}
else if(column == "calc-elev")
ret.value = row[column].toFixed(1);
else if(column == "e1bdvs" || column =="e5bdvs") {
if(row[column] == 0)
ret.value = "valid";
else if(row[column] == 1)
ret.value = "working no guarantee"
}
else if(column == "e1bhs" || column =="e5bhs") {
if(row[column] == 0)
ret.value = "ok";
else if(row[column] == 1)
ret.value = "out of service"
else if(row[column] == 2)
ret.value = "will be out of service"
else if(row[column] == 3) {
ret.color="orange";
ret.value = "test"
}
}
else {
ret.value= row[column];
}
if(column == "eph-age-m" && row[column] > 30 && row["last-seen-s"] < 120)
ret.color="orange";
if(column == "sisa" && parseInt(row[column]) > 312)
ret.color="#ffaaaa";
if(column == "sisa" && row[column]=="NO SIS AVAILABLE")
ret.color="#ff2222";
return ret;
})
})
.enter().append("td").text(function(d) { return d.value; }).attr("align", "right").style("background-color", function(d) {
return d.color;
});
}
var sats={};
function update()
{
var seconds = 2;
clearTimeout(repeat);
repeat=setTimeout(update, 1000.0*seconds);
d3.json("svs", function(d) {
// put data in an array
sats=d;
var arr=[];
Object.keys(d).forEach(function(e) {
var o = d[e];
o.sv=e;
arr.push(o);
});
// sort it on SV
arr.sort(function(a, b) {
if(Number(a.sv) < Number(b.sv))
return -1;
if(Number(b.sv) < Number(a.sv))
return 1;
return 0;
});
var livearr=[], stalearr=[];
for(n = 0 ; n < arr.length; n++)
{
if(arr[n]["last-seen-s"] < 120)
livearr.push(arr[n]);
else
stalearr.push(arr[n]);
}
maketable("#svs", livearr);
maketable("#svsstale", stalearr);
});
}
repeat=update();

File diff suppressed because it is too large Load Diff

58
html/index.html 100644
View File

@ -0,0 +1,58 @@
<!DOCTYPE html>
<meta charset="utf-8">
<style>
text {
font: 12px sans-serif;
}
th, td {
padding-left: 8px;
padding-right: 8px;
padding-top: 1px;
padding-bottom: 1px;
font-family: monospace;
}
tr:nth-child(even) {background: #CCC}
tr:nth-child(odd) {background: #FFF}
</style>
<body>
Live:<br/>
<table id="svs"></table>
<hr>
Stale:<br/>
<table id="svsstale"></table>
<p>
This table shows live output from a Galileo receiver hosted in Nootdorp, The Netherlands.
It is very much a work in progress, and will not be available at all times. Extremely rough code is on
<a href="https://github.com/ahuPowerDNS/galmon">GitHub</a>.
Some technical detail behind this setup can be found in <a href="https://ds9a.nl/articles/posts/galileo-notes/">this post</a>.
For updates, follow <a href="https://twitter.com/GalileoSats">@GalileoSats</a> on Twitter.
The meaning of the fields is as follows:
<table>
<tr valign="top"><td>sv</td><td>Satellite Vehicle, an identifier for a Galileo satellite. Not the actual name of the satellite, other satellites could take over this number in case of failures</td></tr>
<tr valign="top"><td>iod</td><td>Issue of Data. Satellites periodically get sent updates on their orbit &amp; other details, each update has a new IOD number. It is coincidence that all SVs currently receive the same IOD numbers, this is by no means guaranteed. Currently however, if an SV has a lower IOD, it has not received new updates recently.</td></tr>
<tr valign="top"><td>ephagem</td><td>Age of ephemeris in minutes. Denotes how old the current set of orbit data is. Could be very old if SV is out of sight (see below). An acceptable limit is 4 hours (240 minutes).</td></tr>
<tr valign="top"><td>sisa</td><td>Signal In Space Accuracy, how well the position of an SV is known.</td></tr>
<tr valign="top"><td>e1bhs, e1bdvs, e5bhs, e5bdvs</td><td>Health flags for E1 (common) and E5 (uncommon) frequencies.</td></tr>
<tr valign="top"><td>a0, a1</td><td>Offset of the Galileo Standard Time to UTC. a0 is (more or less) the offset in nanoseconds, a1 is a measure of the rate of change</td></tr>
<tr valign="top"><td>elev</td><td>Elevation of an SV over my horizon (90 is straight up), reported by receiver</td></tr>
<tr valign="top"><td>calc-elev</td><td>Elevation of an SV over or under my horizon (90 is straight up), calculated by this website</td></tr>
<tr valign="top"><td>db</td><td>A measure of signal to noise ratio (in unknown units, 40 is good)</td></tr>
<tr valign="top"><td>lastseens</td><td>Number of seconds since we've last received from this SV. A satellite can be out of sight for a long time</td></tr>
</table>
</p>
<p>
The official Galileo constellation status can be found on the <a href="https://www.gsc-europa.eu/system-status/Constellation-Information">European GNSS Service Centre page</a>, which also lists "NAGUs", <a href="https://www.gsc-europa.eu/system-status/user-notifications">notifications about outages or changes</a>.
</p>
<p>
Feedback is very welcome on bert@hubertnet.nl or <a href="https://twitter.com/PowerDNS_Bert">@PowerDNS_Bert</a>.
<script src="d3.v4.min.js"></script>
<script src="ext/moment-with-locales.js"></script>
<script src="doalles.js"></script>
</body>
</html>