Code Mainly Generated by Github Copilot, Reviewed by BG5FNA
A Rust-based command-line tool for decoding BOTAN satellite CW (Continuous Wave) beacon messages into detailed telemetry information.
You may find binaries of your OS system on release page, or you could build it from source. Here is how to build the tool from source.
- Rust (version 1.70 or later)
- Clone or download the project
- Navigate to the project directory
- Build the project:
cargo build --releaseThe executable will be created at target/release/botan_decoder (or botan_decoder.exe on Windows). Run the binary and you're ready to go.
The BOTAN CW beacon follows this structure:
BOTAN JS1YPT [RSSI] <16-hex-digits>
- BOTAN: Satellite identifier
- JS1YPT: Call sign
- [RSSI]: Optional signal information (format:
SI+ 4 hex digits) - <16-hex-digits>: 8-byte telemetry data in hexadecimal format
Upperclass is not a must.
Basic beacon:
BOTAN JS1YPT A67C8D5E2AA13608
Beacon with RSSI:
BOTAN JS1YPT SI8640 A67C8D5E2AA13608
The program will prompt you to enter beacon messages:
BOTAN Satellite Beacon Decoder
==============================
This decoder processes BOTAN satellite beacon messages.
Expected format: BOTAN JS1YPT (Optional<RSSI>) <16-hex-digit-data>
Example: BOTAN JS1YPT SI8640 A67C8D5E2AA13608
Enter BOTAN beacon to decode (or 'quit' to exit):
Enter BOTAN beacon to decode (or 'quit' to exit): BOTAN JS1YPT A67C8D5E2AA13608
BOTAN Satellite Beacon Data
==========================
Satellite: BOTAN
Call Sign: JS1YPT
Signal Information (lack definition):
--------------
Unknown argument 1: N/A
Unknown argument 2: N/A
Telemetry Data:
--------------
Battery Voltage: 4.280 V
Battery Current: 124.8 mA
Battery Temperature: 20.6 °C
Board Temperature: 38.6 °C
Current Consumption: 226.4 mA
Power System Status:
5V Power Line: ON
Antenna Deployment: OFF
Transponder: ON
Solar Panels:
+X: OFF | +Y: OFF | -Y: OFF | +Z: OFF | -Z: ON
Command Status:
Reserved Commands: 3
Uplink Commands: 3
KILL Switch: OFF
Mission Status:
KILL Counter: 0
Mission PIC: OFF
Mission Error: NO
Mission End: YES
APRS Mission: INACTIVE
Current Mission: None
You could find the official BOTAN CW beacon format specification here.
To be honest I have no idea about the exact definition of the part. There is no related info on the web, so I just converted them to decimal lol.
The decoder converts raw hex bytes to engineering units using these formulas:
- Battery Voltage:
Value × 0.025781(Volts) - Battery Current:
Value × (-50.045) + 6330.4(mA) - Battery Temperature: Complex thermistor formula (°C)
- Board Temperature: Temperature sensor formula (°C)
- Current Consumption:
Value × 51.84 - 1950.9(mA)
Shows the operational status of various satellite subsystems:
- 5V Power Line: Main 5V power rail status
- Antenna Deployment: Antenna deployment system power
- Transponder: Communication system power status
- Solar Panels: Individual solar panel power generation status (+X, +Y, -Y, +Z, -Z orientations)
Tracks command operations:
- Reserved Commands: Counter for internal/reserved command operations (3-bit counter)
- Uplink Commands: Counter for commands received from ground stations (3-bit counter)
- KILL Switch: Emergency shutdown switch status
Mission and operational flags:
- KILL Counter: Number of times the KILL switch was activated (2-bit counter)
- Mission PIC: Mission processor status
- Mission Error: Error flag for mission operations
- Mission End: Whether the current mission has completed
- APRS Mission: APRS (Automatic Packet Reporting System) mission status
- Current Mission: Active mission type
00(0): None01(1): Earth observation10(2): Sun observation11(3): Unknown/Reserved
The decoder provides specific error messages for common issues:
- Invalid Format: Wrong number of arguments or incorrect structure
- Invalid Satellite Name: Must be exactly "BOTAN"
- Invalid Call Sign: Must be exactly "JS1YPT"
- Invalid RSSI Format: RSSI must start with "SI" followed by 4 hex digits
- Invalid Data Length: Telemetry data must be exactly 16 hex characters (8 bytes)
- Invalid Hex Characters: All telemetry data must be valid hexadecimal
- Math Calculation Errors: Handles edge cases in temperature calculations
The decoder implements the official BOTAN CW beacon format specification located in the /definition folder:
definition.md: Complete format specification with conversion formulasimg1.pngthroughimg6.png: Original specification images
The specification defines the exact structure, byte meanings, bitfield layouts, and conversion formulas used by this decoder.
cargo testbotan_decoder/
├── src/
│ ├── main.rs # Main CLI application and legacy morse decoder
│ ├── botan_parser.rs # BOTAN beacon parsing and telemetry conversion
│ └── custom_definitions.rs # Legacy morse code definitions
├── definition/ # BOTAN beacon format specification
│ ├── definition.md # Format specification (derived from images)
│ └── img*.png # Original specification images
├── Cargo.toml # Rust project configuration
└── README.md # This file
- BotanBeaconData: Main data structure for parsed beacon information
- BotanTelemetry: Telemetry sensor values and calculated engineering units
- Data1Flags, Data2Flags, Data3Flags: Bitfield structures for system status
- parse_botan_beacon(): Main parsing function with validation and error handling
- parse_telemetry_bytes(): Converts raw hex bytes to engineering units
For issues related to:
- BOTAN satellite operations: Contact the BOTAN satellite team
- Beacon format specification: Refer to
/definition/definition.mdand original site - Decoder software bugs: Create an issue in the project repository
Github Copilot
Who generated the code and wrote the README.
BOTAN Develop Team
Thank you for your great work :)
My Friends
I'm so glad to meet all my friends who gives me support.