当前位置: 首页>>代码示例>>C++>>正文


C++ register_periodic_telemetry函数代码示例

本文整理汇总了C++中register_periodic_telemetry函数的典型用法代码示例。如果您正苦于以下问题:C++ register_periodic_telemetry函数的具体用法?C++ register_periodic_telemetry怎么用?C++ register_periodic_telemetry使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了register_periodic_telemetry函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: gps_init

void gps_init(void)
{
  gps.fix = GPS_FIX_NONE;
  gps.week = 0;
  gps.tow = 0;
  gps.cacc = 0;

  gps.last_3dfix_ticks = 0;
  gps.last_3dfix_time = 0;
  gps.last_msg_ticks = 0;
  gps.last_msg_time = 0;
#ifdef GPS_POWER_GPIO
  gpio_setup_output(GPS_POWER_GPIO);
  GPS_POWER_GPIO_ON(GPS_POWER_GPIO);
#endif
#ifdef GPS_LED
  LED_OFF(GPS_LED);
#endif
#ifdef GPS_TYPE_H
  gps_impl_init();
#endif

#if PERIODIC_TELEMETRY
  register_periodic_telemetry(DefaultPeriodic, "GPS", send_gps);
  register_periodic_telemetry(DefaultPeriodic, "GPS_INT", send_gps_int);
  register_periodic_telemetry(DefaultPeriodic, "GPS_LLA", send_gps_lla);
  register_periodic_telemetry(DefaultPeriodic, "GPS_SOL", send_gps_sol);
  register_periodic_telemetry(DefaultPeriodic, "SVINFO", send_svinfo);
#endif
}
开发者ID:AULA-PPZ,项目名称:paparazzi,代码行数:30,代码来源:gps.c

示例2: main_init

static inline void main_init(void)
{
  mcu_init();
  sys_time_register_timer((1. / PERIODIC_FREQUENCY), NULL);

  stateInit();
  actuators_init();

  imu_init();
#if USE_AHRS_ALIGNER
  ahrs_aligner_init();
#endif
  ahrs_init();

  settings_init();

  mcu_int_enable();

  downlink_init();

  register_periodic_telemetry(DefaultPeriodic, PPRZ_MSG_ID_AUTOPILOT_VERSION, send_autopilot_version);
  register_periodic_telemetry(DefaultPeriodic, PPRZ_MSG_ID_ALIVE, send_alive);
  register_periodic_telemetry(DefaultPeriodic, PPRZ_MSG_ID_COMMANDS, send_commands);
  register_periodic_telemetry(DefaultPeriodic, PPRZ_MSG_ID_ACTUATORS, send_actuators);

  // send body_to_imu from here for now
  AbiSendMsgBODY_TO_IMU_QUAT(1, orientationGetQuat_f(&imu.body_to_imu));
}
开发者ID:2seasuav,项目名称:paparuzzi,代码行数:28,代码来源:demo_ahrs_actuators.c

示例3: stabilization_attitude_init

