Add fallback locations for join zones.

It's rare with the current 5NM buffer around the origin, but if we use
the hold distance as the buffer like we maybe should it's possible for
the preferred join locations to fall entirely within the home zone. In
that case, fall back to a location within the max-turn-zone that's
outside the home zone and is nearest the IP.
This commit is contained in:
Dan Albert
2021-07-18 14:41:22 -07:00
parent 2580fe6b79
commit e22e8669e1
4 changed files with 59 additions and 32 deletions

View File

@@ -1066,7 +1066,14 @@ function drawJoinZones() {
}).addTo(joinZones);
}
for (const line of game.joinZones.permissibleLines) {
for (const zone of game.joinZones.permissibleZones) {
L.polygon(zone, {
color: Colors.Green,
interactive: false,
}).addTo(joinZones);
}
for (const line of game.joinZones.preferredLines) {
L.polyline(line, {
color: Colors.Green,
interactive: false,
@@ -1114,6 +1121,13 @@ function drawHoldZones() {
interactive: false,
}).addTo(holdZones);
}
for (const line of game.holdZones.preferredLines) {
L.polyline(line, {
color: Colors.Green,
interactive: false,
}).addTo(holdZones);
}
}
function drawInitialMap() {