SiteLat / SiteLon take priority over receiver.json

this is more logical probably
might create other issues with MLAT because people set this instead of
the decoder coordinates but oh well
This commit is contained in:
Matthias Wirth
2025-01-21 17:55:35 +00:00
parent 53084e9683
commit 589b0e3823

View File

@@ -712,13 +712,10 @@ function initialize() {
trace_hist_only = true;
if (receiverJson.json_trace_interval < 2)
traces_high_res = true;
if (receiverJson.lat != null) {
if (receiverJson.lat != null && (SiteLat == null || SiteLon == null)) {
//console.log("receiver.json lat: " + receiverJson.lat)
SiteLat = receiverJson.lat;
SiteLon = receiverJson.lon;
SitePosition = [SiteLon, SiteLat];
DefaultCenterLat = receiverJson.lat;
DefaultCenterLon = receiverJson.lon;
}
if (receiverJson.jaeroTimeout) {
jaeroTimeout = receiverJson.jaeroTimeout * 60;
@@ -730,6 +727,13 @@ function initialize() {
altitudeFilter = false;
}
}
if (SiteLat && SiteLon) {
SitePosition = [SiteLon, SiteLat];
DefaultCenterLat = SiteLat;
DefaultCenterLon = SiteLon;
}
configureReceiver = null;
// Initialize stuff