static void send_circle(struct transport_tx *trans, struct link_device *dev) { if (nav_in_circle) { pprz_msg_send_CIRCLE(trans, dev, AC_ID, &nav_circle_x, &nav_circle_y, &nav_circle_radius); } }
static void send_circle(struct transport_tx *trans, struct link_device *dev) { if (gvf_trajectory.type == ELLIPSE && (gvf_trajectory.p[2] == gvf_trajectory.p[3])) { pprz_msg_send_CIRCLE(trans, dev, AC_ID, &gvf_trajectory.p[0], &gvf_trajectory.p[1], &gvf_trajectory.p[2]); } }
static void send_nav_status(struct transport_tx *trans, struct link_device *dev) { float dist_home = sqrtf(dist2_to_home); float dist_wp = sqrtf(dist2_to_wp); pprz_msg_send_ROTORCRAFT_NAV_STATUS(trans, dev, AC_ID, &block_time, &stage_time, &dist_home, &dist_wp, &nav_block, &nav_stage, &horizontal_mode); if (horizontal_mode == HORIZONTAL_MODE_ROUTE) { float sx = POS_FLOAT_OF_BFP(nav_segment_start.x); float sy = POS_FLOAT_OF_BFP(nav_segment_start.y); float ex = POS_FLOAT_OF_BFP(nav_segment_end.x); float ey = POS_FLOAT_OF_BFP(nav_segment_end.y); pprz_msg_send_SEGMENT(trans, dev, AC_ID, &sx, &sy, &ex, &ey); } else if (horizontal_mode == HORIZONTAL_MODE_CIRCLE) { float cx = POS_FLOAT_OF_BFP(nav_circle_center.x); float cy = POS_FLOAT_OF_BFP(nav_circle_center.y); float r = POS_FLOAT_OF_BFP(nav_circle_radius); pprz_msg_send_CIRCLE(trans, dev, AC_ID, &cx, &cy, &r); } }