Skip to main content

Unified Celestron AUX Mount Simulator

Project description

Celestron AUX Mount Simulator (Unified)

This project provides a high-fidelity simulator for telescope mounts using the Celestron AUX binary protocol. It is designed for testing INDI drivers and planetarium software without requiring physical hardware.

It unifies several previous versions into a single, maintainable Python package.

Features

  • Protocol Support: Implementation of the Celestron AUX binary protocol (MC, HC, GPS, Focus, Power).
  • Physical Model: Realistic simulation of motion with backlash, periodic error (PE), cone error, and non-perpendicularity.
  • Atmospheric Refraction: Optional simulation of atmospheric refraction.
  • Modern TUI: Interactive Text User Interface built with Textual.
  • Web Console: 3D visualization of the mount using Three.js, including a schematic sky view.
  • Stellarium Support: Built-in server for Stellarium telescope control protocol.
  • Configurable: All parameters can be tuned via config.toml.

Installation

Requires Python 3.11+.

Minimal (for basic testing)

pip install .

With TUI support

pip install .[tui]

With Web Console support

pip install .[web]

Usage

After installation, you can run the simulator using the caux-sim command:

# Headless mode (minimal dependencies)
caux-sim -t

# TUI mode (requires 'tui' extra)
caux-sim

# Web mode (requires 'web' extra)
caux-sim --web

# Enable debug logging to file
caux-sim --debug-log --debug-log-file my_debug.log

Command Line Arguments

  • -t, --text: Use headless mode (no TUI).
  • -p PORT, --port PORT: AUX bus TCP port (default: 2000).
  • -s, --stellarium: Enable Stellarium TCP server.
  • --stellarium-port PORT: Stellarium TCP port (default: 10001).
  • --web: Enable 3D Web Console (default: http://127.0.0.1:8080).
  • --perfect: Disable all mechanical imperfections (backlash, PE, etc.).
  • -d, --debug: Enable debug logging to console.
  • --debug-log: Enable detailed debug logging to file.

Configuration

You can override default settings by creating a config.toml file in your current working directory, or by using the -c/--config command-line argument. The simulator loads config.default.toml from the package and then merges it with your specified or local config.toml.

Example config.toml:

[observer]
latitude = 50.0
longitude = 20.0

[logging]
level = "DEBUG"
file = "simulator.log"

Testing

The project includes a comprehensive test suite using pytest.

# Install development dependencies
pip install .[dev]

# Run tests
pytest

Integration Scanning

A scanner script is provided to verify the simulator's availability and protocol compliance by scanning the virtual bus.

# Start the simulator in one terminal
caux-sim

# Run the scanner
python3 tests/integration_scan.py

This will report all discovered devices (Motor Controllers, Hand Controller, GPS, etc.) and their firmware versions.

Architecture

The simulator consists of several components:

  1. NSE Telescope (nse_telescope.py): The core physics and protocol engine.
  2. NSE Simulator (nse_simulator.py): The networking layer and CLI entry point.
  3. NSE TUI (nse_tui.py): The Textual-based terminal interface.
  4. Web Console (web_console.py): The FastAPI/Three.js based 3D visualization.

Supported Devices

The simulator emulates the following Celestron AUX devices:

  • Main Board (0x01)
  • Hand Controller (0x04)
  • Azimuth Motor (0x10): Supports GOTO, SLEW, Sync, Cordwrap
  • Altitude Motor (0x11): Supports GOTO, SLEW, Sync
  • GPS (0xB0): Provides location and time data
  • Battery (0xB6): Reports voltage and status
  • Lights (0xBF): Control for mount lighting

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

caux_simulator-0.2.32.tar.gz (53.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

caux_simulator-0.2.32-py3-none-any.whl (58.6 kB view details)

Uploaded Python 3

File details

Details for the file caux_simulator-0.2.32.tar.gz.

File metadata

  • Download URL: caux_simulator-0.2.32.tar.gz
  • Upload date:
  • Size: 53.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for caux_simulator-0.2.32.tar.gz
Algorithm Hash digest
SHA256 6133c66269185221e7bbac1a7e66cbb2a449d2a9ed729d63ce6219366b3d4f2b
MD5 a7b8ab465fb663a7fc53d1d9daef9bd3
BLAKE2b-256 9bd4f9abb59faaacbc657d16cfe5425fb727de8895a6c41b6d9f94b78db595e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for caux_simulator-0.2.32.tar.gz:

Publisher: publish.yml on jochym/caux-simulator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file caux_simulator-0.2.32-py3-none-any.whl.

File metadata

File hashes

Hashes for caux_simulator-0.2.32-py3-none-any.whl
Algorithm Hash digest
SHA256 a97d7d2672db62d091295d76799a2f86deabdead9f048a81a1d0de48a67a6d92
MD5 f6f7f02769bc265551b3d9926b8d15e4
BLAKE2b-256 fe4d82d426d1a98122933ffcced679e129b7366659f4020acc9801d668ac4243

See more details on using hashes here.

Provenance

The following attestation bundles were made for caux_simulator-0.2.32-py3-none-any.whl:

Publisher: publish.yml on jochym/caux-simulator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page