mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
152edf7189
Using a global .dir-locals.el file is a better alternative than reincluding the same emacs header in every file of the project.
32 lines
660 B
C++
32 lines
660 B
C++
#pragma once
|
|
|
|
#include <SITL/SITL.h>
|
|
|
|
#include "AP_InertialSensor.h"
|
|
#include "AP_InertialSensor_Backend.h"
|
|
|
|
#define INS_SITL_INSTANCES 2
|
|
|
|
class AP_InertialSensor_SITL : public AP_InertialSensor_Backend
|
|
{
|
|
public:
|
|
AP_InertialSensor_SITL(AP_InertialSensor &imu);
|
|
|
|
/* update accel and gyro state */
|
|
bool update();
|
|
|
|
// detect the sensor
|
|
static AP_InertialSensor_Backend *detect(AP_InertialSensor &imu);
|
|
|
|
private:
|
|
bool init_sensor(void);
|
|
void timer_update();
|
|
float rand_float(void);
|
|
float gyro_drift(void);
|
|
|
|
SITL::SITL *sitl;
|
|
|
|
uint8_t gyro_instance[INS_SITL_INSTANCES];
|
|
uint8_t accel_instance[INS_SITL_INSTANCES];
|
|
};
|