|
| 1 | +# Data from flight comptuer: |
| 2 | + # Flight computer sensor data |
| 3 | + # Flight computer status |
| 4 | + # Flight computer valve/servo states |
| 5 | + |
| 6 | +# Data from CC: |
| 7 | + # CC passthrough sensor data |
| 8 | + # CC passthrough valve states |
| 9 | + # CC status data |
| 10 | + |
| 11 | +# Loggers: |
| 12 | + # Status Logger |
| 13 | + # Flight computer sensor logger |
| 14 | + # Flight computer valve/servo state logger |
| 15 | + |
| 16 | +# Flight Computer Sensors |
| 17 | + # 2x IMU - [accel x (2 bytes), accel y (2 bytes), accel z (2 bytes), gyro x (2 bytes), gyro y (2 bytes), gyro z (2 bytes)] - 12 bytes each |
| 18 | + # 2x Magnetometer - [mag x (2 bytes), mag y (2 bytes), mag z (2 bytes)] - 6 bytes each |
| 19 | + # 2x barometer - 3 bytes each (reads pressure) |
| 20 | + # 2x Temperature sensor - temperature (2 bytes) (one is on power board, one is on sensor board) |
| 21 | + # GPS - [latitude (4 bytes), longitude (4 bytes), altitude (4 bytes), velocity x (2 bytes), velocity y (2 bytes), velocity z (2 bytes), time (4 bytes)] - 22 bytes |
| 22 | + # ADC - 3 bytes per data point (max of 24 pressure sensors, 24 RTDs, 3 strain guages) |
| 23 | + |
| 24 | + # 3x current sensors - 2 bytes each |
| 25 | + |
| 26 | +# Flight computer valves/servos |
| 27 | + # 12 actuator outputs |
| 28 | + # 8 servo outputs |
| 29 | + |
| 30 | +# Downlink Packets (from FC to CC): |
| 31 | + |
| 32 | + # Sensor data packet: |
| 33 | + # 0x01 |
| 34 | + # <IMU 1 accel x (2 bytes)> |
| 35 | + # <IMU 1 accel y (2 bytes)> |
| 36 | + # <IMU 1 accel z (2 bytes)> |
| 37 | + # <IMU 1 gyro x (2 bytes)> |
| 38 | + # <IMU 1 gyro y (2 bytes)> |
| 39 | + # <IMU 1 gyro z (2 bytes)> |
| 40 | + # <IMU 2 accel x (2 bytes)> |
| 41 | + # <IMU 2 accel y (2 bytes)> |
| 42 | + # <IMU 2 accel z (2 bytes)> |
| 43 | + # <IMU 2 gyro x (2 bytes)> |
| 44 | + # <IMU 2 gyro y (2 bytes)> |
| 45 | + # <IMU 2 gyro z (2 bytes)> |
| 46 | + # <Magnetometer 1 mag x (2 bytes)> |
| 47 | + # <Magnetometer 1 mag y (2 bytes)> |
| 48 | + # <Magnetometer 1 mag z (2 bytes)> |
| 49 | + # <Magnetometer 2 mag x (2 bytes)> |
| 50 | + # <Magnetometer 2 mag y (2 bytes)> |
| 51 | + # <Magnetometer 2 mag z (2 bytes)> |
| 52 | + # <Barometer 1 pressure (3 bytes)> |
| 53 | + # <Barometer 2 pressure (3 bytes)> |
| 54 | + # <Temperature sensor 1 temperature (2 bytes)> |
| 55 | + # <Temperature sensor 2 temperature (2 bytes)> |
| 56 | + # <Current sensor 1 current (2 bytes)> |
| 57 | + # <Current sensor 2 current (2 bytes)> |
| 58 | + # <Current sensor 3 current (2 bytes)> |
| 59 | + |
| 60 | + # GPS data packet |
| 61 | + # 0x02 |
| 62 | + # <Latitude (4 bytes)> |
| 63 | + # <Longitude (4 bytes)> |
| 64 | + # <Altitude (4 bytes)> |
| 65 | + # <Velocity x (2 bytes)> |
| 66 | + # <Velocity y (2 bytes)> |
| 67 | + # <Velocity z (2 bytes)> |
| 68 | + # <Time (4 bytes)> |
| 69 | + |
| 70 | + # ADC data packet |
| 71 | + # 0x03 |
| 72 | + # <packet index (1 byte)> |
| 73 | + # <data point (3 bytes)> (repeat for each sensor in adc config for this packet index) |
| 74 | + |
| 75 | + # State packet |
| 76 | + # 0x04 |
| 77 | + # <valve state (1 bit)> (repeat for each valve in status protocol, pad to byte boundary) |
| 78 | + # <servo state (2 bytes)> (repeat for each servo in status protocol) |
| 79 | + |
| 80 | + # comm packet: |
| 81 | + # 0x05 |
| 82 | + # <ping id (2 bytes)> |
| 83 | + # <system mode (1 byte)> |
| 84 | + # <processor time (4 bytes)> (ms since startup) |
| 85 | + # <last command id (2 bytes)> |
| 86 | + # <last command status (1 byte)> |
| 87 | + # <message count (1 byte)> |
| 88 | + # <message 1 tag (1 byte)> (optional) (repeat for each desired message) |
| 89 | + |
| 90 | + # NOTE: After comm packet is sent over radio, FC is expected |
| 91 | + # The comm packet is expected every 100 ms, with 10 ms given for a response. |
| 92 | + |
| 93 | + # Command status values |
| 94 | + # 0x00 Command waiting |
| 95 | + # 0x01 Command in progress |
| 96 | + # 0x02 Command completed successfully |
| 97 | + # 0x03 Command failed due to invalid tag |
| 98 | + # 0x04 Command failed due to invalid arguments |
| 99 | + # 0x05 Command failed due to out of range arguments |
| 100 | + # 0x06 Command failed due to hardware error |
| 101 | + # 0x07 Command failed due to timeout |
| 102 | + # 0x08 Command failed due to invalid system state |
| 103 | + # 0x09 Command aborted by flight computer |
| 104 | + # 0x0A Command awaiting confirmation |
| 105 | + |
| 106 | +# Uplink Packets (from CC to FC): |
| 107 | + |
| 108 | + # comm packet: |
| 109 | + # 0x01 |
| 110 | + # <ping id (2 bytes)> |
| 111 | + # <system time (4 bytes)> (unix timestamp) |
| 112 | + # <command valid (1 byte)> (0 = invalid, 1 = valid) |
| 113 | + # <command id (2 bytes)> (optional, only if command valid = 1) |
| 114 | + # <command type (1 byte)> (optional, only if command valid = 1) |
| 115 | + # <command tag (1 byte)> (optional, only if command valid = 1) |
| 116 | + # <command arguments (pre-determined variable length)> (optional, only if command valid = 1) |
| 117 | + |
| 118 | + # Command types |
| 119 | + # 0x00 Static command |
| 120 | + # 0x01 Custom command |
| 121 | + |
| 122 | + # Static command tags and args |
| 123 | + |
| 124 | + # Change valve state |
| 125 | + # 0x00 |
| 126 | + # <valve id (1 byte)> |
| 127 | + # <new state (1 byte)> (0 = closed, 1 = open) |
| 128 | + |
| 129 | + # Pulse valve |
| 130 | + # 0x01 |
| 131 | + # <valve id (1 byte)> |
| 132 | + # <pulse duration (2 bytes)> (in milliseconds) |
| 133 | + |
| 134 | + # Change servo state |
| 135 | + # 0x02 |
| 136 | + # <servo id (1 byte)> |
| 137 | + # <new position (2 bytes)> |
| 138 | + |
| 139 | + # Pulse servo |
| 140 | + #0x03 |
| 141 | + # <servo id (1 byte)> |
| 142 | + # <new position (2 bytes)> |
| 143 | + # <pulse duration (2 bytes)> (in milliseconds) |
| 144 | + |
| 145 | + # Set sys mode |
| 146 | + # 0x04 |
| 147 | + # <new mode (1 byte)> |
| 148 | + |
| 149 | + # Set comm link |
| 150 | + # 0x05 |
| 151 | + # <new link (1 byte)> (0 = RS485, 1 = radio) |
| 152 | + |
| 153 | + # Sleep |
| 154 | + #0x04 |
| 155 | + |
| 156 | + # Wake |
| 157 | + # 0x05 |
| 158 | + |
| 159 | + # Restart (2 commands to confirm) |
| 160 | + #0x06 |
0 commit comments