void stabilization_attitude_init(void)
{
    /* setpoints */
    FLOAT_EULERS_ZERO(stab_att_sp_euler);
    float_quat_identity(&stab_att_sp_quat);
    /* reference */
    attitude_ref_quat_float_init(&att_ref_quat_f);
    attitude_ref_quat_float_schedule(&att_ref_quat_f, STABILIZATION_ATTITUDE_GAIN_IDX_DEFAULT);

    for (int i = 0; i < STABILIZATION_ATTITUDE_GAIN_NB; i++) {
        VECT3_ASSIGN(stabilization_gains[i].p, phi_pgain[i], theta_pgain[i], psi_pgain[i]);
        VECT3_ASSIGN(stabilization_gains[i].d, phi_dgain[i], theta_dgain[i], psi_dgain[i]);
        VECT3_ASSIGN(stabilization_gains[i].i, phi_igain[i], theta_igain[i], psi_igain[i]);
        VECT3_ASSIGN(stabilization_gains[i].dd, phi_ddgain[i], theta_ddgain[i], psi_ddgain[i]);
        VECT3_ASSIGN(stabilization_gains[i].rates_d, phi_dgain_d[i], theta_dgain_d[i], psi_dgain_d[i]);
#ifdef HAS_SURFACE_COMMANDS
        VECT3_ASSIGN(stabilization_gains[i].surface_p, phi_pgain_surface[i], theta_pgain_surface[i], psi_pgain_surface[i]);
        VECT3_ASSIGN(stabilization_gains[i].surface_d, phi_dgain_surface[i], theta_dgain_surface[i], psi_dgain_surface[i]);
        VECT3_ASSIGN(stabilization_gains[i].surface_i, phi_igain_surface[i], theta_igain_surface[i], psi_igain_surface[i]);
        VECT3_ASSIGN(stabilization_gains[i].surface_dd, phi_ddgain_surface[i], theta_ddgain_surface[i], psi_ddgain_surface[i]);
#endif
    }

    float_quat_identity(&stabilization_att_sum_err_quat);
    FLOAT_RATES_ZERO(last_body_rate);
    FLOAT_RATES_ZERO(body_rate_d);

#if PERIODIC_TELEMETRY
    register_periodic_telemetry(DefaultPeriodic, PPRZ_MSG_ID_STAB_ATTITUDE_FLOAT, send_att);
    register_periodic_telemetry(DefaultPeriodic, PPRZ_MSG_ID_STAB_ATTITUDE_REF_FLOAT, send_att_ref);
#endif
}
开发者ID:johanmaurin,项目名称:paparazzi,代码行数:32,代码来源:stabilization_attitude_quat_float.c

示例4: stabilization_attitude_init

void stabilization_attitude_init(void) {

  stabilization_attitude_ref_init();

  VECT3_ASSIGN(stabilization_gains.p,
               STABILIZATION_ATTITUDE_PHI_PGAIN,
               STABILIZATION_ATTITUDE_THETA_PGAIN,
               STABILIZATION_ATTITUDE_PSI_PGAIN);

  VECT3_ASSIGN(stabilization_gains.d,
               STABILIZATION_ATTITUDE_PHI_DGAIN,
               STABILIZATION_ATTITUDE_THETA_DGAIN,
               STABILIZATION_ATTITUDE_PSI_DGAIN);

  VECT3_ASSIGN(stabilization_gains.i,
               STABILIZATION_ATTITUDE_PHI_IGAIN,
               STABILIZATION_ATTITUDE_THETA_IGAIN,
               STABILIZATION_ATTITUDE_PSI_IGAIN);

  VECT3_ASSIGN(stabilization_gains.dd,
               STABILIZATION_ATTITUDE_PHI_DDGAIN,
               STABILIZATION_ATTITUDE_THETA_DDGAIN,
               STABILIZATION_ATTITUDE_PSI_DDGAIN);

  FLOAT_EULERS_ZERO( stabilization_att_sum_err );

#if PERIODIC_TELEMETRY
  register_periodic_telemetry(DefaultPeriodic, "STAB_ATTITUDE", send_att);
  register_periodic_telemetry(DefaultPeriodic, "STAB_ATTITUDE_REF", send_att_ref);
#endif
}
开发者ID:Henricus-Basien,项目名称:paparazzi,代码行数:31,代码来源:stabilization_attitude_euler_float.c

示例5: stabilization_attitude_init

void stabilization_attitude_init(void) {

  stabilization_attitude_ref_init();

  for (int i = 0; i < STABILIZATION_ATTITUDE_GAIN_NB; i++) {
    VECT3_ASSIGN(stabilization_gains[i].p, phi_pgain[i], theta_pgain[i], psi_pgain[i]);
    VECT3_ASSIGN(stabilization_gains[i].d, phi_dgain[i], theta_dgain[i], psi_dgain[i]);
    VECT3_ASSIGN(stabilization_gains[i].i, phi_igain[i], theta_igain[i], psi_igain[i]);
    VECT3_ASSIGN(stabilization_gains[i].dd, phi_ddgain[i], theta_ddgain[i], psi_ddgain[i]);
    VECT3_ASSIGN(stabilization_gains[i].rates_d, phi_dgain_d[i], theta_dgain_d[i], psi_dgain_d[i]);
#ifdef HAS_SURFACE_COMMANDS
    VECT3_ASSIGN(stabilization_gains[i].surface_p, phi_pgain_surface[i], theta_pgain_surface[i], psi_pgain_surface[i]);
    VECT3_ASSIGN(stabilization_gains[i].surface_d, phi_dgain_surface[i], theta_dgain_surface[i], psi_dgain_surface[i]);
    VECT3_ASSIGN(stabilization_gains[i].surface_i, phi_igain_surface[i], theta_igain_surface[i], psi_igain_surface[i]);
    VECT3_ASSIGN(stabilization_gains[i].surface_dd, phi_ddgain_surface[i], theta_ddgain_surface[i], psi_ddgain_surface[i]);
#endif
  }

  FLOAT_QUAT_ZERO( stabilization_att_sum_err_quat );
  FLOAT_EULERS_ZERO( stabilization_att_sum_err );
  FLOAT_RATES_ZERO( last_body_rate );
  FLOAT_RATES_ZERO( body_rate_d );

#if PERIODIC_TELEMETRY
  register_periodic_telemetry(DefaultPeriodic, "STAB_ATTITUDE", send_att);
  register_periodic_telemetry(DefaultPeriodic, "STAB_ATTITUDE_REF", send_att_ref);
#endif
}
开发者ID:HeinrichChristian,项目名称:paparazzi,代码行数:28,代码来源:stabilization_attitude_quat_float.c

示例6: ins_init

void ins_init(void) {

#if USE_INS_NAV_INIT
    struct LlaCoor_i llh_nav0; /* Height above the ellipsoid */
    llh_nav0.lat = INT32_RAD_OF_DEG(NAV_LAT0);
    llh_nav0.lon = INT32_RAD_OF_DEG(NAV_LON0);
    /* NAV_ALT0 = ground alt above msl, NAV_MSL0 = geoid-height (msl) over ellipsoid */
    llh_nav0.alt = NAV_ALT0 + NAV_MSL0;

    struct EcefCoor_i ecef_nav0;
    ecef_of_lla_i(&ecef_nav0, &llh_nav0);

    ltp_def_from_ecef_i(&ins_impl.ltp_def, &ecef_nav0);
    ins_impl.ltp_def.hmsl = NAV_ALT0;
    stateSetLocalOrigin_i(&ins_impl.ltp_def);

    ins_impl.ltp_initialized = TRUE;
#else
    ins_impl.ltp_initialized  = FALSE;
#endif

    INT32_VECT3_ZERO(ins_impl.ltp_pos);
    INT32_VECT3_ZERO(ins_impl.ltp_speed);
    INT32_VECT3_ZERO(ins_impl.ltp_accel);

#if PERIODIC_TELEMETRY
    register_periodic_telemetry(DefaultPeriodic, "INS", send_ins);
    register_periodic_telemetry(DefaultPeriodic, "INS_Z", send_ins_z);
    register_periodic_telemetry(DefaultPeriodic, "INS_REF", send_ins_ref);
#endif
}
开发者ID:evandersman,项目名称:paparazzi,代码行数:31,代码来源:ins_gps_passthrough.c

示例7: nav_init

void nav_init(void)
{
  waypoints_init();

  nav_block = 0;
  nav_stage = 0;
  nav_altitude = POS_BFP_OF_REAL(SECURITY_HEIGHT);
  nav_flight_altitude = nav_altitude;
  flight_altitude = SECURITY_ALT;
  VECT3_COPY(navigation_target, waypoints[WP_HOME].enu_i);
  VECT3_COPY(navigation_carrot, waypoints[WP_HOME].enu_i);

  horizontal_mode = HORIZONTAL_MODE_WAYPOINT;
  vertical_mode = VERTICAL_MODE_ALT;

  nav_roll = 0;
  nav_pitch = 0;
  nav_heading = 0;
  nav_radius = DEFAULT_CIRCLE_RADIUS;
  nav_throttle = 0;
  nav_climb = 0;
  nav_leg_progress = 0;
  nav_leg_length = 1;

  too_far_from_home = FALSE;
  dist2_to_home = 0;
  dist2_to_wp = 0;

#if PERIODIC_TELEMETRY
  register_periodic_telemetry(DefaultPeriodic, "ROTORCRAFT_NAV_STATUS", send_nav_status);
  register_periodic_telemetry(DefaultPeriodic, "WP_MOVED", send_wp_moved);
#endif
}
开发者ID:dohamann,项目名称:paparazzi,代码行数:33,代码来源:navigation.c

示例8: gps_init

void gps_init(void)
{
  multi_gps_mode = MULTI_GPS_MODE;

  gps.valid_fields = 0;
  gps.fix = GPS_FIX_NONE;
  gps.week = 0;
  gps.tow = 0;
  gps.cacc = 0;

  gps.last_3dfix_ticks = 0;
  gps.last_3dfix_time = 0;
  gps.last_msg_ticks = 0;
  gps.last_msg_time = 0;

#ifdef GPS_POWER_GPIO
  gpio_setup_output(GPS_POWER_GPIO);
  GPS_POWER_GPIO_ON(GPS_POWER_GPIO);
#endif
#ifdef GPS_LED
  LED_OFF(GPS_LED);
#endif

  AbiBindMsgGPS(ABI_BROADCAST, &gps_ev, gps_cb);

#if PERIODIC_TELEMETRY
  register_periodic_telemetry(DefaultPeriodic, PPRZ_MSG_ID_GPS, send_gps);
  register_periodic_telemetry(DefaultPeriodic, PPRZ_MSG_ID_GPS_INT, send_gps_int);
  register_periodic_telemetry(DefaultPeriodic, PPRZ_MSG_ID_GPS_LLA, send_gps_lla);
  register_periodic_telemetry(DefaultPeriodic, PPRZ_MSG_ID_GPS_SOL, send_gps_sol);
  register_periodic_telemetry(DefaultPeriodic, PPRZ_MSG_ID_SVINFO, send_svinfo);
#endif
}
开发者ID:enacuavlab,项目名称:paparazzi,代码行数:33,代码来源:gps.c

示例9: guidance_v_init

void guidance_v_init(void)
{

  guidance_v_mode = GUIDANCE_V_MODE_KILL;

  guidance_v_kp = GUIDANCE_V_HOVER_KP;
  guidance_v_kd = GUIDANCE_V_HOVER_KD;
  guidance_v_ki = GUIDANCE_V_HOVER_KI;

  guidance_v_z_sum_err = 0;

  guidance_v_nominal_throttle = GUIDANCE_V_NOMINAL_HOVER_THROTTLE;
  guidance_v_adapt_throttle_enabled = GUIDANCE_V_ADAPT_THROTTLE_ENABLED;

  gv_adapt_init();

#if GUIDANCE_V_MODE_MODULE_SETTING == GUIDANCE_V_MODE_MODULE
  guidance_v_module_init();
#endif

#if PERIODIC_TELEMETRY
  register_periodic_telemetry(DefaultPeriodic, "VERT_LOOP", send_vert_loop);
  register_periodic_telemetry(DefaultPeriodic, "TUNE_VERT", send_tune_vert);
#endif
}
开发者ID:DimaRU,项目名称:paparazzi,代码行数:25,代码来源:guidance_v.c

示例10: guidance_h_init

void guidance_h_init(void)
{

  guidance_h.mode = GUIDANCE_H_MODE_KILL;
  guidance_h.use_ref = GUIDANCE_H_USE_REF;
  guidance_h.approx_force_by_thrust = GUIDANCE_H_APPROX_FORCE_BY_THRUST;

  INT_VECT2_ZERO(guidance_h.sp.pos);
  INT_VECT2_ZERO(guidance_h_trim_att_integrator);
  INT_EULERS_ZERO(guidance_h.rc_sp);
  guidance_h.sp.heading = 0;
  guidance_h.sp.heading_rate = 0;
  guidance_h.gains.p = GUIDANCE_H_PGAIN;
  guidance_h.gains.i = GUIDANCE_H_IGAIN;
  guidance_h.gains.d = GUIDANCE_H_DGAIN;
  guidance_h.gains.a = GUIDANCE_H_AGAIN;
  guidance_h.gains.v = GUIDANCE_H_VGAIN;
  transition_percentage = 0;
  transition_theta_offset = 0;

  gh_ref_init();

#if GUIDANCE_H_MODE_MODULE_SETTING == GUIDANCE_H_MODE_MODULE
  guidance_h_module_init();
#endif

#if PERIODIC_TELEMETRY
  register_periodic_telemetry(DefaultPeriodic, PPRZ_MSG_ID_GUIDANCE_H_INT, send_gh);
  register_periodic_telemetry(DefaultPeriodic, PPRZ_MSG_ID_HOVER_LOOP, send_hover_loop);
  register_periodic_telemetry(DefaultPeriodic, PPRZ_MSG_ID_GUIDANCE_H_REF_INT, send_href);
  register_periodic_telemetry(DefaultPeriodic, PPRZ_MSG_ID_ROTORCRAFT_TUNE_HOVER, send_tune_hover);
#endif

}
开发者ID:lethargi,项目名称:paparazzi,代码行数:34,代码来源:guidance_h.c

示例11: h_ctl_init

void h_ctl_init( void ) {
  h_ctl_ref.max_p = H_CTL_REF_MAX_P;
  h_ctl_ref.max_p_dot = H_CTL_REF_MAX_P_DOT;
  h_ctl_ref.max_q = H_CTL_REF_MAX_Q;
  h_ctl_ref.max_q_dot = H_CTL_REF_MAX_Q_DOT;

  h_ctl_course_setpoint = 0.;
  h_ctl_course_pre_bank = 0.;
  h_ctl_course_pre_bank_correction = H_CTL_COURSE_PRE_BANK_CORRECTION;
  h_ctl_course_pgain = H_CTL_COURSE_PGAIN;
  h_ctl_course_dgain = H_CTL_COURSE_DGAIN;
  h_ctl_roll_max_setpoint = H_CTL_ROLL_MAX_SETPOINT;

  h_ctl_disabled = FALSE;

  h_ctl_roll_setpoint = 0.;
  h_ctl_roll_attitude_gain = H_CTL_ROLL_ATTITUDE_GAIN;
  h_ctl_roll_rate_gain = H_CTL_ROLL_RATE_GAIN;
  h_ctl_roll_igain = H_CTL_ROLL_IGAIN;
  h_ctl_roll_sum_err = 0;
  h_ctl_roll_Kffa = H_CTL_ROLL_KFFA;
  h_ctl_roll_Kffd = H_CTL_ROLL_KFFD;
  h_ctl_aileron_setpoint = 0;
#ifdef H_CTL_AILERON_OF_THROTTLE
  h_ctl_aileron_of_throttle = H_CTL_AILERON_OF_THROTTLE;
#endif

  h_ctl_pitch_setpoint = 0.;
  h_ctl_pitch_loop_setpoint = 0.;
  h_ctl_pitch_pgain = H_CTL_PITCH_PGAIN;
  h_ctl_pitch_dgain = H_CTL_PITCH_DGAIN;
  h_ctl_pitch_igain = H_CTL_PITCH_IGAIN;
  h_ctl_pitch_sum_err = 0.;
  h_ctl_pitch_Kffa = H_CTL_PITCH_KFFA;
  h_ctl_pitch_Kffd = H_CTL_PITCH_KFFD;
  h_ctl_elevator_setpoint = 0;
  h_ctl_elevator_of_roll = 0; //H_CTL_ELEVATOR_OF_ROLL;
#ifdef H_CTL_PITCH_OF_ROLL
  h_ctl_pitch_of_roll = H_CTL_PITCH_OF_ROLL;
#endif

  use_airspeed_ratio = FALSE;
  airspeed_ratio2 = 1.;

#if USE_PITCH_TRIM
  v_ctl_pitch_loiter_trim = V_CTL_PITCH_LOITER_TRIM;
  v_ctl_pitch_dash_trim = V_CTL_PITCH_DASH_TRIM;
#else
  v_ctl_pitch_loiter_trim = 0.;
  v_ctl_pitch_dash_trim = 0.;
#endif

#if PERIODIC_TELEMETRY
  register_periodic_telemetry(DefaultPeriodic, "CALIBRATION", send_calibration);
  register_periodic_telemetry(DefaultPeriodic, "TUNE_ROLL", send_tune_roll);
  register_periodic_telemetry(DefaultPeriodic, "H_CTL_A", send_ctl_a);
#endif
}
开发者ID:Henricus-Basien,项目名称:paparazzi,代码行数:58,代码来源:stabilization_adaptive.c

