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/AP_DAL/AP_DAL_VisualOdom.h
Views: 1798
1
#pragma once
2
3
#include <AP_Logger/LogStructure.h>
4
5
#include <AP_VisualOdom/AP_VisualOdom.h>
6
7
#if HAL_VISUALODOM_ENABLED
8
9
class AP_DAL_VisualOdom {
10
public:
11
12
// return VisualOdom health
13
bool healthy() const {
14
return RVOH.healthy;
15
}
16
17
bool enabled() const {
18
return RVOH.enabled;
19
}
20
21
uint16_t get_delay_ms() const {
22
return RVOH.delay_ms;
23
}
24
25
// return a 3D vector defining the position offset of the camera in meters relative to the body frame origin
26
const Vector3f &get_pos_offset() const {
27
return RVOH.pos_offset;
28
}
29
30
// update position offsets to align to AHRS position
31
// should only be called when this library is not being used as the position source
32
void align_position_to_ahrs(bool align_xy, bool align_z);
33
34
void start_frame();
35
36
void handle_message(const log_RVOH &msg) {
37
RVOH = msg;
38
}
39
40
private:
41
42
struct log_RVOH RVOH;
43
};
44
45
#endif // HAL_VISUALODOM_ENABLED
46
47