APM:Libraries
AP_Compass_SITL.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "AP_Compass.h"
4 #include "AP_Compass_Backend.h"
5 
6 #if CONFIG_HAL_BOARD == HAL_BOARD_SITL
7 #include <SITL/SITL.h>
8 #include <AP_Math/vectorN.h>
9 #include <AP_Math/AP_Math.h>
11 
12 #define SITL_NUM_COMPASSES 2
13 
15 public:
17 
18  void read(void);
19 
20 private:
23 
24  // delay buffer variables
26  uint32_t time;
28  };
29  uint8_t store_index;
30  uint32_t last_store_time;
31  static const uint8_t buffer_length = 50;
33 
34  void _timer();
37 
39  uint32_t _accum_count;
40 
41 
42 };
43 #endif // CONFIG_HAL_BOARD
VectorN< readings_compass, buffer_length > buffer
uint32_t last_store_time
SITL::SITL * _sitl
static const uint8_t buffer_length
uint8_t _compass_instance[SITL_NUM_COMPASSES]
#define SITL_NUM_COMPASSES
uint32_t _accum_count
uint32_t _last_sample_time
AP_Compass_SITL(Compass &)