mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-02 02:24:06 +08:00
* Fix comment * Ekf wrapper for testing Add utility function for accessing information in the ekf object * Add step function for Gps sensor * Add RangeFinder and Flow to simulated sensors * Add first fusion logic tests * Add units to function name * Use EXPECT_TRUE * Adding missing qualifiers * Improve EXPECT_ calls * Improve naming
30 lines
355 B
C++
30 lines
355 B
C++
#include "mag.h"
|
|
|
|
namespace sensor_simulator
|
|
{
|
|
namespace sensor
|
|
{
|
|
|
|
Mag::Mag(std::shared_ptr<Ekf> ekf):Sensor(ekf)
|
|
{
|
|
}
|
|
|
|
Mag::~Mag()
|
|
{
|
|
}
|
|
|
|
void Mag::send(uint32_t time)
|
|
{
|
|
float mag[3];
|
|
_mag_data.copyTo(mag);
|
|
_ekf->setMagData(time,mag);
|
|
}
|
|
|
|
void Mag::setData(const Vector3f& mag)
|
|
{
|
|
_mag_data = mag;
|
|
}
|
|
|
|
} // namespace sensor
|
|
} // namespace sensor_simulator
|