void mav_pose_t_handler(const lcm_recv_buf_t *rbuf, const char* channel, const mav_pose_t *msg, void *user) { Hud *hud = (Hud*)user; hud->SetAltitude(msg->pos[2]); hud->SetOrientation(msg->orientation[0], msg->orientation[1], msg->orientation[2], msg->orientation[3]); hud->SetAcceleration(msg->accel[0], msg->accel[1], msg->accel[2]); hud->SetAirspeed(msg->vel[0]); hud->SetTimestamp(msg->utime); }
void baro_airspeed_handler(const lcm_recv_buf_t *rbuf, const char* channel, const lcmt_baro_airspeed *msg, void *user) { Hud *hud = (Hud*)user; hud->SetAirspeed(msg->airspeed); }