Skip to content

Add 10micron Park Position Monitor#3

Open
d33psky wants to merge 2 commits intomasterfrom
feature/10micron-park-position-monitor
Open

Add 10micron Park Position Monitor#3
d33psky wants to merge 2 commits intomasterfrom
feature/10micron-park-position-monitor

Conversation

@d33psky
Copy link
Owner

@d33psky d33psky commented Aug 19, 2025

Summary

  • New monitoring system for 10micron mount parking position accuracy
  • Automatically detects and corrects position drift
  • Comprehensive monitoring with dual connection architecture (INDI + Mount API)

Key Features

  • Position Drift Detection: Compares actual vs expected park position with configurable tolerance
  • Automated Correction: First attempts INDI park command, then mount API as fallback
  • Ultra Precision Mode: Uses mount's #:U2# mode for high-precision coordinates
  • Persistent Connections: Long-lived TCP connections with threading for reliability
  • Comprehensive Logging: ISO8601 timestamped logs for all operations
  • Mattermost Alerting: Sends alerts when corrections fail

Implementation Details

  • Main loop runs every 60 seconds
  • Monitors both INDI server (192.168.100.14:7624) and Mount API (192.168.100.73:3490)
  • Handles coordinate parsing in HH:MM:SS.SS and +DD:MM:SS.SS formats
  • Uses existing Mattermost integration pattern from other observatory components
  • Configurable park position and drift tolerance via YAML

Test Results

✅ Successfully connects to both INDI and Mount API
✅ Ultra Precision Mode working - coordinates in HH:MM:SS format
✅ Position drift detection working with 0.126° tolerance
✅ Mattermost alerts working
✅ No datetime deprecation warnings

Current mount position: RA 18:32:46.55, DEC +40:04:55.3 (within tolerance)

🤖 Generated with Claude Code

d33psky and others added 2 commits August 19, 2025 10:38
- Monitors mount parking position accuracy and corrects drift
- Dual connection monitoring (INDI + mount API)
- Ultra precision coordinate parsing with #:U2# mode
- Automated correction via INDI first, then mount API
- Mattermost alerting when corrections fail
- 60-second monitoring loop with comprehensive logging
- Configurable park position and drift tolerance

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Replace RA/DEC monitoring with ALT/AZ coordinates to eliminate sidereal time drift
- Add mount API commands #:GA# and #:GZ# for altitude and azimuth
- Update configuration with actual park position: ALT 1.982°, AZ 359.747°
- Enhanced coordinate parsing for both ultra precision and fallback formats
- Improved logging with blank lines between monitoring cycles for readability
- AZ wraparound handling (0-360°) and sub-arcsecond precision detection

Test results: ALT drift 0.0001°, AZ drift 0.0009° - well within 1.0° tolerance

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@d33psky
Copy link
Owner Author

d33psky commented Aug 19, 2025

🔧 Fixed Sidereal Time Drift Issue

Problem Identified: The original implementation used RA/DEC coordinates which naturally drift with Earth's rotation (~1 minute per minute), causing false drift detection.

Solution Implemented: Switched to ALT/AZ coordinates which are fixed to the local horizon and remain constant when mount is parked.

Updated Implementation:

  • Mount API Commands: Now uses #:GA# (altitude) and #:GZ# (azimuth)
  • Configuration: Updated with actual park position (ALT: 1.982°, AZ: 359.747°)
  • Ultra Precision: Parsing coordinates in DD:MM:SS.SS format
  • Enhanced Logging: Added blank lines between cycles for readability

📊 Test Results:

  • ALT drift: 0.0001° (0.36 arcseconds)
  • AZ drift: 0.0009° (3.2 arcseconds)
  • Total drift: 0.0009° - well within 1.0° tolerance

The program now correctly detects actual mechanical drift rather than normal celestial motion. Ready for production monitoring! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant