这篇教程C++ using_EKF函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中using_EKF函数的典型用法代码示例。如果您正苦于以下问题:C++ using_EKF函数的具体用法?C++ using_EKF怎么用?C++ using_EKF使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了using_EKF函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: get_gyro// return the smoothed gyro vector corrected for driftconst Vector3f &AP_AHRS_NavEKF::get_gyro(void) const{ if (!using_EKF()) { return AP_AHRS_DCM::get_gyro(); } return _gyro_estimate;}
开发者ID:APM602,项目名称:APM602,代码行数:8,
示例2: get_accel_ef_blended// blended accelerometer values in the earth frame in m/s/sconst Vector3f &AP_AHRS_NavEKF::get_accel_ef_blended(void) const{ if(!using_EKF()) { return AP_AHRS_DCM::get_accel_ef_blended(); } return _accel_ef_ekf_blended;}
开发者ID:APM602,项目名称:APM602,代码行数:8,
示例3: get_position// dead-reckoning supportbool AP_AHRS_NavEKF::get_position(struct Location &loc){ if (using_EKF() && EKF.getLLH(loc)) { return true; } return AP_AHRS_DCM::get_position(loc);}
开发者ID:DSGS,项目名称:ardupilot,代码行数:8,
示例4: get_relative_position_NED// return a relative ground position in meters/second, North/East/Down// order. Must only be called if have_inertial_nav() is truebool AP_AHRS_NavEKF::get_relative_position_NED(Vector3f &vec) const{ if (using_EKF()) { return EKF.getPosNED(vec); } return false;}
开发者ID:APM602,项目名称:APM602,代码行数:9,
示例5: get_accel_ef// accelerometer values in the earth frame in m/s/sconst Vector3f &AP_AHRS_NavEKF::get_accel_ef(uint8_t i) const{ if(!using_EKF()) { return AP_AHRS_DCM::get_accel_ef(i); } return _accel_ef_ekf[i];}
开发者ID:APM602,项目名称:APM602,代码行数:8,
示例6: get_dcm_matrixconst Matrix3f &AP_AHRS_NavEKF::get_dcm_matrix(void) const{ if (!using_EKF()) { return AP_AHRS_DCM::get_dcm_matrix(); } return _dcm_matrix;}
开发者ID:APM602,项目名称:APM602,代码行数:7,
示例7: get_gyro_driftconst Vector3f &AP_AHRS_NavEKF::get_gyro_drift(void) const{ if (!using_EKF()) { return AP_AHRS_DCM::get_gyro_drift(); } return _gyro_bias;}
开发者ID:APM602,项目名称:APM602,代码行数:7,
示例8: use_compass// true if compass is being usedbool AP_AHRS_NavEKF::use_compass(void){ if (using_EKF()) { return EKF.use_compass(); } return AP_AHRS_DCM::use_compass();}
开发者ID:APM602,项目名称:APM602,代码行数:8,
示例9: get_velocity_NED// return a ground velocity in meters/second, North/East/Down// order. Must only be called if have_inertial_nav() is truebool AP_AHRS_NavEKF::get_velocity_NED(Vector3f &vec) const{ if (using_EKF()) { EKF.getVelNED(vec); return true; } return false;}
开发者ID:APM602,项目名称:APM602,代码行数:10,
示例10: wind_estimate// return a wind estimation vector, in m/sVector3f AP_AHRS_NavEKF::wind_estimate(void){ if (!using_EKF()) { return AP_AHRS_DCM::wind_estimate(); } Vector3f wind; EKF.getWind(wind); return wind;}
开发者ID:DSGS,项目名称:ardupilot,代码行数:10,
示例11: groundspeed_vector// EKF has a better ground speed vector estimateVector2f AP_AHRS_NavEKF::groundspeed_vector(void){ if (!using_EKF()) { return AP_AHRS_DCM::groundspeed_vector(); } Vector3f vec; EKF.getVelNED(vec); return Vector2f(vec.x, vec.y);}
开发者ID:APM602,项目名称:APM602,代码行数:10,
示例12: get_position// dead-reckoning supportbool AP_AHRS_NavEKF::get_position(struct Location &loc) const{ Vector3f ned_pos; if (using_EKF() && EKF.getLLH(loc) && EKF.getPosNED(ned_pos)) { // fixup altitude using relative position from AHRS home, not // EKF origin loc.alt = get_home().alt - ned_pos.z*100; return true; } return AP_AHRS_DCM::get_position(loc);}
开发者ID:APM602,项目名称:APM602,代码行数:12,
示例13: get_yaw_for_control_cdfloat AP_AHRS_NavEKF::get_yaw_for_control_cd(void) const{ if (!using_EKF()) { return AP_AHRS_DCM::get_yaw_for_control_cd(); } float ret = degrees(attitude_for_control.get_euler_yaw())*100.0f; if (ret < 0) { ret += 36000; } return ret;}
开发者ID:raulshepherd,项目名称:ardupilot-solo,代码行数:11,
示例14: get_secondary_attitude// return secondary attitude solution if available, as eulers in radiansbool AP_AHRS_NavEKF::get_secondary_attitude(Vector3f &eulers){ if (using_EKF()) { // return DCM attitude eulers = _dcm_attitude; return true; } if (ekf_started) { // EKF is secondary EKF.getEulerAngles(eulers); return true; } // no secondary available return false;}
开发者ID:APM602,项目名称:APM602,代码行数:16,
示例15: get_secondary_position// return secondary position solution if availablebool AP_AHRS_NavEKF::get_secondary_position(struct Location &loc){ if (using_EKF()) { // return DCM position AP_AHRS_DCM::get_position(loc); return true; } if (ekf_started) { // EKF is secondary EKF.getLLH(loc); return true; } // no secondary available return false;}
开发者ID:APM602,项目名称:APM602,代码行数:16,
示例16: healthy/* check if the AHRS subsystem is healthy*/bool AP_AHRS_NavEKF::healthy(void) const{ // If EKF is started we switch away if it reports unhealthy. This could be due to bad // sensor data. If EKF reversion is inhibited, we only switch across if the EKF encounters // an internal processing error, but not for bad sensor data. if (_ekf_use != EKF_DO_NOT_USE) { bool ret = ekf_started && EKF.healthy(); if (!ret) { return false; } if ((_vehicle_class == AHRS_VEHICLE_FIXED_WING || _vehicle_class == AHRS_VEHICLE_GROUND) && !using_EKF()) { // on fixed wing we want to be using EKF to be considered // healthy if EKF is enabled return false; } return true; } return AP_AHRS_DCM::healthy(); }
开发者ID:54dashayu,项目名称:ardupilot,代码行数:24,
示例17: _dcm_attitudevoid AP_AHRS_NavEKF::update(void){ AP_AHRS_DCM::update(); // keep DCM attitude available for get_secondary_attitude() _dcm_attitude(roll, pitch, yaw); if (!ekf_started) { // if we have a compass set and GPS lock we can start the EKF if (get_compass() && get_gps()->status() >= GPS::GPS_OK_FIX_3D) { if (start_time_ms == 0) { start_time_ms = hal.scheduler->millis(); } if (hal.scheduler->millis() - start_time_ms > startup_delay_ms) { ekf_started = true; EKF.InitialiseFilterDynamic(); } } } if (ekf_started) { EKF.UpdateFilter(); EKF.getRotationBodyToNED(_dcm_matrix); if (using_EKF()) { Vector3f eulers; EKF.getEulerAngles(eulers); roll = eulers.x; pitch = eulers.y; yaw = eulers.z; roll_sensor = degrees(roll) * 100; pitch_sensor = degrees(pitch) * 100; yaw_sensor = degrees(yaw) * 100; if (yaw_sensor < 0) yaw_sensor += 36000; update_trig(); } }}
开发者ID:DSGS,项目名称:ardupilot,代码行数:37,
示例18: update_cd_valuesvoid AP_AHRS_NavEKF::update(void){ // we need to restore the old DCM attitude values as these are // used internally in DCM to calculate error values for gyro drift // correction roll = _dcm_attitude.x; pitch = _dcm_attitude.y; yaw = _dcm_attitude.z; update_cd_values(); AP_AHRS_DCM::update(); // keep DCM attitude available for get_secondary_attitude() _dcm_attitude(roll, pitch, yaw); if (!ekf_started) { // wait 10 seconds if (start_time_ms == 0) { start_time_ms = hal.scheduler->millis(); } if (hal.scheduler->millis() - start_time_ms > startup_delay_ms) { ekf_started = true; EKF.InitialiseFilterDynamic(); } } if (ekf_started) { EKF.UpdateFilter(); EKF.getRotationBodyToNED(_dcm_matrix); if (using_EKF()) { Vector3f eulers; EKF.getEulerAngles(eulers); roll = eulers.x; pitch = eulers.y; yaw = eulers.z; update_cd_values(); update_trig(); // keep _gyro_bias for get_gyro_drift() EKF.getGyroBias(_gyro_bias); _gyro_bias = -_gyro_bias; // calculate corrected gryo estimate for get_gyro() _gyro_estimate.zero(); uint8_t healthy_count = 0; for (uint8_t i=0; i<_ins.get_gyro_count(); i++) { if (_ins.get_gyro_health(i)) { _gyro_estimate += _ins.get_gyro(i); healthy_count++; } } if (healthy_count > 1) { _gyro_estimate /= healthy_count; } _gyro_estimate += _gyro_bias; // update _accel_ef_ekf for (uint8_t i=0; i<_ins.get_accel_count(); i++) { if (_ins.get_accel_health(i)) { _accel_ef_ekf[i] = _dcm_matrix * _ins.get_accel(i); } } // update _accel_ef_ekf_blended EKF.getAccelNED(_accel_ef_ekf_blended); } }}
开发者ID:APM602,项目名称:APM602,代码行数:68,
示例19: update_cd_valuesvoid AP_AHRS_NavEKF::update(void){ // we need to restore the old DCM attitude values as these are // used internally in DCM to calculate error values for gyro drift // correction roll = _dcm_attitude.x; pitch = _dcm_attitude.y; yaw = _dcm_attitude.z; update_cd_values(); AP_AHRS_DCM::update(); // keep DCM attitude available for get_secondary_attitude() _dcm_attitude(roll, pitch, yaw); if (!ekf_started) { // wait 1 second for DCM to output a valid tilt error estimate if (start_time_ms == 0) { start_time_ms = hal.scheduler->millis(); } if (hal.scheduler->millis() - start_time_ms > startup_delay_ms) { ekf_started = EKF.InitialiseFilterDynamic(); } } if (ekf_started) { EKF.UpdateFilter(); EKF.getRotationBodyToNED(_dcm_matrix); if (using_EKF()) { Vector3f eulers; EKF.getEulerAngles(eulers); roll = eulers.x; pitch = eulers.y; yaw = eulers.z; update_cd_values(); update_trig(); // keep _gyro_bias for get_gyro_drift() EKF.getGyroBias(_gyro_bias); _gyro_bias = -_gyro_bias; // calculate corrected gryo estimate for get_gyro() _gyro_estimate.zero(); uint8_t healthy_count = 0; for (uint8_t i=0; i<_ins.get_gyro_count(); i++) { if (_ins.get_gyro_health(i)) { _gyro_estimate += _ins.get_gyro(i); healthy_count++; } } if (healthy_count > 1) { _gyro_estimate /= healthy_count; } _gyro_estimate += _gyro_bias; float abias1, abias2; EKF.getAccelZBias(abias1, abias2); // update _accel_ef_ekf for (uint8_t i=0; i<_ins.get_accel_count(); i++) { Vector3f accel = _ins.get_accel(i); if (i==0) { accel.z -= abias1; } else if (i==1) { accel.z -= abias2; } if (_ins.get_accel_health(i)) { _accel_ef_ekf[i] = _dcm_matrix * accel; } } if(_ins.get_accel_health(0) && _ins.get_accel_health(1)) { float IMU1_weighting; EKF.getIMU1Weighting(IMU1_weighting); _accel_ef_ekf_blended = _accel_ef_ekf[0] * IMU1_weighting + _accel_ef_ekf[1] * (1.0f-IMU1_weighting); } else { _accel_ef_ekf_blended = _accel_ef_ekf[0]; } } }}
开发者ID:pacificIT,项目名称:ardupilot,代码行数:81,
示例20: using_EKF// return true if inertial navigation is activebool AP_AHRS_NavEKF::have_inertial_nav(void) const { return using_EKF();}
开发者ID:APM602,项目名称:APM602,代码行数:5,
注:本文中的using_EKF函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ usleep函数代码示例 C++ ushort函数代码示例 |