APM:Libraries
|
#include <matrix3.h>
Public Member Functions | |
constexpr | Matrix3 () |
constexpr | Matrix3 (const Vector3< T > &a0, const Vector3< T > &b0, const Vector3< T > &c0) |
constexpr | Matrix3 (const T ax, const T ay, const T az, const T bx, const T by, const T bz, const T cx, const T cy, const T cz) |
void | operator() (const Vector3< T > &a0, const Vector3< T > &b0, const Vector3< T > &c0) |
bool | operator== (const Matrix3< T > &m) |
bool | operator!= (const Matrix3< T > &m) |
Matrix3< T > | operator- (void) const |
Matrix3< T > | operator+ (const Matrix3< T > &m) const |
Matrix3< T > & | operator+= (const Matrix3< T > &m) |
Matrix3< T > | operator- (const Matrix3< T > &m) const |
Matrix3< T > & | operator-= (const Matrix3< T > &m) |
Matrix3< T > | operator* (const T num) const |
Matrix3< T > & | operator*= (const T num) |
Matrix3< T > | operator/ (const T num) const |
Matrix3< T > & | operator/= (const T num) |
Vector3< T > & | operator[] (uint8_t i) |
const Vector3< T > & | operator[] (uint8_t i) const |
Vector3< T > | operator* (const Vector3< T > &v) const |
Vector3< T > | mul_transpose (const Vector3< T > &v) const |
Vector2< T > | mulXY (const Vector3< T > &v) const |
Vector3< T > | colx (void) const |
Vector3< T > | coly (void) const |
Vector3< T > | colz (void) const |
Matrix3< T > | operator* (const Matrix3< T > &m) const |
Matrix3< T > & | operator*= (const Matrix3< T > &m) |
Matrix3< T > | transposed (void) const |
void | transpose (void) |
T | det () const |
bool | inverse (Matrix3< T > &inv) const |
bool | invert () |
void | zero (void) |
void | identity (void) |
bool | is_nan (void) |
void | from_euler (float roll, float pitch, float yaw) |
void | to_euler (float *roll, float *pitch, float *yaw) const |
void | from_rotation (enum Rotation rotation) |
Vector3< T > | to_euler312 () const |
void | from_euler312 (float roll, float pitch, float yaw) |
void | rotate (const Vector3< T > &g) |
void | from_axis_angle (const Vector3< T > &v, float theta) |
void | normalize (void) |
Public Attributes | |
Vector3< T > | a |
Vector3< T > | b |
Vector3< T > | c |
Definition at line 157 of file matrix3.h.
Referenced by AP_AHRS_DCM::drift_correction(), AP_AHRS_DCM::estimate_wind(), and Vector3< int32_t >::operator*().
Definition at line 163 of file matrix3.h.
Referenced by Vector3< int32_t >::operator*().
Definition at line 169 of file matrix3.h.
Referenced by Vector3< int32_t >::operator*().
template double Matrix3< T >::det | ( | ) | const |
Calculate the determinant of this matrix.
Definition at line 197 of file matrix3.cpp.
Referenced by Matrix3< float >::from_axis_angle(), and Matrix3< float >::transpose().
Definition at line 248 of file matrix3.cpp.
Referenced by SITL::Calibration::_calibration_poses(), Matrix3< float >::from_axis_angle(), Matrix3< float >::is_nan(), and test_rotation_accuracy().
template void Matrix3< T >::from_euler | ( | float | roll, |
float | pitch, | ||
float | yaw | ||
) |
Definition at line 26 of file matrix3.cpp.
Referenced by SITL::Calibration::_calibration_poses(), Compass::_setup_earth_field(), SITL::Aircraft::Aircraft(), AP_AHRS::AP_AHRS(), AP_AHRS_View::AP_AHRS_View(), NavEKF2_core::calcQuatAndFieldStates(), NavEKF3_core::calcQuatAndFieldStates(), SITL::Motor::calculate_forces(), AP_AHRS_DCM::drift_correction_yaw(), Matrix3< float >::from_axis_angle(), NavEKF2_core::fuseEulerYaw(), NavEKF3_core::fuseEulerYaw(), Matrix3< float >::is_nan(), loop(), missing_rotations(), CompassLearn::process_sample(), SITL::XPlane::receive_data(), SITL::last_letter::recv_fdm(), SITL::CRRCSim::recv_fdm(), SITL::JSBSim::recv_fdm(), AP_AHRS_DCM::reset(), AP_AHRS_DCM::reset_attitude(), AP_AHRS::set_orientation(), Compass::setHIL(), AP_Mount_Servo::stabilize(), test_conversion(), test_euler(), test_frame_transforms(), test_quaternion(), test_rotation_accuracy(), CompassLearn::update(), AP_OpticalFlow_SITL::update(), SITL::Aircraft::update_dynamics(), SITL::Aircraft::update_mag_field_bf(), AP_AHRS_NavEKF::update_SITL(), and AP_AHRS::update_trig().
void Matrix3< T >::from_euler312 | ( | float | roll, |
float | pitch, | ||
float | yaw | ||
) |
Definition at line 92 of file matrix3.cpp.
Referenced by Matrix3< float >::from_axis_angle(), Quaternion::from_vector312(), NavEKF2_core::fuseEulerYaw(), NavEKF3_core::fuseEulerYaw(), and Matrix3< float >::is_nan().
Definition at line 63 of file matrix3.cpp.
Referenced by SITL::Aircraft::fill_fdm(), Matrix3< float >::from_axis_angle(), Matrix3< float >::is_nan(), and test_rotate_matrix().
|
inline |
Definition at line 219 of file matrix3.h.
Referenced by SITL::Calibration::_calibration_poses(), AP_AHRS_DCM::AP_AHRS_DCM(), AP_AHRS_NavEKF::AP_AHRS_NavEKF(), AP_AHRS_View::AP_AHRS_View(), test_matrix_rotate(), and CompassLearn::update().
Calculate the inverse of this matrix.
inv[in] | Where to store the result. |
inv
is unmodified and false is returned. Definition at line 205 of file matrix3.cpp.
Referenced by Matrix3< float >::from_axis_angle(), TEST_P(), and Matrix3< float >::transpose().
template bool Matrix3< T >::invert | ( | ) |
Invert this matrix if it is invertible.
Definition at line 227 of file matrix3.cpp.
Referenced by Matrix3< float >::from_axis_angle(), Matrix3< float >::transpose(), and CompassLearn::update().
|
inline |
Definition at line 227 of file matrix3.h.
Referenced by AP_AHRS_DCM::check_matrix(), and test_conversion().
template Vector3< double > Matrix3< T >::mul_transpose | ( | const Vector3< T > & | v | ) | const |
Definition at line 165 of file matrix3.cpp.
Referenced by AP_AHRS_DCM::drift_correction(), Matrix3< float >::from_axis_angle(), NavEKF2_core::FuseOptFlow(), NavEKF3_core::FuseOptFlow(), Matrix3< float >::operator[](), Vector3< int32_t >::rotate_inverse(), NavEKF2_core::selectHeightForFusion(), NavEKF3_core::selectHeightForFusion(), NavEKF2_core::SelectVelPosFusion(), NavEKF3_core::SelectVelPosFusion(), Compass::setHIL(), AP_OpticalFlow_SITL::update(), AC_PrecLand_SITL::update(), AP_AHRS::update_AOA_SSA(), NavEKF2_core::UpdateStrapdownEquationsNED(), and NavEKF3_core::UpdateStrapdownEquationsNED().
Definition at line 157 of file matrix3.cpp.
Referenced by Matrix3< float >::from_axis_angle(), Matrix3< float >::operator[](), and AP_AHRS_DCM::yaw_error_compass().
void Matrix3< T >::normalize | ( | void | ) |
Definition at line 135 of file matrix3.cpp.
Referenced by SITL::Aircraft::extrapolate_sensors(), Matrix3< float >::from_axis_angle(), Matrix3< float >::is_nan(), SITL::Gimbal::update(), SITL::Tracker::update(), SITL::SimRover::update(), and SITL::Aircraft::update_dynamics().
Definition at line 113 of file matrix3.h.
Referenced by Matrix3< float >::colz(), Matrix3< float >::from_axis_angle(), and Matrix3< float >::operator[]().
Definition at line 148 of file matrix3.cpp.
Definition at line 174 of file matrix3.cpp.
Definition at line 115 of file matrix3.cpp.
Referenced by SITL::Aircraft::extrapolate_sensors(), Matrix3< float >::from_axis_angle(), Matrix3< float >::is_nan(), AP_AHRS_DCM::matrix_update(), test_matrix_rotate(), test_rotation_accuracy(), SITL::Gimbal::update(), SITL::Tracker::update(), SITL::SimRover::update(), and SITL::Aircraft::update_dynamics().
template void Matrix3< T >::to_euler | ( | float * | roll, |
float * | pitch, | ||
float * | yaw | ||
) | const |
Definition at line 49 of file matrix3.cpp.
Referenced by AP_AHRS::calc_trig(), SITL::SITL::convert_earth_frame(), SITL::JSBSim::create_templates(), AP_AHRS_DCM::euler_angles(), SITL::Aircraft::fill_fdm(), Matrix3< float >::from_axis_angle(), Matrix3< float >::is_nan(), SITL::Aircraft::smooth_sensors(), AP_Mount_Servo::stabilize(), test_conversion(), test_euler(), test_quaternion(), test_rotation_accuracy(), SITL::Tracker::update(), AP_AHRS_View::update(), and SITL::Aircraft::update_dynamics().
Definition at line 81 of file matrix3.cpp.
Referenced by Matrix3< float >::from_axis_angle(), Matrix3< float >::is_nan(), Quaternion::to_vector312(), and SITL::Gimbal::update().
|
inline |
Definition at line 185 of file matrix3.h.
Referenced by AP_Mount_Servo::stabilize(), and AP_AHRS_View::update().
Definition at line 189 of file matrix3.cpp.
Referenced by SoloGimbalEKF::alignHeading(), AP_AHRS::AP_AHRS(), SITL::Frame::calculate_forces(), SITL::Submarine::calculate_forces(), SITL::Plane::calculate_forces(), SITL::Aircraft::extrapolate_sensors(), SITL::Aircraft::fill_fdm(), Matrix3< float >::from_axis_angle(), have_rotation(), Matrix3< float >::operator*=(), Matrix3< float >::transpose(), SITL::Gimbal::update(), SITL::Tracker::update(), SITL::Helicopter::update(), SITL::SimRover::update(), SITL::Balloon::update(), SITL::SingleCopter::update(), SITL::FlightAxis::update(), SITL::Aircraft::update_dynamics(), SITL::Aircraft::update_mag_field_bf(), AP_AHRS_NavEKF::update_SITL(), and AP_AHRS::update_trig().
template void Matrix3< T >::zero | ( | void | ) |
Definition at line 238 of file matrix3.cpp.
Referenced by Matrix3< float >::from_axis_angle(), NavEKF2_core::InitialiseVariables(), NavEKF3_core::InitialiseVariables(), and Matrix3< float >::transpose().
Definition at line 48 of file matrix3.h.
Referenced by AP_TECS::_update_throttle_with_airspeed(), AP_TECS::_update_throttle_without_airspeed(), AP_AHRS::calc_trig(), Quaternion::from_rotation_matrix(), Matrix3< float >::inverse(), AP_AHRS_DCM::normalize(), Matrix3< float >::operator!=(), Matrix3< float >::operator*(), Matrix3< float >::operator+(), Matrix3< float >::operator-(), Matrix3< float >::operator==(), Matrix3< float >::operator[](), Matrix3< float >::rotate(), Quaternion::rotation_matrix(), Quaternion::rotation_matrix_norm(), NavEKF3_core::SelectBodyOdomFusion(), test_matrix_rotate(), and Airspeed_Calibration::update().
Definition at line 48 of file matrix3.h.
Referenced by AP_TECS::_update_throttle_with_airspeed(), AP_TECS::_update_throttle_without_airspeed(), AP_AHRS::calc_trig(), Quaternion::from_rotation_matrix(), Matrix3< float >::inverse(), AP_AHRS_DCM::normalize(), Matrix3< float >::operator!=(), Matrix3< float >::operator*(), Matrix3< float >::operator+(), Matrix3< float >::operator-(), Matrix3< float >::operator==(), Matrix3< float >::rotate(), Quaternion::rotation_matrix(), Quaternion::rotation_matrix_norm(), test_matrix_rotate(), and Airspeed_Calibration::update().
Definition at line 48 of file matrix3.h.
Referenced by AP_AHRS::calc_trig(), Compass::calculate_heading(), AP_AHRS_DCM::check_matrix(), AP_AHRS_DCM::drift_correction_yaw(), NavEKF2_core::EstimateTerrainOffset(), NavEKF3_core::EstimateTerrainOffset(), Quaternion::from_rotation_matrix(), NavEKF2_core::FuseOptFlow(), NavEKF3_core::FuseOptFlow(), AP_AHRS::get_yaw_rate_earth(), Matrix3< float >::inverse(), AP_AHRS_DCM::normalize(), Matrix3< float >::operator!=(), Matrix3< float >::operator*(), Matrix3< float >::operator+(), Matrix3< float >::operator-(), Matrix3< float >::operator==(), Matrix3< float >::rotate(), Quaternion::rotation_matrix(), Quaternion::rotation_matrix_norm(), NavEKF2_core::SelectFlowFusion(), NavEKF3_core::SelectFlowFusion(), NavEKF2_core::selectHeightForFusion(), NavEKF3_core::selectHeightForFusion(), test_matrix_rotate(), AP_OpticalFlow_SITL::update(), Airspeed_Calibration::update(), SITL::Balloon::update(), and AP_TECS::update_50hz().