Skip to content

Changes to make cat control a bit more stable#15

Open
magicbug wants to merge 13 commits into
dl3jop:mainfrom
magicbug:main
Open

Changes to make cat control a bit more stable#15
magicbug wants to merge 13 commits into
dl3jop:mainfrom
magicbug:main

Conversation

@magicbug

Copy link
Copy Markdown

This pull request introduces significant improvements to ICOM radio support, especially for the IC-910, and enhances doppler tracking robustness and efficiency in QTrigdoppler.py. It adds adaptive frequency update logic, improves error handling and reconnection flows, and includes clarifications in the documentation for common user issues. Below are the most important changes:

ICOM Radio Handling and Robustness:

  • Added a radio_model parameter to the icom class and its initialization, allowing model-specific handling (notably for the IC-910) and improved serial connection error logging and timeouts (lib/icom.py, QTrigdoppler.py). [1] [2] [3]
  • Improved serial communication error handling in icom, including specific exceptions for connection and read errors, and more robust frame parsing (lib/icom.py).
  • Model-specific logic: PTT (Push-To-Talk) checks are now only performed for radios that support it (not the IC-910), preventing unnecessary delays and errors for the IC-910 (QTrigdoppler.py). [1] [2]

Doppler Tracking and Frequency Update Optimization:

  • Implemented adaptive frequency update thresholds and sleep intervals based on real-time doppler rate, optimizing for high-latitude passes and reducing radio overload, especially for the IC-910 (QTrigdoppler.py).
  • Added logic to restart doppler tracking after reconnection, improving recovery from communication failures (QTrigdoppler.py). [1] [2]

Error Handling and Logging:

  • Enhanced logging for serial connection attempts, error cases, and audio debugging, including reduced debug log frequency for audio levels (lib/icom.py, QTrigdoppler.py). [1] [2]
  • Improved error handling during ICOM reconnection cleanup, logging exceptions instead of silently passing (QTrigdoppler.py).

Documentation Updates:

  • Added explanations and user guidance for normal frequency calibration adjustments around TCA (Time of Closest Approach), and clarified that CI-V command failures during transmission on the IC-910 are expected and not problematic (help/getting-started.md, help/frequency-control.md, help/radio-configuration.md). [1] [2] [3]

These changes collectively improve the reliability, user experience, and maintainability of the doppler tracking system, especially for users with the IC-910 radio.

Pass radio model to icom class to enable model-specific behavior. Improve PTT status handling by skipping PTT checks for IC-910 radios, which do not support PTT status queries via CAT commands. Refactor doppler update logic to handle IC-910 and other radios appropriately.
Replaces deprecated 'inWaiting()' and 'flushInput()' methods with 'in_waiting' and 'reset_input_buffer()' to ensure compatibility with newer versions of pyserial.
Adds robust serial timeout and error handling to ICOM radio communication, including retries for setup commands and validation for frequency updates. Introduces doppler tracking worker restart logic after reconnection in QTrigdoppler, and improves logging and cleanup procedures for better reliability during communication failures.
Wrapped doppler calculation functions in try/except blocks to handle exceptions and cases where ephemdata.range_velocity is None. Added logging for warnings and errors to improve robustness and traceability, ensuring functions return fallback values when satellite data is unavailable or computation fails.
Introduces periodic and pre-update health checks for the ICOM radio in QTrigdoppler.py to improve robustness during satellite tracking. Adds check_radio_health and periodic_health_check methods to lib/icom.py, ensuring the radio is responsive before attempting frequency updates or after reconnection attempts. This helps prevent unresponsive radio issues from disrupting tracking operations.
Increase health check interval and add consecutive failure handling for radio tracking. Implement adaptive frequency update thresholds and intervals to prevent overwhelming the radio, especially for IC-910. Reduce frequency of audio level logging in both monitoring and recording, and add config option to control audio level logging in pass recorder. Minor improvements to radio health check timing.
Reduced minimum frequency update interval and refined adaptive thresholds and sleep durations for doppler rate handling, specifically optimized for high latitude scenarios (e.g., 57.63°N). These changes improve tracking responsiveness and radio safety during extreme doppler conditions.
Eliminated periodic and per-update radio health checks from QTrigdoppler.py and removed related methods from lib/icom.py to streamline frequency update logic. Updated help documentation to clarify expected minor frequency adjustments around TCA and normal CI-V command failures during transmission.
Copilot AI review requested due to automatic review settings October 19, 2025 20:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request improves the stability and robustness of ICOM radio control, particularly for the IC-910 model, through enhanced error handling, adaptive doppler tracking, and improved serial communication. The changes focus on making the cat control more stable by addressing timing issues, connection failures, and model-specific behaviors.

  • Added radio model awareness with IC-910-specific handling that skips unsupported PTT checks and implements adaptive frequency updates
  • Implemented comprehensive error handling and validation throughout satellite calculations and ICOM communication
  • Enhanced logging and debugging capabilities with configurable audio level logging and reduced frequency for performance

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
lib/sat_utils.py Added comprehensive error handling and null checks to all doppler calculation functions
lib/pass_recorder.py Made audio level logging configurable and reduced logging frequency from every second to every 10 seconds
lib/icom.py Enhanced serial communication with timeouts, retry logic, frequency validation, and IC-910-specific PTT handling
help/radio-configuration.md Added documentation explaining normal CI-V command failures during transmission on IC-910
help/getting-started.md Added guidance for normal frequency adjustments needed around TCA
help/frequency-control.md Added detailed explanation of TCA calibration adjustment requirements
QTrigdoppler.py Implemented adaptive doppler tracking with IC-910-specific logic, improved reconnection handling, and enhanced error recovery

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread lib/icom.py
Comment thread lib/icom.py Outdated
Corrects the message length check for validMsg from 5 to 6 bytes and removes duplicate FM mode handling in the setMode function.
Changed Peter's callsign from 2M0SQL to MM9SQL in the contributor list and modification notes for accuracy.
Added details about remote server integration, enhanced rotator control, comprehensive web API, advanced audio monitoring, extensive configuration management, and improved logging system to the README.
@dl3jop

dl3jop commented Feb 15, 2026

Copy link
Copy Markdown
Owner

Looks good despite one thing:
You disable PTT checking for the 910 in ff0c425#diff-a7b3aede6a8e57493e1e0f24406c7b9981ec61e9c07b7641c9ee128fa54aac48L2528 ?

I don't see the need for it. It'll brick packet mode. The 910 supports PTT readout

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.

3 participants