LOS Telem
LOS Telem handles communication between ZP and ground station. Note that this does not include RC link.
Telem provides functions for ZP to send and receive predefined structs to and from ground.
These functions make calls to relevant drivers e.g. Xbees, rfd900.
ZP just has to know what data is moving between it and ground and doesn’t need to concern itself with the details of how communication works.
ZP should periodically call the Telem functions to send/receive data.
Exposed functions:
/**
* @brief Retrieves latest data from ground, if any.
*
* @param ... Struct in which retrieved data is stored.
*
* @return true if data was retrieved, otherwise false
*/
bool get_from_ground(Data_From_Ground_t &dataFromGround);
/**
* @brief Sends data to ground.
*
* @param dataToGround Data to send.
*/
void send_to_ground(Data_To_Ground_t &dataToGround);
Structs:
typedef struct {
float latitude;
float longitude;
float altitude;
float yaw;
float pitch;
float roll;
uint8_t motorOutputs[NUM_MOTOR_OUTPUTS];
} Data_From_AM_t;
High-level diagram of function calls: