|
Avionics
Core avionics package for CURE flight computers
|
Functions | |
| void | write_u32_be (std::uint8_t *dst, std::uint32_t v) |
| Write a 32-bit value in big-endian order to dst[0..3]. | |
| std::uint16_t | hz_to_period_ms (std::uint16_t hz) |
| Convert frequency (Hz) to period (ms), using integer math. | |
Variables | |
| constexpr std::size_t | kPacketCapacity = 120 |
| constexpr std::size_t | kSyncZeros = 3 |
| constexpr std::size_t | kU32Bytes = 4 |
| constexpr std::size_t | kStartByteIndex = kSyncZeros |
| constexpr std::size_t | kTimestampIndex = kStartByteIndex + 1 |
| constexpr std::size_t | kPacketCounterIndex = kTimestampIndex + kU32Bytes |
| constexpr std::size_t | kHeaderBytes = kSyncZeros + 1 + kU32Bytes + kU32Bytes |
| constexpr std::size_t | kEndMarkerBytes = kSyncZeros + 1 |
| constexpr std::uint8_t | kStartByteValue = 51 |
| constexpr std::uint8_t | kEndByteValue = 52 |
| constexpr std::size_t | kBytesIn32Bit = 4 |
| constexpr unsigned | kBitsPerByte = 8 |
| constexpr std::uint8_t | kAllOnesByte = 0xFF |
|
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 80 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 66 of file Telemetry.h.
|
constexpr |
Definition at line 57 of file Telemetry.h.
|
constexpr |
Definition at line 56 of file Telemetry.h.
|
constexpr |
32-bit helper constants
Definition at line 55 of file Telemetry.h.
|
constexpr |
End-of-packet marker byte value.
Definition at line 52 of file Telemetry.h.
|
constexpr |
End marker layout: 3 zeros followed by an end byte.
Definition at line 46 of file Telemetry.h.
|
constexpr |
Definition at line 43 of file Telemetry.h.
|
constexpr |
Maximum packet size (bytes). Must match your radio/modem configuration.
Definition at line 31 of file Telemetry.h.
|
constexpr |
Definition at line 42 of file Telemetry.h.
|
constexpr |
Header layout: [0..2]=0, [3]=START, [4..7]=timestamp (big-endian).
Definition at line 40 of file Telemetry.h.
|
constexpr |
Start-of-packet marker byte value.
Definition at line 49 of file Telemetry.h.
|
constexpr |
Header markers: 3 sync zeros followed by a start byte.
Definition at line 34 of file Telemetry.h.
|
constexpr |
Definition at line 41 of file Telemetry.h.
|
constexpr |
Number of bytes in a packed 32-bit value.
Definition at line 37 of file Telemetry.h.