up
This commit is contained in:
@@ -77,6 +77,16 @@ export function pathBetween(fromGrid: string, toGrid: string): PathInfo | null {
|
||||
const a = gridToLatLon(fromGrid);
|
||||
const b = gridToLatLon(toGrid);
|
||||
if (!a || !b) return null;
|
||||
return pathBetweenLatLon(a, b);
|
||||
}
|
||||
|
||||
// pathBetweenLatLon computes the great-circle path between two lat/lon points.
|
||||
// Used as a fallback when a station has a known location (e.g. cty.dat entity
|
||||
// coordinates for Svalbard) but no Maidenhead grid.
|
||||
export function pathBetweenLatLon(
|
||||
a: { lat: number; lon: number },
|
||||
b: { lat: number; lon: number },
|
||||
): PathInfo {
|
||||
const φ1 = toRad(a.lat);
|
||||
const φ2 = toRad(b.lat);
|
||||
const Δλ = toRad(b.lon - a.lon);
|
||||
|
||||
Reference in New Issue
Block a user