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..d086974e 100644 --- a/src/components/SettingsPanel.jsx +++ b/src/components/SettingsPanel.jsx @@ -49,6 +49,8 @@ export const SettingsPanel = ({ const [gridSquare, setGridSquare] = useState(config?.locator || ''); 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 || ''); @@ -179,6 +181,8 @@ export const SettingsPanel = ({ setheaderSize(config.headerSize || 1.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: isNaN(parseFloat(minElev)) ? 5.0 : parseFloat(minElev) }, theme, customTheme, layout, @@ -3360,6 +3365,79 @@ export const SettingsPanel = ({ Footprints + + {/* station altitude and minimum elevation inputs */} +
+
+ + + setStationAlt(isNaN(e.target.valueAsNumber) ? 100 : e.target.valueAsNumber) + } + style={{ + width: '100%', + padding: '10px', + background: 'var(--bg-tertiary)', + border: '1px solid var(--border-color)', + borderRadius: '6px', + color: 'var(--text-primary)', + fontSize: '14px', + fontFamily: 'JetBrains Mono, monospace', + boxSizing: 'border-box', + }} + /> +
+
+ + setMinElev(isNaN(e.target.valueAsNumber) ? 5.0 : e.target.valueAsNumber)} + style={{ + width: '100%', + padding: '10px', + background: 'var(--bg-tertiary)', + border: '1px solid var(--border-color)', + borderRadius: '6px', + color: 'var(--text-primary)', + fontSize: '14px', + fontFamily: 'JetBrains Mono, monospace', + boxSizing: 'border-box', + }} + /> +
+
+ {/* Lead Time Slider WIP