Small navigator refactor/cleanup

This commit is contained in:
Julian Kent
2021-01-13 10:26:10 +01:00
committed by Julian Kent
parent 04d859e36e
commit c745c8bb45
5 changed files with 176 additions and 136 deletions
@@ -1,4 +1,42 @@
/****************************************************************************
*
* Copyright (c) 2013 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
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name PX4 nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/**
* @file fake_geofence.h
* Provides a fake geofence interface to use for testing
*
* @author Roman Bapst
* @author Julian Kent
*/
#include"../geofence.h"
@@ -180,4 +218,4 @@ extern "C" {
dm_restart(
dm_reset_reason restart_type /* The last reset type */
) {return 0;};
}
}
@@ -51,11 +51,6 @@ GeofenceBreachAvoidance::GeofenceBreachAvoidance() :
updateParameters();
}
GeofenceBreachAvoidance::~GeofenceBreachAvoidance()
{
}
void GeofenceBreachAvoidance::updateParameters()
{
param_get(_paramHandle.param_mpc_jerk_max, &_params.param_mpc_jerk_max);
@@ -53,7 +53,7 @@ class GeofenceBreachAvoidance : public ModuleParams
public:
GeofenceBreachAvoidance();
~GeofenceBreachAvoidance();
~GeofenceBreachAvoidance() = default;
matrix::Vector2<double> getFenceViolationTestPoint();
@@ -143,4 +143,4 @@ private:
matrix::Vector2<double> waypointFromHomeToTestPointAtDist(float distance);
};
};