diff --git a/docs/programming/packets.mdx b/docs/programming/packets.mdx new file mode 100644 index 0000000..c0a7c09 --- /dev/null +++ b/docs/programming/packets.mdx @@ -0,0 +1,37 @@ +--- +title: Packets +--- + +# Telemetry Packet Format + +Packets are used to communicate between the rocket and the ground station. They convey information about the state of the rocket, alert the ground station of any updates, and enable the ground station to make adjustments to the rocket before launch. + +*Important Note*: Packets can only be sent to the rocket BEFORE launch, not AFTER. This is to comply with regulations. + +## Packets FROM ground software TO flight software + +|Header |Message Format | +|------------------------------------|-------------------| +|set_abort_level (To be implemented) |`Level: AbortLevel`| +|soft_abort (deprecated) | | +|undo_soft_abort (deprecated) | | +|progress | | +|solenoid_actuate |`valve_type: X,`
`valve_location: X,`
`actuation_type: X,`
`actuation_priority: X`| +|valve_request |`valve_type: X,`
`valve_location: X` | +|sensor_request |`sensor_type: X,`
`sensor_location: X` | + +## Packets FROM flight software TO ground software + +| Header | Message Format | +|--------------------------|---------------------------------------------------------------------------------------------------------------------------------| +| control_task_start | `task: stage \| pressure \| telemetry \| valve \| sensor` | +| stage_status | `stage: X`
`status: X` | +| abort_level | `level: AbortLevel` | +| abort_request_response | `successful: boolean
level: AbortLevel` | +| heartbeat | `timestamp: X` | +| sensor_data | `[type]: {`
  `[location]: {`
    `measured_value: X`
    `normalized_value: X`
    `status: X`
  `}`
`}` | +| abort_alert | `level: none \| soft \| hard`
`dangerous_sensors?: [`
  `type: X`
  `location: X`
  `normalized_value: X`
`]` | +| valve_actuation_response | `type: X`
`location: X`
`found: boolean`
`successful: boolean` | +| valve_request_response | `type: X`
`location: X`
`found: boolean`
`actuation_type?: X`
`actuation_priority?: X` | +| valve_data | `[type]: {`
  `[location]: {`
    `actuation_type: X`
    `actuation_priority: X`
  ` }`
`}` | +| valve_actuated | `type: X`
`location: X` |