diff --git a/src/App.jsx b/src/App.jsx index 6e23e5f3..07bd54f3 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -320,7 +320,7 @@ const App = () => { const propagation = usePropagation(config.location, dxLocation, config.propagation); const mySpots = useMySpots(config.callsign); - const satellites = useSatellites(config.location); + const satellites = useSatellites(config.location, config.satellite); const localWeather = useWeather(config.location, config.allUnits); const dxWeather = useWeather(dxLocation, config.allUnits); const localAlerts = useWeatherAlerts(config.location); diff --git a/src/components/SettingsPanel.jsx b/src/components/SettingsPanel.jsx index ef63adb3..40ff2a53 100644 --- a/src/components/SettingsPanel.jsx +++ b/src/components/SettingsPanel.jsx @@ -47,8 +47,10 @@ export const SettingsPanel = ({ const [swapHeaderClocks, setSwapHeaderClocks] = useState(config?.swapHeaderClocks || false); const [showMutualReception, setShowMutualReception] = useState(config?.showMutualReception ?? true); const [gridSquare, setGridSquare] = useState(config?.locator || ''); - const [lat, setLat] = useState(config?.location?.lat ?? 0); - const [lon, setLon] = useState(config?.location?.lon ?? 0); + const [lat, setLat] = useState(config?.location?.lat || 0); + const [lon, setLon] = useState(config?.location?.lon || 0); + const [stationAlt, setStationAlt] = useState(config?.location?.stationAlt || 100); + const [minElev, setMinElev] = useState(config?.satellite?.minElev || 5.0); const [layout, setLayout] = useState(config?.layout || 'modern'); const [mouseZoom, setMouseZoom] = useState(config?.mouseZoom || 50); const [timezone, setTimezone] = useState(config?.timezone || ''); @@ -177,8 +179,10 @@ export const SettingsPanel = ({ if (config) { setCallsign(config.callsign || ''); setheaderSize(config.headerSize || 1.0); - setLat(config.location?.lat ?? 0); - setLon(config.location?.lon ?? 0); + setLat(config.location?.lat || 0); + setLon(config.location?.lon || 0); + setStationAlt(config.location?.stationAlt || 100); + setMinElev(config.satellite?.minElev || 5.0); setLayout(config.layout || 'modern'); setMouseZoom(config.mouseZoom || 50); setTimezone(config.timezone || ''); @@ -419,7 +423,8 @@ export const SettingsPanel = ({ headerSize: headerSize, swapHeaderClocks, showMutualReception, - location: { lat: parseFloat(lat), lon: parseFloat(lon) }, + location: { lat: parseFloat(lat) || 0, lon: parseFloat(lon) || 0, stationAlt: parseInt(stationAlt) || 100 }, + satellite: { minElev: parseFloat(minElev) || 5.0 }, theme, customTheme, layout, @@ -3360,6 +3365,75 @@ export const SettingsPanel = ({ Footprints + + {/* station altitude and minimum elevation inputs */} +