Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Path: blob/master/AntennaTracker/GCS_Tracker.cpp
Views: 1798
#include "GCS_Tracker.h"1#include "Tracker.h"23uint8_t GCS_Tracker::sysid_this_mav() const4{5return tracker.g.sysid_this_mav;6}78void GCS_Tracker::request_datastream_position(const uint8_t sysid, const uint8_t compid)9{10for (uint8_t i=0; i < num_gcs(); i++) {11// request position12if (HAVE_PAYLOAD_SPACE((mavlink_channel_t)i, DATA_STREAM)) {13mavlink_msg_request_data_stream_send(14(mavlink_channel_t)i,15sysid,16compid,17MAV_DATA_STREAM_POSITION,18tracker.g.mavlink_update_rate,191); // start streaming20}21}22}2324void GCS_Tracker::request_datastream_airpressure(const uint8_t sysid, const uint8_t compid)25{26for (uint8_t i=0; i < num_gcs(); i++) {27// request air pressure28if (HAVE_PAYLOAD_SPACE((mavlink_channel_t)i, DATA_STREAM)) {29mavlink_msg_request_data_stream_send(30(mavlink_channel_t)i,31sysid,32compid,33MAV_DATA_STREAM_RAW_SENSORS,34tracker.g.mavlink_update_rate,351); // start streaming36}37}38}3940// update sensors and subsystems present, enabled and healthy flags for reporting to GCS41void GCS_Tracker::update_vehicle_sensor_status_flags()42{43// default sensors present44control_sensors_present |=45MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL |46MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION |47MAV_SYS_STATUS_SENSOR_YAW_POSITION;4849control_sensors_enabled |=50MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL |51MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION |52MAV_SYS_STATUS_SENSOR_YAW_POSITION;5354control_sensors_health |=55MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL |56MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION |57MAV_SYS_STATUS_SENSOR_YAW_POSITION;58}5960#if AP_LTM_TELEM_ENABLED61// avoid building/linking LTM:62void AP_LTM_Telem::init() {};63#endif64#if AP_DEVO_TELEM_ENABLED65// avoid building/linking Devo:66void AP_DEVO_Telem::init() {};67#endif686970