mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-18 18:59:07 +08:00
GeofenceBreachAvoidance: remove unused variables and methods
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
parent
c0f26c8fbd
commit
b178c943a6
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2020 PX4 Development Team. All rights reserved.
|
||||
* Copyright (c) 2020-2023 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@ -75,7 +75,6 @@ void GeofenceBreachAvoidance::setHomePosition(double lat, double lon, float alt)
|
||||
{
|
||||
_home_lat_lon(0) = lat;
|
||||
_home_lat_lon(1) = lon;
|
||||
_home_alt_amsl = alt;
|
||||
}
|
||||
|
||||
matrix::Vector2<double> GeofenceBreachAvoidance::waypointFromBearingAndDistance(matrix::Vector2<double>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2020 PX4 Development Team. All rights reserved.
|
||||
* Copyright (c) 2020-2023 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@ -39,7 +39,7 @@
|
||||
|
||||
class Geofence;
|
||||
|
||||
#define GEOFENCE_CHECK_INTERVAL_US 200000
|
||||
#define GEOFENCE_CHECK_INTERVAL_US 200000 // 0.2s
|
||||
|
||||
union geofence_violation_type_u {
|
||||
struct {
|
||||
@ -95,8 +95,6 @@ public:
|
||||
|
||||
void setMaxHorDistHome(float dist) { _max_hor_dist_home = dist; }
|
||||
|
||||
void setMaxVerDistHome(float dist) { _max_ver_dist_home = dist; }
|
||||
|
||||
void updateParameters();
|
||||
|
||||
private:
|
||||
@ -134,10 +132,8 @@ private:
|
||||
|
||||
matrix::Vector2<double> _current_pos_lat_lon{};
|
||||
matrix::Vector2<double> _home_lat_lon {};
|
||||
float _home_alt_amsl{0.0f};
|
||||
|
||||
float _max_hor_dist_home{0.0f};
|
||||
float _max_ver_dist_home{0.0f};
|
||||
|
||||
void updateMinHorDistToFenceMultirotor();
|
||||
|
||||
|
||||
@ -966,7 +966,6 @@ void Navigator::geofence_breach_check(bool &have_geofence_position_data)
|
||||
_gf_breach_avoidance.setTestPointBearing(test_point_bearing);
|
||||
_gf_breach_avoidance.setCurrentPosition(_global_pos.lat, _global_pos.lon, _global_pos.alt);
|
||||
_gf_breach_avoidance.setMaxHorDistHome(_geofence.getMaxHorDistanceHome());
|
||||
_gf_breach_avoidance.setMaxVerDistHome(_geofence.getMaxVerDistanceHome());
|
||||
|
||||
if (home_global_position_valid()) {
|
||||
_gf_breach_avoidance.setHomePosition(_home_pos.lat, _home_pos.lon, _home_pos.alt);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user