up
This commit is contained in:
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user