Daniel Agar 03cfcb903e
EKF: RingBuffer minor improvements
- allocate IMU and output buffers on construction according to defaults
 - determine buffer max time delay based on configuration parameters
 - reorder flowSample and extVisionSample to minimize padding
 - adjust parameter defaults to match PX4-Autopilot
2020-12-03 20:48:51 -05:00

28 lines
334 B
C++

#include "mag.h"
namespace sensor_simulator
{
namespace sensor
{
Mag::Mag(std::shared_ptr<Ekf> ekf):Sensor(ekf)
{
}
Mag::~Mag()
{
}
void Mag::send(uint64_t time)
{
_ekf->setMagData(magSample{time, _mag_data});
}
void Mag::setData(const Vector3f& mag)
{
_mag_data = mag;
}
} // namespace sensor
} // namespace sensor_simulator