Intelligent pointing‑model management for Astro‑Physics mounts, as a plugin for N.I.N.A. (Nighttime Imaging 'N' Astronomy).
The plugin scans your folder of Astro‑Physics .pnt pointing‑model files, analyses each
model's sky coverage, and provides sequencer instructions that automatically select and
load the best model for the current target — or fall back to a default — through APCC
(Astro‑Physics Command Center) over the ASCOM CommandString interface.
- Author: Brian Valente
- License: MPL‑2.0
- NINA: 3.0.0.9001 or newer
- Current release: v2.0.0.0.24 — see Release Notes.txt
- N.I.N.A. 3.x
- An Astro‑Physics mount connected in NINA via the AP ASCOM driver
- APCC running with the ASCOM
CommandStringvirtual port available - Your
.pntmodel files on disk (defaultC:\ProgramData\Astro-Physics\APCC\Models\)
- Model database — recursively scans the model folder for
.pntfiles and parses each model's metadata and declination / hour‑angle coverage. - Folder monitoring — a
FileSystemWatcherplus a configurable polling timer keep the database in sync as models are added, changed, or removed. - Smart automatic matching — picks the best model for a target declination using a "straddle" rule plus several configurable criteria (see below).
- Sequencer instructions for loading models, configuring model options, and more.
- Test harness in the options page to preview which model would be selected for a given declination, with a verbose per‑model breakdown.
| Instruction | What it does |
|---|---|
| AP Load Model | Loads a model via APCC. Modes: Manual, Automatic, Default All‑Sky, Use Current, Skip‑to‑Instructions, Disabled. Contains nested failure instructions that run if loading fails. |
| AP Load Model Simple | Same loading modes, without the failure‑instruction container. |
| AP Set Model Options | Enables/disables Pointing Correction, Tracking‑Rate Correction, and Dec‑Arc Tracking. |
| AP Set Horizon Limit | Enables or disables APCC horizon limits. |
| AP Get Current Model | Reads the currently loaded model path from APCC. |
| AP Set Default AllSky Model | Sets the plugin's default all‑sky model to the model currently loaded in APCC. |
| AP Set Load Model Mode | Sets the mode of all AP Load Model instructions in the same target container. |
| AP Model Refresh | Runs nested instructions if the default all‑sky model is older than a threshold. |
For each .pnt file the plugin records the creation date, total map points, site
latitude/elevation and other metadata, and the set of covered declination lines
(declination values that have at least two points).
A model is valid for a target declination when all basic criteria hold:
- Age ≤ Model Expiration Days
- Total points ≥ Min Point Count
- At least Min Matching Lines covered dec lines fall within Target Dec Tolerance° of the target
- Straddle: at least one covered dec line is strictly above and one strictly below the target (within tolerance)
Optional extended criteria can additionally require a matching APPM version, mount type, mount firmware, user name, site location, telescope description, site latitude, or site elevation (latitude/elevation use their own tolerances).
Among valid models the best is chosen by newest first, then most matching dec lines, then most points.
| Setting | Default | Purpose |
|---|---|---|
| Model Base Path | C:\ProgramData\Astro-Physics\APCC\Models\ |
Root folder scanned for .pnt files |
| Model Expiration Days | 365 | Models older than this are excluded |
| Target Dec Tolerance (°) | 2 | How close a dec line must be to count as a match |
| Min Matching Lines | 2 | Minimum matching dec lines required |
| Min Point Count | 20 | Minimum total map points |
| Auto‑scan on startup | on | Scan the database when NINA starts |
| Folder check interval (sec) | 30 | How often the folder monitor polls for changes |
| Default All‑Sky Model | — | Fallback model when no match is found |
| Extended criteria | off | Optional per‑field matching (mount, site, etc.) |
Requires the .NET 8 SDK on Windows.
dotnet build APCCModelManagerV2/APCCModelManagerV2.sln -c ReleaseThe plugin assembly is produced at
APCCModelManagerV2/APCCModelManagerV2/bin/Release/net8.0-windows/APCCModelManagerV2.dll.
To install, copy the build output into
%LOCALAPPDATA%\NINA\Plugins\3.0.0\APCCModelManagerV2\, or install the packaged .zip from
a GitHub Release through NINA's plugin manager.
A small xUnit project covers the pure matching logic in PointingModel:
dotnet test APCCModelManagerV2/Tests/APCCModelManagerV2.Tests.csprojAPCCModelManagerV2/— Visual Studio solution + plugin projectAPCCModelManagerV2/Tests/— unit tests for the matching logicCurrent Release Version/— packaged release.zipsRelease Notes.txt— changelogBACKLOG.md— planned / possible future workAP Model Manager Previous Versions/— historical build backups (not tracked in git)
main is kept at the latest shipped release (tagged vMAJOR.MINOR.PATCH.BUILD); development
happens on feature branches.