diff --git a/libraries/AP_Beacon/AP_Beacon_Backend.cpp b/libraries/AP_Beacon/AP_Beacon_Backend.cpp index d91e5dea8b..07cc8979f7 100644 --- a/libraries/AP_Beacon/AP_Beacon_Backend.cpp +++ b/libraries/AP_Beacon/AP_Beacon_Backend.cpp @@ -26,8 +26,8 @@ AP_Beacon_Backend::AP_Beacon_Backend(AP_Beacon &frontend) : { } -// set vehicle position: -// pos should be in the beacon's local frame in meters +// set vehicle position +// pos should be in meters in NED frame from the beacon's local origin // accuracy_estimate is also in meters void AP_Beacon_Backend::set_vehicle_position(const Vector3f& pos, float accuracy_estimate) { @@ -36,7 +36,7 @@ void AP_Beacon_Backend::set_vehicle_position(const Vector3f& pos, float accuracy _frontend.veh_pos_ned = correct_for_orient_yaw(pos); } -// set individual beacon distance in meters +// set individual beacon distance from vehicle in meters in NED frame void AP_Beacon_Backend::set_beacon_distance(uint8_t beacon_instance, float distance) { // sanity check instance @@ -54,8 +54,8 @@ void AP_Beacon_Backend::set_beacon_distance(uint8_t beacon_instance, float dista _frontend.beacon_state[beacon_instance].healthy = true; } -// configure beacon's position in meters from origin -// pos should be in the beacon's local frame (meters) +// set beacon's position +// pos should be in meters in NED from the beacon's local origin void AP_Beacon_Backend::set_beacon_position(uint8_t beacon_instance, const Vector3f& pos) { // sanity check instance diff --git a/libraries/AP_Beacon/AP_Beacon_Backend.h b/libraries/AP_Beacon/AP_Beacon_Backend.h index 905c9d14a3..20f6f24a4a 100644 --- a/libraries/AP_Beacon/AP_Beacon_Backend.h +++ b/libraries/AP_Beacon/AP_Beacon_Backend.h @@ -31,14 +31,16 @@ public: // update virtual void update() = 0; - // set vehicle position, pos should be in the beacon's local frame + // set vehicle position + // pos should be in meters in NED frame from the beacon's local origin + // accuracy_estimate is also in meters void set_vehicle_position(const Vector3f& pos, float accuracy_estimate); - // set individual beacon distance in meters + // set individual beacon distance from vehicle in meters in NED frame void set_beacon_distance(uint8_t beacon_instance, float distance); - // configure beacon's position in meters from origin - // pos should be in the beacon's local frame + // set beacon's position + // pos should be in meters in NED from the beacon's local origin void set_beacon_position(uint8_t beacon_instance, const Vector3f& pos); float get_beacon_origin_lat(void) const { return _frontend.origin_lat; } diff --git a/libraries/AP_Beacon/AP_Beacon_SITL.cpp b/libraries/AP_Beacon/AP_Beacon_SITL.cpp index 2aa0af5b67..83dfbf2cfe 100644 --- a/libraries/AP_Beacon/AP_Beacon_SITL.cpp +++ b/libraries/AP_Beacon/AP_Beacon_SITL.cpp @@ -108,7 +108,6 @@ void AP_Beacon_SITL::update(void) set_beacon_distance(beacon_id, beac_veh_offset.length()); set_vehicle_position(veh_pos3d, 0.5f); last_update_ms = now; - } #endif // CONFIG_HAL_BOARD