CalibrateMag sensor class.
More...
#include <mag_cal.h>
|
void | eigSort (Eigen::MatrixXd &w, Eigen::MatrixXd &v) |
|
Eigen::MatrixXd | ellipsoidLS (EigenSTL::vector_Vector3d meas) |
|
Eigen::MatrixXd | ellipsoidRANSAC (EigenSTL::vector_Vector3d meas, int iters, double inlier_thresh) |
|
Eigen::Vector3d | intersect (Eigen::Vector3d r_m, Eigen::Vector3d r_e, Eigen::MatrixXd Q, Eigen::MatrixXd ub, double k) |
|
void | magCal (Eigen::MatrixXd u, Eigen::MatrixXd &A, Eigen::MatrixXd &bb) |
|
bool | set_param (std::string name, double value) |
|
CalibrateMag sensor class.
Definition at line 62 of file mag_cal.h.
◆ CalibrateMag()
rosflight::CalibrateMag::CalibrateMag |
( |
| ) |
|
◆ a11()
const double rosflight::CalibrateMag::a11 |
( |
| ) |
const |
|
inline |
The const stuff is to make it read-only.
Definition at line 91 of file mag_cal.h.
◆ a12()
const double rosflight::CalibrateMag::a12 |
( |
| ) |
const |
|
inline |
◆ a13()
const double rosflight::CalibrateMag::a13 |
( |
| ) |
const |
|
inline |
◆ a21()
const double rosflight::CalibrateMag::a21 |
( |
| ) |
const |
|
inline |
◆ a22()
const double rosflight::CalibrateMag::a22 |
( |
| ) |
const |
|
inline |
◆ a23()
const double rosflight::CalibrateMag::a23 |
( |
| ) |
const |
|
inline |
◆ a31()
const double rosflight::CalibrateMag::a31 |
( |
| ) |
const |
|
inline |
◆ a32()
const double rosflight::CalibrateMag::a32 |
( |
| ) |
const |
|
inline |
◆ a33()
const double rosflight::CalibrateMag::a33 |
( |
| ) |
const |
|
inline |
◆ bx()
const double rosflight::CalibrateMag::bx |
( |
| ) |
const |
|
inline |
◆ by()
const double rosflight::CalibrateMag::by |
( |
| ) |
const |
|
inline |
◆ bz()
const double rosflight::CalibrateMag::bz |
( |
| ) |
const |
|
inline |
◆ do_mag_calibration()
void rosflight::CalibrateMag::do_mag_calibration |
( |
| ) |
|
◆ eigSort()
void rosflight::CalibrateMag::eigSort |
( |
Eigen::MatrixXd & |
w, |
|
|
Eigen::MatrixXd & |
v |
|
) |
| |
|
private |
◆ ellipsoidLS()
◆ ellipsoidRANSAC()
◆ intersect()
Eigen::Vector3d rosflight::CalibrateMag::intersect |
( |
Eigen::Vector3d |
r_m, |
|
|
Eigen::Vector3d |
r_e, |
|
|
Eigen::MatrixXd |
Q, |
|
|
Eigen::MatrixXd |
ub, |
|
|
double |
k |
|
) |
| |
|
private |
◆ is_calibrating()
bool rosflight::CalibrateMag::is_calibrating |
( |
| ) |
|
|
inline |
Check if a calibration is in progress.
- Returns
- True if a calibration is currently in progress
Definition at line 88 of file mag_cal.h.
◆ mag_callback()
bool rosflight::CalibrateMag::mag_callback |
( |
const sensor_msgs::MagneticField::ConstPtr & |
mag | ) |
|
set_refence_magnetic_field_strength
- Parameters
-
Definition at line 159 of file mag_cal.cpp.
◆ magCal()
void rosflight::CalibrateMag::magCal |
( |
Eigen::MatrixXd |
u, |
|
|
Eigen::MatrixXd & |
A, |
|
|
Eigen::MatrixXd & |
bb |
|
) |
| |
|
private |
◆ run()
void rosflight::CalibrateMag::run |
( |
| ) |
|
◆ set_param()
bool rosflight::CalibrateMag::set_param |
( |
std::string |
name, |
|
|
double |
value |
|
) |
| |
|
private |
◆ set_reference_magnetic_field_strength()
void rosflight::CalibrateMag::set_reference_magnetic_field_strength |
( |
double |
reference_magnetic_field | ) |
|
◆ start_mag_calibration()
void rosflight::CalibrateMag::start_mag_calibration |
( |
| ) |
|
Begin the magnetometer calibration routine.
Definition at line 137 of file mag_cal.cpp.
◆ A_
Eigen::MatrixXd rosflight::CalibrateMag::A_ |
|
private |
◆ b_
Eigen::MatrixXd rosflight::CalibrateMag::b_ |
|
private |
◆ calibrating_
bool rosflight::CalibrateMag::calibrating_ |
|
private |
whether a temperature calibration is in progress
Definition at line 119 of file mag_cal.h.
◆ calibration_time_
double rosflight::CalibrateMag::calibration_time_ |
|
private |
seconds to record data for temperature compensation
Definition at line 121 of file mag_cal.h.
◆ first_time_
bool rosflight::CalibrateMag::first_time_ |
|
private |
waiting for first measurement for calibration
Definition at line 120 of file mag_cal.h.
◆ inlier_thresh_
double rosflight::CalibrateMag::inlier_thresh_ |
|
private |
threshold to consider measurement an inlier in ellipsoidRANSAC
Definition at line 126 of file mag_cal.h.
◆ mag_cal_srv_
◆ mag_subscriber_
◆ measurement_prev_
Eigen::Vector3d rosflight::CalibrateMag::measurement_prev_ |
|
private |
◆ measurement_skip_
int rosflight::CalibrateMag::measurement_skip_ |
|
private |
◆ measurement_throttle_
int rosflight::CalibrateMag::measurement_throttle_ |
|
private |
◆ measurements_
◆ nh_
◆ nh_private_
◆ param_set_client_
◆ ransac_iters_
int rosflight::CalibrateMag::ransac_iters_ |
|
private |
number of ransac iterations to fit ellipsoid to mag measurements
Definition at line 123 of file mag_cal.h.
◆ reference_field_strength_
double rosflight::CalibrateMag::reference_field_strength_ |
|
private |
the strength of earth's magnetic field at your location
Definition at line 117 of file mag_cal.h.
◆ start_time_
double rosflight::CalibrateMag::start_time_ |
|
private |
timestamp of first calibration measurement
Definition at line 122 of file mag_cal.h.
The documentation for this class was generated from the following files: