localization
This commit is contained in:
@@ -80,9 +80,9 @@ void update() {
|
||||
WiFiClientSecure client;
|
||||
client.setInsecure();
|
||||
|
||||
// hexdb.io zuerst versuchen (bisherige Quelle) - aber mit kuerzerem
|
||||
// Timeout (3s statt 5s), damit ein kompletter Ausfall des Dienstes die
|
||||
// ADS-B-Abfrage nicht unnoetig lange blockiert, bevor der Fallback greift.
|
||||
// Try hexdb.io first (previous source) - but with a shorter
|
||||
// timeout (3s instead of 5s) so a complete service outage does not
|
||||
// block the ADS-B query unnecessarily long before the fallback kicks in.
|
||||
client.setTimeout(3000);
|
||||
String body;
|
||||
if (httpGetString(client, String("https://hexdb.io/api/v1/aircraft/") + hex, body)) {
|
||||
@@ -99,9 +99,9 @@ void update() {
|
||||
}
|
||||
}
|
||||
|
||||
// Fallback: hexdb.io war nicht erreichbar/lieferte kein Modell -
|
||||
// adsbdb.com als zweite, unabhaengige Quelle versuchen (andere API-Form,
|
||||
// aber inhaltlich aequivalent: Hersteller + Typ ueber den Hex-Code).
|
||||
// Fallback: hexdb.io was unreachable/did not deliver a model -
|
||||
// try adsbdb.com as a second, independent source (different API format,
|
||||
// but equivalent in content: manufacturer + type via the hex code).
|
||||
if (!result.model[0]) {
|
||||
client.setTimeout(4000);
|
||||
String body2;
|
||||
@@ -120,26 +120,25 @@ void update() {
|
||||
}
|
||||
}
|
||||
|
||||
// Flugroute (Start-/Zielflughafen) - jetzt ueber eine Kette aus DREI
|
||||
// unabhaengigen kostenlosen Quellen statt nur einer, absteigend nach in
|
||||
// Tests beobachteter Trefferquote sortiert. Vorher lieferte adsbdb.com
|
||||
// allein in ca. 80% der Faelle "unknown" (siehe Alex' Feedback) - die
|
||||
// drei Quellen speisen sich aus unterschiedlichen, ueberlappenden aber
|
||||
// nicht identischen Community-Datenbanken, daher deutlich bessere
|
||||
// Gesamtabdeckung durch Verketten:
|
||||
// 1. VRS-Standing-Data-Mirror (adsb.lol) - stuendlich aktualisierter
|
||||
// Spiegel des Virtual-Radar-Server-Projekts, in Tests die mit
|
||||
// Abstand zuverlaessigste Quelle. Pfad = erste 2 Zeichen des
|
||||
// (GROSSGESCHRIEBENEN - der Dienst ist case-sensitiv) Rufzeichens
|
||||
// als Ordner, liefert "airport_codes":"ORIG-DEST" (ICAO).
|
||||
// 2. hexdb.io - eigener Route-Endpunkt (andere URL als der
|
||||
// Aircraft-Endpunkt weiter oben), liefert "route":"ORIG-DEST".
|
||||
// 3. adsbdb.com Callsign-Endpunkt - bisherige einzige Quelle, bleibt
|
||||
// als letzter Fallback, da sie gelegentlich Daten hat, die die
|
||||
// anderen beiden nicht haben.
|
||||
// Nur versuchen, wenn ueberhaupt ein Rufzeichen bekannt ist -
|
||||
// Sichtflug-Maschinen ohne Callsign haben ohnehin keine darueber
|
||||
// auswertbare Route.
|
||||
// Flight route (origin/destination airport) - now via a chain of THREE
|
||||
// independent free sources instead of just one, sorted descending by
|
||||
// observed hit rate in testing. Previously adsbdb.com alone returned
|
||||
// "unknown" in about 80% of cases (see Alex' feedback) - the
|
||||
// three sources draw from different, overlapping but
|
||||
// not identical community databases, therefore much better
|
||||
// overall coverage through chaining:
|
||||
// 1. VRS-Standing-Data-Mirror (adsb.lol) - hourly updated
|
||||
// mirror of the Virtual Radar Server project, by far the most
|
||||
// reliable source in testing. Path = first 2 characters of the
|
||||
// (UPPERCASE - the service is case-sensitive) callsign
|
||||
// as folder, returns "airport_codes":"ORIG-DEST" (ICAO).
|
||||
// 2. hexdb.io - own route endpoint (different URL from the
|
||||
// aircraft endpoint above), returns "route":"ORIG-DEST".
|
||||
// 3. adsbdb.com callsign endpoint - previous single source, remains
|
||||
// as last fallback since it occasionally has data that the
|
||||
// other two do not.
|
||||
// Only try if a callsign is known at all -
|
||||
// VFR aircraft without a callsign do not have an evaluable route anyway.
|
||||
String trimmedCallsign = String(callsign);
|
||||
trimmedCallsign.trim();
|
||||
trimmedCallsign.toUpperCase();
|
||||
@@ -165,7 +164,7 @@ void update() {
|
||||
}
|
||||
}
|
||||
|
||||
// 2. hexdb.io Route-Endpunkt, falls Quelle 1 nichts geliefert hat.
|
||||
// 2. hexdb.io route endpoint, if source 1 did not deliver anything.
|
||||
if (!result.routeOrigin[0] || !result.routeDest[0]) {
|
||||
client.setTimeout(3000);
|
||||
String body4;
|
||||
@@ -179,7 +178,7 @@ void update() {
|
||||
}
|
||||
}
|
||||
|
||||
// 3. adsbdb.com Callsign-Endpunkt als letzter Fallback.
|
||||
// 3. adsbdb.com callsign endpoint as last fallback.
|
||||
if (trimmedCallsign.length() > 0 && (!result.routeOrigin[0] || !result.routeDest[0])) {
|
||||
client.setTimeout(4000);
|
||||
String body5;
|
||||
|
||||
Reference in New Issue
Block a user