# SatMaster β€” F4BPO Satellite Tracker Amateur satellite tracking application with Doppler correction for FlexRadio 8600 and rotor control via PstRotator. **Stack:** Go + Wails v2 + Svelte **Platform:** Windows (primary), Linux/macOS (compilable) --- ## Features - πŸ—ΊοΈ **World map** β€” real-time satellite positions on NASA GIBS Blue Marble, footprint + groundtrack overlay, satellite SVG icon for tracked sat - πŸ“‘ **Polar plot** β€” az/el pass track with AOS/LOS markers, current position animation - πŸ• **Pass prediction** β€” 24h upcoming passes, Max El, duration, quality rating, single sat or full watchlist view - πŸ“» **Doppler correction** β€” automatic TX/RX frequency correction via FlexRadio 8600 TCP API, configurable RX/TX slices - πŸ”„ **Rotor control** β€” Az/El or Az-only commands to PstRotator via UDP XML protocol - πŸ›°οΈ **TLE management** β€” parallel fetch from Celestrak + PE0SAT, merged with deduplication, local cache fallback - πŸ”Š **AOS voice alerts** β€” Windows TTS announcement at AOS for all watchlist satellites, configurable voice - πŸ“‹ **Satellite frequency database** β€” 40+ satellites with nominal frequencies, auto-applied on selection - πŸ” **Watchlist** β€” persistent satellite selection with alphabetical sorting and duplicate prevention --- ## Architecture ``` SatMaster/ β”œβ”€β”€ main.go # Wails entry point β”œβ”€β”€ app.go # App struct, Wails bindings, position loop, tracking β”œβ”€β”€ wails.json # Wails project config β”‚ β”œβ”€β”€ backend/ β”‚ β”œβ”€β”€ tle/ β”‚ β”‚ └── manager.go # Parallel TLE fetch (Celestrak + PE0SAT), merge, cache, parse β”‚ β”‚ β”‚ β”œβ”€β”€ propagator/ β”‚ β”‚ └── engine.go # SGP4 propagation (akhenakh/sgp4), az/el, pass prediction β”‚ β”‚ β”‚ β”œβ”€β”€ doppler/ β”‚ β”‚ └── calculator.go # Doppler shift computation (range rate β†’ Hz correction) β”‚ β”‚ β”‚ β”œβ”€β”€ flexradio/ β”‚ β”‚ └── client.go # FlexRadio SmartSDR TCP API (port 4992) β”‚ β”‚ β”‚ └── rotor/ β”‚ └── pstrotator.go # PstRotator UDP XML protocol (port 12000) β”‚ └── frontend/src/ β”œβ”€β”€ App.svelte # Root layout, Wails events, AOS voice alert engine β”œβ”€β”€ stores/satstore.js # Svelte stores + localStorage persistence β”œβ”€β”€ lib/ β”‚ β”œβ”€β”€ wails.js # Wails Go call bridge + dev stubs β”‚ β”œβ”€β”€ utils.js # Formatting helpers (freq, az, el, range, etc.) β”‚ β”œβ”€β”€ satdb.js # Satellite frequency database (40+ sats) β”‚ └── maidenhead.js # Maidenhead locator ↔ lat/lon conversion └── components/ β”œβ”€β”€ StatusBar.svelte # Top bar: clock, sat data, Doppler, SOUND/DOPPLER/ROTATOR toggles β”œβ”€β”€ SatSelector.svelte # Left sidebar: watchlist, frequencies, track toggles, sat info β”œβ”€β”€ WorldMap.svelte # Leaflet map, sat markers, SVG icon, footprint, groundtrack β”œβ”€β”€ PolarPlot.svelte # SVG polar az/el plot β”œβ”€β”€ PassesPanel.svelte # Pass list + detail + embedded polar plot └── SettingsPanel.svelte # QTH, FlexRadio, PstRotator, slices, voice alerts, TLE ``` --- ## Prerequisites ```bash # Go 1.21+ # Node.js 18+ # Wails v2 go install github.com/wailsapp/wails/v2/cmd/wails@latest # Verify wails doctor ``` --- ## Setup & Build ```bash # 1. Clone / copy project cd SatMaster # 2. Download Go dependencies go mod tidy # 3. Install frontend deps cd frontend && npm install && cd .. # 4. Development mode (hot reload) wails dev # 5. Production build (single .exe) wails build # β†’ build/bin/SatMaster.exe ``` --- ## FlexRadio 8600 β€” Protocol Notes SatMaster uses the SmartSDR **TCP API** on port **4992**. Commands sent: ``` slice t 0 145.800000 # Set RX slice frequency (MHz) slice t 1 145.200000 # Set TX slice frequency (MHz) slice s 0 mode=FM # Set slice mode ``` - Connect: Settings β†’ FlexRadio β†’ enter IP β†’ Connect - RX slice (downlink) defaults to Slice A (index 0), TX to Slice B (index 1) - Configurable in Settings β†’ FlexRadio β†’ Satellite Slices - Doppler correction fires every second during active tracking - Dead-band: 1 Hz β€” updates only sent when shift exceeds threshold - Track Freq/Mode button is disabled if satellite has no known frequencies --- ## PstRotator β€” Protocol Notes SatMaster sends **UDP XML** to PstRotator on port **12000** (default). ```xml 180 18045 ``` - Configure in PstRotator: Setup β†’ UDP Server β†’ Port 12000 - Az-only or Az+El mode configurable in Settings β†’ PstRotator β†’ Rotor Mode - Dead-band: 5Β° Az and El to prevent rotor hunting - Elevation clamped to [0Β°, 90Β°] β€” no negative elevation commands sent - `ResetDeadband()` called when Track Azimuth is enabled to force immediate move --- ## TLE Data - **Primary source:** `https://celestrak.org/NORAD/elements/gp.php?GROUP=amateur&FORMAT=tle` - **Secondary source:** `http://tle.pe0sat.nl/kepler/amateur.txt` - Both sources fetched **in parallel** and merged β€” Celestrak takes priority on duplicates, PE0SAT contributes satellites not present in Celestrak - **Cache:** `%LOCALAPPDATA%\SatMaster\satmaster_tle_cache.txt` (Windows) - **Bundled fallback:** ISS, AO-7, AO-27, SO-50, FO-29, RS-44 (always available offline) - TLE age shown in status bar; use Settings β†’ TLE Data β†’ Refresh TLE to force update --- ## Pass Prediction - Step: 10s (30s when satellite below -15Β° elevation) - AOS/LOS bisection precision: 1 second - Horizon: passes below configured Min El are filtered from the list - 24-hour prediction window - Passes panel: single satellite view or full watchlist view --- ## Doppler Formula ``` f_corrected_down = f_nominal Γ— (1 - v_range / c) f_corrected_up = f_nominal / (1 - v_range / c) where: v_range = range rate in km/s (+ = receding, - = approaching) c = 299792.458 km/s ``` Range rate is computed by finite difference (2-second interval) on the SGP4 position. --- ## AOS Voice Alerts SatMaster announces AOS for all watchlist satellites using Windows TTS (Web Speech API). - Announcement format: *"AOS [satellite name] is rising. Pass will last for X minutes."* - Toggle: StatusBar β†’ πŸ”Š SOUND ON/OFF - Voice selection: Settings β†’ Voice Alerts β†’ TTS Voice dropdown - Recommended voices: **Microsoft David** or **Microsoft Zira** (English) - To install English voices: Windows Settings β†’ Time & Language β†’ Speech β†’ Add voices β†’ English (United States) --- ## Keyboard Shortcuts | Key | Action | |-----|--------| | `M` | Switch to Map tab | | `P` | Switch to Passes tab | | `S` | Switch to Settings tab | --- ## Satellite Frequency Database Built-in frequency database (`frontend/src/lib/satdb.js`) covers 40+ satellites including: | Satellite | Type | Downlink | Uplink | |-----------|------|----------|--------| | ISS | FM | 437.800 MHz | 145.990 MHz | | SO-50 | FM | 436.795 MHz | 145.850 MHz | | AO-91 | FM | 145.960 MHz | 435.250 MHz | | RS-44 | Linear | 435.640 MHz | 145.965 MHz | | AO-73 | Linear | 145.960 MHz | 435.140 MHz | | FO-29 | Linear | 435.850 MHz | 145.950 MHz | | QO-100 | Linear | 10489.750 MHz | 2400.250 MHz | | TEVEL2-1…9 | FM | 436.400 MHz | 145.970 MHz | | … | … | … | … | Frequencies are auto-applied when a satellite is selected. Multiple frequency entries per satellite are supported (e.g. ISS has FM voice + APRS). --- ## Future Enhancements - [ ] Multiple satellite tracking (split-screen polar) - [ ] Audio squelch mute between passes - [ ] Log4OM integration for contact logging - [ ] Export pass schedule to CSV/PDF - [ ] Linux/macOS rotor backend