|
Avionics
Core avionics package for CURE flight computers
|
Functions | |
| void | writeU32Be (std::uint8_t *dst, std::uint32_t v) |
| Write a 32-bit value in big-endian order to dst[0..3]. | |
| std::uint16_t | hzToPeriod_ms (std::uint16_t frequency_hz) |
| Convert frequency (Hz) to period (ms), using integer math. | |
Variables | |
| constexpr std::size_t | kPacketCapacity_bytes = 120 |
| constexpr std::size_t | kSyncZeroCount_bytes = 3 |
| constexpr std::size_t | kBytesInU32_bytes = 4 |
| constexpr std::size_t | kStartByteIndex = kSyncZeroCount_bytes |
| constexpr std::size_t | kTimestampIndex = kStartByteIndex + 1 |
| constexpr std::size_t | kPacketCounterIndex = kTimestampIndex + kBytesInU32_bytes |
| constexpr std::size_t | kHeaderSize_bytes = kSyncZeroCount_bytes + 1 + kBytesInU32_bytes + kBytesInU32_bytes |
| constexpr std::size_t | kEndMarkerSize_bytes = kSyncZeroCount_bytes + 1 |
| constexpr std::uint8_t | kStartByteValue = 51 |
| constexpr std::uint8_t | kEndByteValue = 52 |
| constexpr unsigned | kBitsPerByte_bits = 8 |
| constexpr std::uint32_t | kCommandModeInactivityTimeout_ms = 10000 |
| constexpr std::size_t | kCommandEntrySequenceLength = 3 |
| constexpr char | kCommandEntryChar = 'c' |
|
inline |
Convert frequency (Hz) to period (ms), using integer math.
Uses ceil(1000 / Hz). If Hz == 0, returns 1000ms as a safe fallback.
Definition at line 82 of file Telemetry.h.
|
inline |
Write a 32-bit value in big-endian order to dst[0..3].
Assumptions used by float packing.
Definition at line 68 of file Telemetry.h.
|
constexpr |
32-bit helper constants
Definition at line 56 of file Telemetry.h.
|
constexpr |
Number of bytes in a packed 32-bit value.
Definition at line 38 of file Telemetry.h.
|
constexpr |
Definition at line 59 of file Telemetry.h.
|
constexpr |
Definition at line 58 of file Telemetry.h.
|
constexpr |
Definition at line 57 of file Telemetry.h.
|
constexpr |
End-of-packet marker byte value.
Definition at line 53 of file Telemetry.h.
|
constexpr |
End marker layout: 3 zeros followed by an end byte.
Definition at line 47 of file Telemetry.h.
|
constexpr |
Definition at line 44 of file Telemetry.h.
|
constexpr |
Maximum packet size (bytes). Must match your radio/modem configuration.
Definition at line 32 of file Telemetry.h.
|
constexpr |
Definition at line 43 of file Telemetry.h.
|
constexpr |
Header layout: [0..2]=0, [3]=START, [4..7]=timestamp (big-endian).
Definition at line 41 of file Telemetry.h.
|
constexpr |
Start-of-packet marker byte value.
Definition at line 50 of file Telemetry.h.
|
constexpr |
Header markers: 3 sync zeros followed by a start byte.
Definition at line 35 of file Telemetry.h.
|
constexpr |
Definition at line 42 of file Telemetry.h.