Communication & Message Formats
This is a follow up to the 2022-2023 sys architecture. Page has been moved for clarity. All units are SI unless otherwise specified.
https://en.m.wikipedia.org/wiki/High-Level_Data_Link_Control
Usage for ZP-Jetson communication: ZP-Jetson Communication
Usage for ZP-IMACS communciation: TODO
Frame Structure
flag [ uint8_t ]
starting byte, to show that a new message has started
length [ uint16_t ]
length in bytes of the message
Includes length of all of the below fields
Type [ uint8_t ]
type of the message. This relates to one of the below Datatype Structs.
Indicates where the data came from and who its meant to go to
Info [ bytes ]
One of the packets below
CRC [uint32_t ]
4 byte CRC32 value
Datatype Structs.
[0] [SF → TM → Jetson] Odometry Data | ||
latitude | [double] | decimal degrees |
longitude | [double] | decimal degrees |
altitude | [float] | metres AGL |
climb rate | [float] | metres per second |
track | [float] | bearing (degrees) |
heading | [float] | bearing (degrees) |
airspeed | [float] | metres per second |
groundspeed | [float] | metres per second |
roll | [float] | degrees |
pitch | [float] | degrees |
yaw | [float] | degrees |
roll rate | [float] | degrees per second |
pitch rate | [float] | degrees per second |
yaw rate | [float] | degrees per second |
[1] [PM → SM → TM → Jetson] Movement Request | ||
request_id | [uint8_t] | integer {0,1,2} |
[2] [Jetson → TM → SM → PM] Relative Movement Command | ||
request_id | [uint8_t] | integer {0,1,2} |
x | [float] | metres |
y | [float] | metres |
z | [float] | metres |
heading | [float] | bearing (degrees) |
[3] [Jetson → TM → SM → PM] Landing Initiation Command | ||
request_id | [uint8_t] | integer {0,1,2} |
[4] [GSPC → TM → SM → PM] Waypoints | ||
waypoints | [Waypoint] | number of waypoints |
[4.5] Waypoint | ||
latitude | [double] | decimal degrees |
longitude | [double] | decimal degrees |
altitude | [double] | metres AGL |
waypoint_id | [uint8_t] | integer |
[5] [GSPC → TM → SM] Software Arm/Disarm | ||
arm | [bool] | boolean |
[6] [GSPC → TM → SM → AM] PID Values | ||
controller | [uint8_t] | integer index |
axis | [uint8_t] | integer index |
P | [double] | Proportional value |
I | [double] | Integer value |
D | [double] | Derivative value |
[7] [AM → SM → TM → GSPC] Ground Station Data | ||
Motor Outputs | [12][uint8_t] | 12 integers |
latitude | [double] | decimal degrees |
longitude | [double] | decimal degrees |
altitude | [float] | metres AGL |
climb rate | [float] | metres per second |
track | [float] | bearing (degrees) |
heading | [float] | bearing (degrees) |
airspeed | [float] | metres per second |
groundspeed | [float] | metres per second |
roll | [float] | degrees |
pitch | [float] | degrees |
yaw | [float] | degrees |
roll rate | [float] | degrees per second |
pitch rate | [float] | degrees per second |
yaw rate | [float] | degrees per second |
battery voltages | [13][uint8_t] | 1st val overall voltage 12 cells voltage voltage 0-200 where 0 is 3v and 200 is 5v |
controller values | [16][uint8_t] | 16 channels 0-100 |
[8][AM → SM → TM → GSPC] PID Set Response | ||
Controller Number | [uint8_t] | integer index |
P, I, D values | [6][3][uint8_t] | 6 channels, 3 values of PID’s |
[ 0 ] [ Sf → TM → Jetson ] Odometry Data
Latitude [double]
Longitude [double]
Altitude [float]
climb rate [float]
track [float]
heading [heading]
air speed [float]
ground speed [float]
roll [float]
pitch [float]
yaw [float]
roll rate [float]
pitch rate [float]
yaw rate [float]
[ 1 ] [ PM → SM → TM → Jetson ] MovementRequest
request [bool]
[ 2 ] [ Jetson → TM → SM → PM ] RelativeMovementCommand
x [float]
y [float]
z [float]
heading [float]
[ 3 ] [ Jetson → TM → SM → PM ] Landing initiation Command
empty
[ 4 ] [ GSPC → TM → SM → PM ] Waypoints
Num of valid waypoints
A max will have to be decided
Waypoint
latitude [double]
longitude [double]
altitude [double]
waypoint id [uint8_t]
[ 5 ] [ GSPC → TM → SM ] Software ARM/DISARM
arm [bool]
[ 6 ] [ GSPC → TM → SM → AM ] PID Values
controller [uint8_t]
axis [uint8_t]
P [double]
I [double]
D [double]
[ 7 ] [ AM → SM → TM → GSPC ] Ground Station Data
Motor Outputs [ uint8_t ] x 12
Latitude [double]
Longitude [double]
Altitude [float]
climb rate [float]
track [float]
heading [heading]
air speed [float]
ground speed [float]
roll [float]
pitch [float]
yaw [float]
roll rate [float]
pitch rate [float]
yaw rate [float]
Battery Voltages [uint8_t] x 13
Note: the first value is the overall voltage
The value is a value between 0 and 200 where 0 is 3V and 200 is 5V
Controller Values [uint8_t] x 16
[ 8 ] [ AM → SM → TM → GSPC ] PID Set Response
controller number [uint8_t]
for each of the 6 axis
P, I and D values