Skip to content

bvalente22/APCCModelManagerV2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AP Model Manager (APCCModelManagerV2)

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.

Requirements

  • N.I.N.A. 3.x
  • An Astro‑Physics mount connected in NINA via the AP ASCOM driver
  • APCC running with the ASCOM CommandString virtual port available
  • Your .pnt model files on disk (default C:\ProgramData\Astro-Physics\APCC\Models\)

Features

  • Model database — recursively scans the model folder for .pnt files and parses each model's metadata and declination / hour‑angle coverage.
  • Folder monitoring — a FileSystemWatcher plus 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.

Sequencer instructions

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.

How automatic matching works

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:

  1. AgeModel Expiration Days
  2. Total pointsMin Point Count
  3. At least Min Matching Lines covered dec lines fall within Target Dec Tolerance° of the target
  4. 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.

Settings (plugin options page)

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.)

Build & install

Requires the .NET 8 SDK on Windows.

dotnet build APCCModelManagerV2/APCCModelManagerV2.sln -c Release

The 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.

Tests

A small xUnit project covers the pure matching logic in PointingModel:

dotnet test APCCModelManagerV2/Tests/APCCModelManagerV2.Tests.csproj

Repository layout

  • APCCModelManagerV2/ — Visual Studio solution + plugin project
  • APCCModelManagerV2/Tests/ — unit tests for the matching logic
  • Current Release Version/ — packaged release .zips
  • Release Notes.txt — changelog
  • BACKLOG.md — planned / possible future work
  • AP 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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages