这篇教程C++ AP_AHRS类代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中AP_AHRS类的典型用法代码示例。如果您正苦于以下问题:C++ AP_AHRS类的具体用法?C++ AP_AHRS怎么用?C++ AP_AHRS使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。 在下文中一共展示了AP_AHRS类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: send_ahrsvoid GCS_MAVLINK::send_ahrs(AP_AHRS &ahrs){ const Vector3f &omega_I = ahrs.get_gyro_drift(); mavlink_msg_ahrs_send( chan, omega_I.x, omega_I.y, omega_I.z, 0, 0, ahrs.get_error_rp(), ahrs.get_error_yaw());}
开发者ID:walmis,项目名称:APMLib,代码行数:13,
示例2: // report AHRS2 statevoid GCS_MAVLINK::send_ahrs2(AP_AHRS &ahrs){#if AP_AHRS_NAVEKF_AVAILABLE Vector3f euler; struct Location loc; if (ahrs.get_secondary_attitude(euler) && ahrs.get_secondary_position(loc)) { mavlink_msg_ahrs2_send(chan, euler.x, euler.y, euler.z, loc.alt*1.0e-2f, loc.lat, loc.lng); }#endif}
开发者ID:AdiKulkarni,项目名称:ardupilot,代码行数:17,
示例3: mavlink_msg_ahrs2_send// report AHRS2 statevoid GCS_MAVLINK::send_ahrs2(AP_AHRS &ahrs){#if AP_AHRS_NAVEKF_AVAILABLE Vector3f euler; struct Location loc {}; if (ahrs.get_secondary_attitude(euler)) { mavlink_msg_ahrs2_send(chan, euler.x, euler.y, euler.z, loc.alt*1.0e-2f, loc.lat, loc.lng); } AP_AHRS_NavEKF &_ahrs = reinterpret_cast<AP_AHRS_NavEKF&>(ahrs); if (_ahrs.get_NavEKF2().activeCores() > 0) { _ahrs.get_NavEKF2().getLLH(loc); _ahrs.get_NavEKF2().getEulerAngles(-1,euler); mavlink_msg_ahrs3_send(chan, euler.x, euler.y, euler.z, loc.alt*1.0e-2f, loc.lat, loc.lng, 0, 0, 0, 0); }#endif}
开发者ID:VirtualRobotixItalia,项目名称:ardupilot,代码行数:30,
示例4: send_feedback/* Send camera feedback to the GCS */void AP_Camera::send_feedback(mavlink_channel_t chan, AP_GPS &gps, const AP_AHRS &ahrs, const Location ¤t_loc){ float altitude, altitude_rel; if (current_loc.flags.relative_alt) { altitude = current_loc.alt+ahrs.get_home().alt; altitude_rel = current_loc.alt; } else { altitude = current_loc.alt; altitude_rel = current_loc.alt - ahrs.get_home().alt; } mavlink_msg_camera_feedback_send(chan, gps.time_epoch_usec(), 0, 0, _image_index, current_loc.lat, current_loc.lng, altitude/100.0f, altitude_rel/100.0f, ahrs.roll_sensor/100.0f, ahrs.pitch_sensor/100.0f, ahrs.yaw_sensor/100.0f, 0.0f,CAMERA_FEEDBACK_PHOTO);}
开发者ID:54dashayu,项目名称:ardupilot,代码行数:22,
示例5: send_local_position/* send LOCAL_POSITION_NED message */void GCS_MAVLINK::send_local_position(const AP_AHRS &ahrs) const{ Vector3f local_position, velocity; if (!ahrs.get_relative_position_NED(local_position) || !ahrs.get_velocity_NED(velocity)) { // we don't know the position and velocity return; } mavlink_msg_local_position_ned_send( chan, hal.scheduler->millis(), local_position.x, local_position.y, local_position.z, velocity.x, velocity.y, velocity.z);}
开发者ID:radiohail,项目名称:ardupilot,代码行数:22,
注:本文中的AP_AHRS类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ AP_Baro类代码示例 C++ APInt类代码示例 |