示例12: cam_init

void cam_init(void)
{
  cam_mode = CAM_MODE0;

  register_periodic_telemetry(DefaultPeriodic, PPRZ_MSG_ID_CAM, send_cam);
#ifdef SHOW_CAM_COORDINATES
  register_periodic_telemetry(DefaultPeriodic, PPRZ_MSG_ID_CAM_POINT, send_cam_point);
#endif
}
开发者ID:Pold87,项目名称:paparazzi_new,代码行数:9,代码来源:cam.c

示例13: init_fbw

/********** INIT *************************************************************/
void init_fbw(void)
{
    mcu_init();

#if !(DISABLE_ELECTRICAL)
    electrical_init();
#endif

#ifdef ACTUATORS
    actuators_init();
    /* Load the failsafe defaults */
    SetCommands(commands_failsafe);
    fbw_new_actuators = 1;
#endif /* ACTUATORS */

#ifdef RADIO_CONTROL
    radio_control_init();
#endif /* RADIO_CONTROL */

#ifdef INTER_MCU
    inter_mcu_init();
#endif /* INTER_MCU */

#if defined MCU_SPI_LINK || defined MCU_CAN_LINK
    link_mcu_init();
#endif /* MCU_SPI_LINK || MCU_CAN_LINK */

#ifdef MCU_SPI_LINK
    link_mcu_restart();
#endif /* MCU_SPI_LINK */

    fbw_mode = FBW_MODE_FAILSAFE;

    /**** start timers for periodic functions *****/
    fbw_periodic_tid = sys_time_register_timer((1. / 60.), NULL);
    electrical_tid = sys_time_register_timer(0.1, NULL);

#ifndef SINGLE_MCU
    mcu_int_enable();
#endif

#if PERIODIC_TELEMETRY
    register_periodic_telemetry(DefaultPeriodic, PPRZ_MSG_ID_FBW_STATUS, send_fbw_status);
    register_periodic_telemetry(DefaultPeriodic, PPRZ_MSG_ID_COMMANDS, send_commands);

#ifdef ACTUATORS
    register_periodic_telemetry(DefaultPeriodic, PPRZ_MSG_ID_ACTUATORS, send_actuators);
#endif /* ACTUATORS */

#ifdef RADIO_CONTROL
    register_periodic_telemetry(DefaultPeriodic, PPRZ_MSG_ID_RC, send_rc);
#endif /* RADIO_CONTROL */

#endif /* PERIODIC_TELEMETRY */

}
开发者ID:nvelozsavino,项目名称:paparazzi,代码行数:57,代码来源:main_fbw.c

示例14: ahrs_init

void ahrs_init(void) {
  ahrs.status = AHRS_UNINIT;

  heading = 0.;

#if PERIODIC_TELEMETRY
  register_periodic_telemetry(DefaultPeriodic, "IR_SENSORS", send_infrared);
  register_periodic_telemetry(DefaultPeriodic, "STATE_FILTER_STATUS", send_status);
#endif
}
开发者ID:Abhi0204,项目名称:paparazzi,代码行数:10,代码来源:ahrs_infrared.c

示例15: stabilization_indi_init

void stabilization_indi_init(void)
{
  // Initialize filters
  indi_init_filters();

#if PERIODIC_TELEMETRY
  register_periodic_telemetry(DefaultPeriodic, PPRZ_MSG_ID_STAB_ATTITUDE_INDI, send_att_indi);
  register_periodic_telemetry(DefaultPeriodic, PPRZ_MSG_ID_AHRS_REF_QUAT, send_ahrs_ref_quat);
#endif
}
开发者ID:HWal,项目名称:paparazzi,代码行数:10,代码来源:stabilization_indi_simple.c


注:本文中的register_periodic_telemetry函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。