A macOS application for telescope control, astrophotography, and polar alignment.
Hobby project — This software is provided as-is, with no warranty. Use at your own risk. The author assumes no responsibility for any damage to equipment or data loss resulting from use of this software. SW is in alpha state, but has been used successfully for deepsky astrophotography. Not every feature has been tested so expect bugs.
- Polar Alignment — Plate-solving assisted polar alignment workflow with simulated alignment mode for practice
- Framing & Sky Map — Interactive sky map with stereographic projection, DSS2 sky imagery tiles, deep-sky catalog (~14,000 objects from OpenNGC), altitude/visibility planning, and observation window filtering
- Camera Control — Live preview with configurable Bayer debayer (RGGB/BGGR/GRBG/GBRG), STF auto-stretch (Midtone Transfer Function), frame capture to FITS/TIFF with plate-solved RA/Dec coordinates (OBJCTRA/OBJCTDEC) written to the header when available, sensor cooling control, and star detection via CoreML and classical background-subtraction with sub-pixel centroid refinement
- Autoguiding — Guide camera control with calibration, guide loop, dithering, and guide graph
- Sequencer — Visual sequence builder with containers, conditions, triggers, and 30+ instruction types covering all connected devices. AI-assisted sequence building via the assistant
- AI Assistant — LLM-powered assistant with tool use for mount control, sky information, weather, catalog search, and device commands
- Full ASCOM/Alpaca Support — All 10 standard device types: Camera, Mount, Focuser, Filter Wheel, Rotator, Dome, Switch, Safety Monitor, Cover Calibrator, Observing Conditions
- ZWO ASI Cameras — Native USB support for ZWO ASI cameras via the ASI SDK (live view, capture, video mode SER recording)
- Canon DSLR / Mirrorless — Native USB support for Canon EOS cameras via the Canon EDSDK (live view, still capture, EVF video SER recording). Canon SDK is obtained separately — see Canon EDSDK below
- Mount Protocols — LX200 (serial & TCP) and ASCOM Alpaca
PolarStation
├── polar-core/ # Rust core library (plate solving, mount protocols, Alpaca clients)
│ └── UniFFI bindings # Auto-generated Swift bindings
├── PolarCore/ # Swift package wrapping the Rust static library
├── PolarAligner/ # Xcode project (historically named PolarAligner)
│ └── PolarAligner/ # Swift source
│ ├── App/ # AppState, entry point
│ ├── Views/ # SwiftUI views, sky map, settings
│ ├── Camera/ # Camera & filter wheel control
│ ├── Pipeline/ # Metal shaders (debayer, stretch, DSS)
│ ├── Devices/ # Alpaca device ViewModels
│ ├── Sequencer/ # Sequence engine, executors, UI
│ ├── Assistant/ # AI assistant with LLM tool use (Claude/OpenAI)
│ ├── Guiding/ # Autoguider
│ ├── Alignment/ # Polar alignment engine
│ └── Services/ # Mount, plate solve, weather, DSS tiles
├── StarDetector-Mac/ # CoreML star detection model project
└── build.sh # Complete build script
Note: The Xcode project is named
PolarAlignerfor historical reasons. The app builds and runs as PolarStation.
PolarStation is not notarized or signed with an Apple Developer certificate. macOS will block it on first launch with a "cannot be opened because it is from an unidentified developer" message.
To open it:
- Right-click (or Control-click)
PolarStation.app - Select Open from the context menu
- Click Open in the dialog that appears
You only need to do this once. After that, the app opens normally.
Alternatively, from Terminal:
xattr -d com.apple.quarantine /path/to/PolarStation.app- Single hardware config tested — developed and tested with ZWO ASI cameras (USB) and a ZWO AM5 mount via ASCOM Remote on Windows. Other Alpaca drivers and camera models may have quirks or require adjustments
- API keys stored in plaintext — Astrometry.net and LLM API keys are stored in
~/Library/Preferences/(macOS UserDefaults). Keychain storage requires a paid Apple Developer certificate; this is not planned until the app is properly signed - Star overlay rotation — when camera rotation is set in Settings, the live preview rotates correctly but star detection overlays are not compensated for the rotation. The plate-solved position itself is accurate; only the on-screen marker positions are affected during live view (not after a solve)
- No automatic updates — check the releases page manually for new versions
- macOS 14.0 (Sonoma) or later
- Apple Silicon (M1 or later)
- 16 GB RAM or more
- Xcode 15+ (for building from source)
- Rust toolchain (
rustup, stable, for building from source)
# Install Rust if needed
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Clone and build
git clone <repo-url>
cd PolarStation
./build.shThe build script:
- Builds the Rust core library (
polar-core) - Generates UniFFI Swift bindings
- Copies artifacts to the PolarCore Swift package
- Builds the Xcode project
The built app is located in Xcode's DerivedData directory.
| Crate | License | Purpose |
|---|---|---|
| uniffi | MPL-2.0 | Swift/Rust bindings generator |
| tetra3 | MIT/Apache-2.0 | Star pattern plate solver |
| nalgebra | Apache-2.0 | Linear algebra |
| ureq | MIT/Apache-2.0 | HTTP client (Alpaca API) |
| serialport | MPL-2.0 | Serial port (LX200) |
| thiserror | MIT/Apache-2.0 | Error handling |
| Package | License | Purpose |
|---|---|---|
| SwiftAA | MIT | Astronomical algorithms |
| SDK | License | Purpose |
|---|---|---|
| ZWO ASI Camera SDK | Proprietary (freely distributed) | ZWO ASI USB camera support |
| Canon EDSDK | Proprietary — not redistributable (see below) | Canon EOS USB camera support |
Canon's EOS SDK ("EDSDK") is proprietary software. Canon's license agreement prohibits redistribution of the SDK (headers, libraries, documentation) outside of end-user applications that you build yourself. For this reason, the EDSDK is not included in this repository.
If you want to use Canon USB cameras with PolarStation, you need to download the SDK from Canon directly:
-
Go to the Canon Developer Community (or your regional Canon developer portal) and register for a free developer account.
-
Accept the EDSDK License Agreement and download EDSDK for macOS (tested version: 13.20.10).
-
Unzip and copy the framework + headers into the repo before building:
# inside the unzipped EDSDK folder mkdir -p PolarAligner/Vendor/EDSDK cp -R Macintosh/Macintosh.dmg # or the already-mounted contents # end result should be: # PolarAligner/Vendor/EDSDK/EDSDK.framework/ # PolarAligner/Vendor/EDSDK/Header/EDSDK.h # PolarAligner/Vendor/EDSDK/Header/EDSDKTypes.h # PolarAligner/Vendor/EDSDK/Header/EDSDKErrors.h
-
Run
./build.sh.
The PolarAligner/Vendor/EDSDK/ directory is gitignored and will never be committed.
If you do not need Canon camera support, you can skip these steps — the build will still succeed because the Xcode project references the framework, but camera discovery simply won't list any Canon devices. (If the build fails without the SDK present, remove the EDSDK references from PolarAligner.xcodeproj/project.pbxproj or set FRAMEWORK_SEARCH_PATHS accordingly.)
Using pre-built releases: the binary in GitHub Releases embeds EDSDK.framework because end-user distribution of the compiled binary inside an application is permitted by the EDSDK license. The source repository itself does not redistribute it.
Canon, EOS, and EDSDK are trademarks of Canon Inc. PolarStation is not affiliated with, endorsed by, or sponsored by Canon Inc.
Sky map tiles are loaded on-demand from the STScI Digitized Sky Survey (DSS2) archive — not bundled with the app. Tiles are cached locally for offline use. The Digitized Sky Surveys were produced at the Space Telescope Science Institute under U.S. Government grant NAG W-2166. Images based on photographic data from the UK Schmidt Telescope and Palomar Observatory.
| Catalog | Entries | Content |
|---|---|---|
| OpenNGC | ~13,900 | NGC and IC deep-sky objects (CC BY-SA 4.0) |
| OpenNGC addendum | ~60 | Barnard, Caldwell, Sharpless, and other notable objects |
| Named Stars | ~460 | Bright stars with common names |
PolarStation uses two plate solving backends:
Built-in tetra3 geometric hash solver compiled into the app via the Rust core. Solves in under a second when stars are detected.
A star catalog database is required and is not bundled — generate it from within the app:
- Open Settings → Star Catalog
- Choose a star density (mag≤8 ~480 MB, mag≤9 ~1.5 GB, mag≤10 ~4 GB, mag≤11 ~8 GB)
- Click Download & Generate — the app downloads Gaia DR3 data from ESA and builds the pattern database
The catalog is stored in ~/Library/Application Support/PolarStation/ and persists across app updates. mag≤11 achieves the highest solve rate; mag≤9 is a reasonable default for most setups. Once generated, load it with the Load button.
PolarStation supports the Astrometry.net REST API as a fallback when the local solver fails. This works with:
- nova.astrometry.net — free cloud service, requires an account and API key. Solves are typically 30–120 seconds depending on server load. Sign up at nova.astrometry.net and find your API key in My Profile.
- Watney (local server) — run the same API locally on your Mac with no internet required.
Watney is a .NET-based plate solver that exposes the Astrometry.net-compatible REST API on localhost. A macOS binary is available on its releases page.
- Download the macOS release from github.com/Jusas/WatneyAstrometry/releases
- Download the Watney quad database (star catalog for Watney — separate download, a few GB)
- Edit
config.ymlto point at the catalog and set the HTTP port (default8080) - Start Watney:
./watney-solve-api - In PolarStation → Settings → Plate Solving: enable Use local server, set URL to
http://localhost:8080/api
No API key is needed for Watney. Solves are fast (seconds) since everything runs locally.
MIT License — see LICENSE for details.