CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
Ardupilot

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

GitHub Repository: Ardupilot/ardupilot
Path: blob/master/libraries/AC_PrecLand/AC_PrecLand_IRLock.h
Views: 1798
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
10
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
11
#include <AP_IRLock/AP_IRLock_SITL.h>
12
#else
13
#include <AP_IRLock/AP_IRLock.h>
14
#endif
15
16
/*
17
* AC_PrecLand_IRLock - implements precision landing using target vectors provided
18
* by an IRLock
19
*/
20
21
class AC_PrecLand_IRLock : public AC_PrecLand_Backend
22
{
23
public:
24
25
// Constructor
26
AC_PrecLand_IRLock(const AC_PrecLand& frontend, AC_PrecLand::precland_state& state);
27
28
// perform any required initialisation of backend
29
void init() override;
30
31
// retrieve updates from sensor
32
void update() override;
33
34
private:
35
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
36
AP_IRLock_SITL irlock;
37
#else
38
AP_IRLock_I2C irlock;
39
#endif
40
};
41
42
#endif // AC_PRECLAND_IRLOCK_ENABLED
43
44