123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- #pragma once
- #include <AP_Common/AP_Common.h>
- #include <AP_Math/AP_Math.h>
- #include <AP_HAL/AP_HAL.h>
- #include "AP_Beacon.h"
- class AP_Beacon_Backend
- {
- public:
-
- AP_Beacon_Backend(AP_Beacon &frontend);
-
- virtual bool healthy() = 0;
-
- virtual void update() = 0;
-
- void set_vehicle_position(const Vector3f& pos, float accuracy_estimate);
-
- void set_beacon_distance(uint8_t beacon_instance, float distance);
-
-
- void set_beacon_position(uint8_t beacon_instance, const Vector3f& pos);
- float get_beacon_origin_lat(void) const { return _frontend.origin_lat; }
- float get_beacon_origin_lon(void) const { return _frontend.origin_lon; }
- float get_beacon_origin_alt(void) const { return _frontend.origin_alt; }
- protected:
-
- AP_Beacon &_frontend;
-
- int16_t orient_yaw_deg;
- float orient_cos_yaw = 0.0f;
- float orient_sin_yaw = 1.0f;
-
- Vector3f correct_for_orient_yaw(const Vector3f &vector);
- };
|