aboutsummaryrefslogtreecommitdiff
path: root/src/modules/fw_pos_control_l1/landingslope.cpp
diff options
context:
space:
mode:
authorThomas Gubler <thomasgubler@gmail.com>2013-12-25 17:10:38 +0100
committerThomas Gubler <thomasgubler@gmail.com>2013-12-25 17:10:38 +0100
commitb02b48290fdb5464020ea49209144ab8d5d045af (patch)
treedb6f8ec161a1d776fbded9c8217e75cdc042c62e /src/modules/fw_pos_control_l1/landingslope.cpp
parentd07cc95339e43d4ed3cdf480acf528fb57f989aa (diff)
downloadpx4-firmware-b02b48290fdb5464020ea49209144ab8d5d045af.tar.gz
px4-firmware-b02b48290fdb5464020ea49209144ab8d5d045af.tar.bz2
px4-firmware-b02b48290fdb5464020ea49209144ab8d5d045af.zip
Navigator: add MissionFeasibilityChecker class; performs validation of landing waypoint set-up for fixed wing for now, but can be extended for other checks (e.g. check mission against geofence)
Diffstat (limited to 'src/modules/fw_pos_control_l1/landingslope.cpp')
-rw-r--r--src/modules/fw_pos_control_l1/landingslope.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/modules/fw_pos_control_l1/landingslope.cpp b/src/modules/fw_pos_control_l1/landingslope.cpp
index a2d8525b9..b139a6397 100644
--- a/src/modules/fw_pos_control_l1/landingslope.cpp
+++ b/src/modules/fw_pos_control_l1/landingslope.cpp
@@ -1,9 +1,7 @@
/****************************************************************************
*
* Copyright (C) 2008-2012 PX4 Development Team. All rights reserved.
- * Author: @author Lorenz Meier <lm@inf.ethz.ch>
- * @author Thomas Gubler <thomasgubler@student.ethz.ch>
- * @author Julian Oes <joes@student.ethz.ch>
+ * Author: @author Thomas Gubler <thomasgubler@student.ethz.ch>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -37,7 +35,6 @@
/*
* @file: landingslope.cpp
*
- * @author: Thomas Gubler <thomasgubler@gmail.com>
*/
#include "landingslope.h"
@@ -74,11 +71,12 @@ void Landingslope::calculateSlopeValues()
float Landingslope::getLandingSlopeAbsoluteAltitude(float wp_distance, float wp_altitude)
{
- return (wp_distance - _horizontal_slope_displacement) * tanf(_landing_slope_angle_rad) + wp_altitude; //flare_relative_alt is negative
+ return Landingslope::getLandingSlopeAbsoluteAltitude(wp_distance, wp_altitude, _horizontal_slope_displacement, _landing_slope_angle_rad);
}
-float Landingslope::getFlarceCurveAltitude(float wp_distance, float wp_altitude)
+float Landingslope::getFlareCurveAltitude(float wp_landing_distance, float wp_landing_altitude)
{
- return wp_altitude + _H0 * expf(-math::max(0.0f, _flare_length - wp_distance)/_flare_constant) - _H1_virt;
+ return wp_landing_altitude + _H0 * expf(-math::max(0.0f, _flare_length - wp_landing_distance)/_flare_constant) - _H1_virt;
+
}