PSAS Packet Serializer¶
Contents
Data Structure¶
Message¶
A PSAS Message has a header with an ASCII four character code (e.g., ‘ADIS’) that identifies it. This is followed by a 6 byte timestamp in nanoseconds. This is always nanosecond since beginning of a program, which is usually the same as boot time for a device. This is followed by two bytes that give the size of the rest of the message. The remainder of the message is a collection of Data.
Data¶
Data can be almost anything, even other messages. Usually it’s a pre-defined set of fixed sized numbers
Message Definitions¶
These are all the message types pre-defined in psas_packet.messages.MESSAGES
ADIS¶
ADIS16405
Format Description:
Field | Type | Size [Bytes] |
VCC | uint16_t | 2 |
Gyro_X | int16_t | 2 |
Gyro_Y | int16_t | 2 |
Gyro_Z | int16_t | 2 |
Acc_X | int16_t | 2 |
Acc_Y | int16_t | 2 |
Acc_Z | int16_t | 2 |
Magn_X | int16_t | 2 |
Magn_Y | int16_t | 2 |
Magn_Z | int16_t | 2 |
Temp | int16_t | 2 |
Aux_ADC | uint16_t | 2 |
BMP1¶
Pressue
Format Description:
Field | Type | Size [Bytes] |
Pressure | uint32_t | 8 |
Temperature | uint16_t | 2 |
FCFH¶
FCFHealth
Format Description:
Field | Type | Size [Bytes] |
CPU_User | float | 4 |
CPU_System | float | 4 |
CPU_Nice | float | 4 |
CPU_IOWait | float | 4 |
CPU_IRQ | float | 4 |
CPU_SoftIRQ | float | 4 |
RAM_Used | uint64_t | 8 |
RAM_Buffer | uint64_t | 8 |
RAM_Cached | uint64_t | 8 |
PID | uint16_t | 2 |
Disk_Used | uint64_t | 8 |
Disk_Read | uint64_t | 8 |
Disk_Write | uint64_t | 8 |
IO_lo_Bytes_Sent | uint32_t | 8 |
IO_lo_Bytes_Recv | uint32_t | 8 |
IO_lo_Packets_Sent | uint32_t | 8 |
IO_lo_Packets_Recv | uint32_t | 8 |
IO_eth0_Bytes_Sent | uint32_t | 8 |
IO_eth0_Bytes_Recv | uint32_t | 8 |
IO_eth0_Packets_Sent | uint32_t | 8 |
IO_eth0_Packets_Recv | uint32_t | 8 |
IO_wlan0_Bytes_Sent | uint32_t | 8 |
IO_wlan0_Bytes_Recv | uint32_t | 8 |
IO_wlan0_Packets_Sent | uint32_t | 8 |
IO_wlan0_Packets_Recv | uint32_t | 8 |
Core_Temp | uint16_t | 2 |
GPS1¶
GPSFix
Format Description:
Field | Type | Size [Bytes] |
Age_Of_Diff | uint8_t | 1 |
Num_Of_Sats | uint8_t | 1 |
GPS_Week | uint16_t | 2 |
GPS_Time_Of_Week | double | 8 |
Latitude | double | 8 |
Longitude | double | 8 |
Height | float | 4 |
VNorth | float | 4 |
VEast | float | 4 |
VUp | float | 4 |
Std_Dev_Resid | float | 4 |
Nav_Mode | uint16_t | 2 |
Extended_Age_Of_Diff | uint16_t | 2 |
GPS2¶
GPSFixQuality
Format Description:
Field | Type | Size [Bytes] |
Mask_Sats_Tracked | uint32_t | 8 |
Mask_Sats_Used | uint32_t | 8 |
GPS_UTC_Diff | uint16_t | 2 |
HDOP | uint16_t | 2 |
VDOP | uint16_t | 2 |
Mask_WAAS_PRN | uint16_t | 2 |
GPS80¶
GPSWAASMessage
Format Description:
Field | Type | Size [Bytes] |
PRN | uint16_t | 2 |
Spare | uint16_t | 2 |
Msg_Sec_of_Week | uint32_t | 8 |
Waas_Msg | char[32] | 32 |
GPS93¶
GPSWAASEphemeris
Format Description:
Field | Type | Size [Bytes] |
SV | uint16_t | 2 |
spare | uint16_t | 2 |
TOW_Sec_of_Week | uint32_t | 8 |
IODE | uint16_t | 2 |
URA | uint16_t | 2 |
T_Zero | int32_t | 8 |
XG | int32_t | 8 |
YG | int32_t | 8 |
ZG | int32_t | 8 |
XG_Dot | int32_t | 8 |
YG_Dot | int32_t | 8 |
ZG_Dot | int32_t | 8 |
XG_DotDot | int32_t | 8 |
YG_DotDot | int32_t | 8 |
ZG_DotDot | int32_t | 8 |
Gf_Zero | uint16_t | 2 |
Gf_Zero_Dot | uint16_t | 2 |
GPS94¶
GPSIonosphereUTC
Format Description:
Field | Type | Size [Bytes] |
a0 | double | 8 |
a1 | double | 8 |
a2 | double | 8 |
a3 | double | 8 |
b0 | double | 8 |
b1 | double | 8 |
b2 | double | 8 |
b3 | double | 8 |
UTC_A0 | double | 8 |
UTC_A1 | double | 8 |
tot | uint32_t | 8 |
wnt | uint16_t | 2 |
wnlsf | uint16_t | 2 |
dn | uint16_t | 2 |
dtls | uint16_t | 2 |
dtlsf | uint16_t | 2 |
space | uint16_t | 2 |
GPS95¶
GPSEphemeris
Format Description:
Field | Type | Size [Bytes] |
SV | uint16_t | 2 |
spare | uint16_t | 2 |
Sec_of_Week | uint32_t | 8 |
SF1_Words | char[40] | 40 |
SF2_Words | char[40] | 40 |
SF3_Words | char[40] | 40 |
GPS96¶
GPSPsudorange
Format Description:
Field | Type | Size [Bytes] |
spare | uint16_t | 2 |
Week | uint16_t | 2 |
TOW | double | 8 |
UICS_TT_SNR_PRN_0 | uint32_t | 8 |
UICS_TT_SNR_PRN_1 | uint32_t | 8 |
UICS_TT_SNR_PRN_2 | uint32_t | 8 |
UICS_TT_SNR_PRN_3 | uint32_t | 8 |
UICS_TT_SNR_PRN_4 | uint32_t | 8 |
UICS_TT_SNR_PRN_5 | uint32_t | 8 |
UICS_TT_SNR_PRN_6 | uint32_t | 8 |
UICS_TT_SNR_PRN_7 | uint32_t | 8 |
UICS_TT_SNR_PRN_8 | uint32_t | 8 |
UICS_TT_SNR_PRN_9 | uint32_t | 8 |
UICS_TT_SNR_PRN_10 | uint32_t | 8 |
UICS_TT_SNR_PRN_11 | uint32_t | 8 |
UIDoppler_FL_0 | uint32_t | 8 |
UIDoppler_FL_1 | uint32_t | 8 |
UIDoppler_FL_2 | uint32_t | 8 |
UIDoppler_FL_3 | uint32_t | 8 |
UIDoppler_FL_4 | uint32_t | 8 |
UIDoppler_FL_5 | uint32_t | 8 |
UIDoppler_FL_6 | uint32_t | 8 |
UIDoppler_FL_7 | uint32_t | 8 |
UIDoppler_FL_8 | uint32_t | 8 |
UIDoppler_FL_9 | uint32_t | 8 |
UIDoppler_FL_10 | uint32_t | 8 |
UIDoppler_FL_11 | uint32_t | 8 |
PseudoRange_0 | double | 8 |
PseudoRange_1 | double | 8 |
PseudoRange_2 | double | 8 |
PseudoRange_3 | double | 8 |
PseudoRange_4 | double | 8 |
PseudoRange_5 | double | 8 |
PseudoRange_6 | double | 8 |
PseudoRange_7 | double | 8 |
PseudoRange_8 | double | 8 |
PseudoRange_9 | double | 8 |
PseudoRange_10 | double | 8 |
PseudoRange_11 | double | 8 |
Phase_0 | double | 8 |
Phase_1 | double | 8 |
Phase_2 | double | 8 |
Phase_3 | double | 8 |
Phase_4 | double | 8 |
Phase_5 | double | 8 |
Phase_6 | double | 8 |
Phase_7 | double | 8 |
Phase_8 | double | 8 |
Phase_9 | double | 8 |
Phase_10 | double | 8 |
Phase_11 | double | 8 |
GPS97¶
GPSProcessor
Format Description:
Field | Type | Size [Bytes] |
CPU_Availible | uint32_t | 8 |
Missed_Sub_Frames | uint16_t | 2 |
Max_Subframe_Queued | uint16_t | 2 |
Missed_Accum | uint16_t | 2 |
Missed_Meas | uint16_t | 2 |
spare1 | uint32_t | 8 |
spare2 | uint32_t | 8 |
spare3 | uint32_t | 8 |
spare4 | uint16_t | 2 |
spare5 | uint16_t | 2 |
GPS98¶
GPSAlmanac
Format Description:
Field | Type | Size [Bytes] |
Alman_Data | char[64] | 64 |
Last_Alman | uint8_t | 1 |
IonoUTCV_Flag | uint8_t | 1 |
spare | uint16_t | 2 |
GPS99¶
GPSSatellite
Format Description:
Field | Type | Size [Bytes] |
Nav_Mode_2 | uint8_t | 1 |
UTC_Time_Diff | uint8_t | 1 |
GPS_Week | uint16_t | 2 |
GPS_Time_of_Week | double | 8 |
Channel_0 | uint8_t | 1 |
Tracked_0 | uint8_t | 1 |
Status_0 | uint8_t | 1 |
Last_Subframe_0 | uint8_t | 1 |
Ephm_V_Flag_0 | uint8_t | 1 |
Ephm_Health_0 | uint8_t | 1 |
Alm_V_Flag_0 | uint8_t | 1 |
Alm_Health_0 | uint8_t | 1 |
Elev_Angle_0 | int8_t | 1 |
Azimuth_Angle_0 | uint8_t | 1 |
URA_0 | uint8_t | 1 |
spare_0 | uint8_t | 1 |
CLI_for_SNR_0 | uint16_t | 2 |
DiffCorr_0 | int16_t | 2 |
Pos_Resid_0 | int16_t | 2 |
Vel_Resid_0 | int16_t | 2 |
Dopplr_0 | int16_t | 2 |
N_Carr_Offset_0 | int16_t | 2 |
Channel_1 | uint8_t | 1 |
Tracked_1 | uint8_t | 1 |
Status_1 | uint8_t | 1 |
Last_Subframe_1 | uint8_t | 1 |
Ephm_V_Flag_1 | uint8_t | 1 |
Ephm_Health_1 | uint8_t | 1 |
Alm_V_Flag_1 | uint8_t | 1 |
Alm_Health_1 | uint8_t | 1 |
Elev_Angle_1 | int8_t | 1 |
Azimuth_Angle_1 | uint8_t | 1 |
URA_1 | uint8_t | 1 |
spare_1 | uint8_t | 1 |
CLI_for_SNR_1 | uint16_t | 2 |
DiffCorr_1 | int16_t | 2 |
Pos_Resid_1 | int16_t | 2 |
Vel_Resid_1 | int16_t | 2 |
Dopplr_1 | int16_t | 2 |
N_Carr_Offset_1 | int16_t | 2 |
Channel_2 | uint8_t | 1 |
Tracked_2 | uint8_t | 1 |
Status_2 | uint8_t | 1 |
Last_Subframe_2 | uint8_t | 1 |
Ephm_V_Flag_2 | uint8_t | 1 |
Ephm_Health_2 | uint8_t | 1 |
Alm_V_Flag_2 | uint8_t | 1 |
Alm_Health_2 | uint8_t | 1 |
Elev_Angle_2 | int8_t | 1 |
Azimuth_Angle_2 | uint8_t | 1 |
URA_2 | uint8_t | 1 |
spare_2 | uint8_t | 1 |
CLI_for_SNR_2 | uint16_t | 2 |
DiffCorr_2 | int16_t | 2 |
Pos_Resid_2 | int16_t | 2 |
Vel_Resid_2 | int16_t | 2 |
Dopplr_2 | int16_t | 2 |
N_Carr_Offset_2 | int16_t | 2 |
Channel_3 | uint8_t | 1 |
Tracked_3 | uint8_t | 1 |
Status_3 | uint8_t | 1 |
Last_Subframe_3 | uint8_t | 1 |
Ephm_V_Flag_3 | uint8_t | 1 |
Ephm_Health_3 | uint8_t | 1 |
Alm_V_Flag_3 | uint8_t | 1 |
Alm_Health_3 | uint8_t | 1 |
Elev_Angle_3 | int8_t | 1 |
Azimuth_Angle_3 | uint8_t | 1 |
URA_3 | uint8_t | 1 |
spare_3 | uint8_t | 1 |
CLI_for_SNR_3 | uint16_t | 2 |
DiffCorr_3 | int16_t | 2 |
Pos_Resid_3 | int16_t | 2 |
Vel_Resid_3 | int16_t | 2 |
Dopplr_3 | int16_t | 2 |
N_Carr_Offset_3 | int16_t | 2 |
Channel_4 | uint8_t | 1 |
Tracked_4 | uint8_t | 1 |
Status_4 | uint8_t | 1 |
Last_Subframe_4 | uint8_t | 1 |
Ephm_V_Flag_4 | uint8_t | 1 |
Ephm_Health_4 | uint8_t | 1 |
Alm_V_Flag_4 | uint8_t | 1 |
Alm_Health_4 | uint8_t | 1 |
Elev_Angle_4 | int8_t | 1 |
Azimuth_Angle_4 | uint8_t | 1 |
URA_4 | uint8_t | 1 |
spare_4 | uint8_t | 1 |
CLI_for_SNR_4 | uint16_t | 2 |
DiffCorr_4 | int16_t | 2 |
Pos_Resid_4 | int16_t | 2 |
Vel_Resid_4 | int16_t | 2 |
Dopplr_4 | int16_t | 2 |
N_Carr_Offset_4 | int16_t | 2 |
Channel_5 | uint8_t | 1 |
Tracked_5 | uint8_t | 1 |
Status_5 | uint8_t | 1 |
Last_Subframe_5 | uint8_t | 1 |
Ephm_V_Flag_5 | uint8_t | 1 |
Ephm_Health_5 | uint8_t | 1 |
Alm_V_Flag_5 | uint8_t | 1 |
Alm_Health_5 | uint8_t | 1 |
Elev_Angle_5 | int8_t | 1 |
Azimuth_Angle_5 | uint8_t | 1 |
URA_5 | uint8_t | 1 |
spare_5 | uint8_t | 1 |
CLI_for_SNR_5 | uint16_t | 2 |
DiffCorr_5 | int16_t | 2 |
Pos_Resid_5 | int16_t | 2 |
Vel_Resid_5 | int16_t | 2 |
Dopplr_5 | int16_t | 2 |
N_Carr_Offset_5 | int16_t | 2 |
Channel_6 | uint8_t | 1 |
Tracked_6 | uint8_t | 1 |
Status_6 | uint8_t | 1 |
Last_Subframe_6 | uint8_t | 1 |
Ephm_V_Flag_6 | uint8_t | 1 |
Ephm_Health_6 | uint8_t | 1 |
Alm_V_Flag_6 | uint8_t | 1 |
Alm_Health_6 | uint8_t | 1 |
Elev_Angle_6 | int8_t | 1 |
Azimuth_Angle_6 | uint8_t | 1 |
URA_6 | uint8_t | 1 |
spare_6 | uint8_t | 1 |
CLI_for_SNR_6 | uint16_t | 2 |
DiffCorr_6 | int16_t | 2 |
Pos_Resid_6 | int16_t | 2 |
Vel_Resid_6 | int16_t | 2 |
Dopplr_6 | int16_t | 2 |
N_Carr_Offset_6 | int16_t | 2 |
Channel_7 | uint8_t | 1 |
Tracked_7 | uint8_t | 1 |
Status_7 | uint8_t | 1 |
Last_Subframe_7 | uint8_t | 1 |
Ephm_V_Flag_7 | uint8_t | 1 |
Ephm_Health_7 | uint8_t | 1 |
Alm_V_Flag_7 | uint8_t | 1 |
Alm_Health_7 | uint8_t | 1 |
Elev_Angle_7 | int8_t | 1 |
Azimuth_Angle_7 | uint8_t | 1 |
URA_7 | uint8_t | 1 |
spare_7 | uint8_t | 1 |
CLI_for_SNR_7 | uint16_t | 2 |
DiffCorr_7 | int16_t | 2 |
Pos_Resid_7 | int16_t | 2 |
Vel_Resid_7 | int16_t | 2 |
Dopplr_7 | int16_t | 2 |
N_Carr_Offset_7 | int16_t | 2 |
Channel_8 | uint8_t | 1 |
Tracked_8 | uint8_t | 1 |
Status_8 | uint8_t | 1 |
Last_Subframe_8 | uint8_t | 1 |
Ephm_V_Flag_8 | uint8_t | 1 |
Ephm_Health_8 | uint8_t | 1 |
Alm_V_Flag_8 | uint8_t | 1 |
Alm_Health_8 | uint8_t | 1 |
Elev_Angle_8 | int8_t | 1 |
Azimuth_Angle_8 | uint8_t | 1 |
URA_8 | uint8_t | 1 |
spare_8 | uint8_t | 1 |
CLI_for_SNR_8 | uint16_t | 2 |
DiffCorr_8 | int16_t | 2 |
Pos_Resid_8 | int16_t | 2 |
Vel_Resid_8 | int16_t | 2 |
Dopplr_8 | int16_t | 2 |
N_Carr_Offset_8 | int16_t | 2 |
Channel_9 | uint8_t | 1 |
Tracked_9 | uint8_t | 1 |
Status_9 | uint8_t | 1 |
Last_Subframe_9 | uint8_t | 1 |
Ephm_V_Flag_9 | uint8_t | 1 |
Ephm_Health_9 | uint8_t | 1 |
Alm_V_Flag_9 | uint8_t | 1 |
Alm_Health_9 | uint8_t | 1 |
Elev_Angle_9 | int8_t | 1 |
Azimuth_Angle_9 | uint8_t | 1 |
URA_9 | uint8_t | 1 |
spare_9 | uint8_t | 1 |
CLI_for_SNR_9 | uint16_t | 2 |
DiffCorr_9 | int16_t | 2 |
Pos_Resid_9 | int16_t | 2 |
Vel_Resid_9 | int16_t | 2 |
Dopplr_9 | int16_t | 2 |
N_Carr_Offset_9 | int16_t | 2 |
Channel_10 | uint8_t | 1 |
Tracked_10 | uint8_t | 1 |
Status_10 | uint8_t | 1 |
Last_Subframe_10 | uint8_t | 1 |
Ephm_V_Flag_10 | uint8_t | 1 |
Ephm_Health_10 | uint8_t | 1 |
Alm_V_Flag_10 | uint8_t | 1 |
Alm_Health_10 | uint8_t | 1 |
Elev_Angle_10 | int8_t | 1 |
Azimuth_Angle_10 | uint8_t | 1 |
URA_10 | uint8_t | 1 |
spare_10 | uint8_t | 1 |
CLI_for_SNR_10 | uint16_t | 2 |
DiffCorr_10 | int16_t | 2 |
Pos_Resid_10 | int16_t | 2 |
Vel_Resid_10 | int16_t | 2 |
Dopplr_10 | int16_t | 2 |
N_Carr_Offset_10 | int16_t | 2 |
Channel_11 | uint8_t | 1 |
Tracked_11 | uint8_t | 1 |
Status_11 | uint8_t | 1 |
Last_Subframe_11 | uint8_t | 1 |
Ephm_V_Flag_11 | uint8_t | 1 |
Ephm_Health_11 | uint8_t | 1 |
Alm_V_Flag_11 | uint8_t | 1 |
Alm_Health_11 | uint8_t | 1 |
Elev_Angle_11 | int8_t | 1 |
Azimuth_Angle_11 | uint8_t | 1 |
URA_11 | uint8_t | 1 |
spare_11 | uint8_t | 1 |
CLI_for_SNR_11 | uint16_t | 2 |
DiffCorr_11 | int16_t | 2 |
Pos_Resid_11 | int16_t | 2 |
Vel_Resid_11 | int16_t | 2 |
Dopplr_11 | int16_t | 2 |
N_Carr_Offset_11 | int16_t | 2 |
Clock_Err_L1 | int16_t | 2 |
spare | uint16_t | 2 |
LTCH¶
LaunchTowerComputer
Format Description:
Field | Type | Size [Bytes] |
Rocket_Ready | float | 4 |
Iginition_Relay | uint8_t | 1 |
Ignition_Battery | float | 4 |
Shore_Power_Relay | uint8_t | 1 |
Shore_Power | float | 4 |
Solar_Voltage | float | 4 |
System_Battery | float | 4 |
Internal_Temp | float | 4 |
External_Temp | float | 4 |
Humidity | float | 4 |
Wind_Speed | float | 4 |
Wind_Direction | float | 4 |
Barometric_Pressure | float | 4 |
RNHH¶
RNHHealth
Format Description:
Field | Type | Size [Bytes] |
Temperature | uint16_t | 2 |
TS1Temperature | int16_t | 2 |
TS2Temperature | int16_t | 2 |
TempRange | uint16_t | 2 |
Voltage | uint16_t | 2 |
Current | int16_t | 2 |
AverageCurrent | int16_t | 2 |
CellVoltage1 | uint16_t | 2 |
CellVoltage2 | uint16_t | 2 |
CellVoltage3 | uint16_t | 2 |
CellVoltage4 | uint16_t | 2 |
PackVoltage | uint16_t | 2 |
AverageVoltage | uint16_t | 2 |
RNHP¶
RNHPower
Format Description:
Field | Type | Size [Bytes] |
Port1 | uint16_t | 2 |
Port2 | uint16_t | 2 |
Port3 | uint16_t | 2 |
Port4 | uint16_t | 2 |
Umbilical | uint16_t | 2 |
Port6 | uint16_t | 2 |
Port7 | uint16_t | 2 |
Port8 | uint16_t | 2 |
SEQE¶
SequenceError
Format Description:
Field | Type | Size [Bytes] |
Port | uint16_t | 2 |
Expected | uint32_t | 8 |
Received | uint32_t | 8 |
V8A8¶
Venus8Navigation
Format Description:
Field | Type | Size [Bytes] |
Fix_Mode | uint8_t | 1 |
Num_SV | uint8_t | 1 |
GPS_Week | uint16_t | 2 |
TOW | uint32_t | 8 |
Latitude | int32_t | 8 |
Longitude | int32_t | 8 |
Ellipsoid_Altitude | uint32_t | 8 |
MSL_Altitude | uint32_t | 8 |
GDOP | uint16_t | 2 |
PDOP | uint16_t | 2 |
HDOP | uint16_t | 2 |
VDOP | uint16_t | 2 |
TDOP | uint16_t | 2 |
ECEF_X | int32_t | 8 |
ECEF_Y | int32_t | 8 |
ECEF_Z | int32_t | 8 |
ECEF_VX | int32_t | 8 |
ECEF_VY | int32_t | 8 |
ECEF_VZ | int32_t | 8 |
VSTE¶
State
Format Description:
Field | Type | Size [Bytes] |
Time | double | 8 |
Acc_up | double | 8 |
Vel_up | double | 8 |
Altitude | double | 8 |
Roll_Rate | double | 8 |
Roll_Angle | double | 8 |
psas_packet API¶
Message Class¶
The message class can be initialized with information about the data that can be packed in it. This will make an object with encode and decode methods available for packing and unpacking.
-
class
psas_packet.messages.
Message
(definition)¶ Definition of a message type
Parameters: definition (dict) – Dictionary defining data in a message Returns: Message instance Suitable metadata can be passed in and this class will perform necessary pre-compute steps and create a usable message instance for a specific data source.
-
decode
(raw)¶ Decode a single message body (the data lines). Header info and message boundaries are solved in network
Parameters: raw (bytestr) – Raw string of bytes the length of Returns: A dictionary of values in normal units
-
encode
(data)¶ Encode a set of data into binary
Parameters: data (dict) – A dictionary of values to encode Returns: Binary ecoded data Uses the struct package to encode into byte array. The dictionary should have values who’s keys match the members list.
-
typedef
()¶ Autogen c style typedef structs
Returns: String c code for the data and header for this packet
-
Header¶
Encodes and decodes message headers
Examples¶
Send A Telemetry Packet¶
Open a UDP socket, and send a message of type “ADIS” to port 25000 on localhost
from psas_packet import io, messages
from contextlib import closing
import socket
import time
# Data type we're going to use
ADIS = messages.MESSAGES['ADIS']
# Data to pack
data = {
'VCC': 5.0,
'Gyro_X': 0.0,
'Gyro_Y': 0,
'Gyro_Z': 1,
'Acc_X': -9.8,
'Acc_Y': 0,
'Acc_Z': 0,
'Magn_X': 53e-6,
'Magn_Y': 0,
'Magn_Z': 0,
'Temp': 20,
'Aux_ADC': 0,
}
# Open a UDP socket
with closing(socket.socket(socket.AF_INET, socket.SOCK_DGRAM)) as sock:
sock.bind(('', 0))
sock.connect(('127.0.0.1', 25000))
# Network IO class, with our socket as connection
net = io.Network(sock)
# send just data (no header)
# type, sequence no, data
net.send_data(ADIS, 0, data)
Portland State Aerospace Society (PSAS) is a student aerospace engineering project at Portland State University. We are building ultra-low-cost, open source rockets that feature some of the most sophisticated amateur rocket avionics systems out there today.
In developing our telemetry system we’ve had to come up with a tight data storage and transfer technique. However we use this data scheme in many different projects, from the flight computer to various ground stations. This project is developed to have a single place that defines everything.
psas_packet¶
psas_packet is the reference implementation of our binary message storage and transmission scheme.