This commit is contained in:
2026-06-07 12:50:04 +02:00
parent eb64b8f2f9
commit 9189f54df5
7 changed files with 126 additions and 9 deletions
+9 -2
View File
@@ -68,7 +68,7 @@ import {
Select, SelectTrigger, SelectValue, SelectContent, SelectItem,
} from '@/components/ui/select';
import { cn } from '@/lib/utils';
import { pathBetween } from '@/lib/maidenhead';
import { pathBetween, pathBetweenLatLon, gridToLatLon } from '@/lib/maidenhead';
import { flagURL } from '@/lib/flags';
type QSO = QSOForm;
@@ -1890,7 +1890,14 @@ export default function App() {
both directly clickable, plus an always-visible Stop. The
old Shift/Ctrl shortcuts were not discoverable enough. */}
{(() => {
const p = pathBetween(station.my_grid, grid);
// Prefer grid-to-grid; fall back to lat/lon when the DX has no
// grid but a known location (e.g. cty.dat-only entities like
// Svalbard → no QRZ grid, but cty.dat gives coordinates).
const myLL = gridToLatLon(station.my_grid);
const p = pathBetween(station.my_grid, grid)
?? (myLL && details.lat != null && details.lon != null
? pathBetweenLatLon(myLL, { lat: details.lat, lon: details.lon })
: null);
const disabled = !p;
const goto = (az: number) => RotatorGoTo(Math.round(az), -1).catch((err) => setError(String(err?.message ?? err)));
return (