Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Ardupilot
GitHub Repository: Ardupilot/ardupilot
Path: blob/master/libraries/AC_PrecLand/AC_PrecLand_IRLock.h
9726 views
1
#pragma once
2
3
#include "AC_PrecLand_config.h"
4
5
#if AC_PRECLAND_IRLOCK_ENABLED
6
7
#include <AC_PrecLand/AC_PrecLand_Backend.h>
8
#include <AP_Math/AP_Math.h>
9
#include <AP_IRLock/AP_IRLock_config.h>
10
11
#if AP_IRLOCK_SITL_ENABLED
12
#include <AP_IRLock/AP_IRLock_SITL.h>
13
#elif AP_IRLOCK_I2C_ENABLED
14
#include <AP_IRLock/AP_IRLock_I2C.h>
15
#endif // AP_IRLOCK_I2C_ENABLED
16
17
/*
18
* AC_PrecLand_IRLock - implements precision landing using target vectors provided
19
* by an IRLock
20
*/
21
22
class AC_PrecLand_IRLock : public AC_PrecLand_Backend
23
{
24
public:
25
26
// Constructor
27
AC_PrecLand_IRLock(const AC_PrecLand& frontend, AC_PrecLand::precland_state& state);
28
29
// perform any required initialisation of backend
30
void init() override;
31
32
// retrieve updates from sensor
33
void update() override;
34
35
private:
36
#if AP_IRLOCK_SITL_ENABLED
37
AP_IRLock_SITL irlock;
38
#elif AP_IRLOCK_I2C_ENABLED
39
AP_IRLock_I2C irlock;
40
#endif
41
};
42
43
#endif // AC_PRECLAND_IRLOCK_ENABLED
44
45