AP_L1_Control: remove SpdHgt and use TECS direct
This commit is contained in:
parent
b9d240460b
commit
29455adab4
@ -142,10 +142,10 @@ float AP_L1_Control::loiter_radius(const float radius) const
|
|||||||
float lateral_accel_sea_level = tanf(radians(sanitized_bank_limit)) * GRAVITY_MSS;
|
float lateral_accel_sea_level = tanf(radians(sanitized_bank_limit)) * GRAVITY_MSS;
|
||||||
|
|
||||||
float nominal_velocity_sea_level;
|
float nominal_velocity_sea_level;
|
||||||
if(_spdHgtControl == nullptr) {
|
if(_tecs == nullptr) {
|
||||||
nominal_velocity_sea_level = 0.0f;
|
nominal_velocity_sea_level = 0.0f;
|
||||||
} else {
|
} else {
|
||||||
nominal_velocity_sea_level = _spdHgtControl->get_target_airspeed();
|
nominal_velocity_sea_level = _tecs->get_target_airspeed();
|
||||||
}
|
}
|
||||||
|
|
||||||
float eas2tas_sq = sq(_ahrs.get_EAS2TAS());
|
float eas2tas_sq = sq(_ahrs.get_EAS2TAS());
|
||||||
|
@ -17,14 +17,14 @@
|
|||||||
#include <AP_AHRS/AP_AHRS.h>
|
#include <AP_AHRS/AP_AHRS.h>
|
||||||
#include <AP_Param/AP_Param.h>
|
#include <AP_Param/AP_Param.h>
|
||||||
#include <AP_Navigation/AP_Navigation.h>
|
#include <AP_Navigation/AP_Navigation.h>
|
||||||
#include <AP_SpdHgtControl/AP_SpdHgtControl.h>
|
#include <AP_TECS/AP_TECS.h>
|
||||||
#include <AP_Common/Location.h>
|
#include <AP_Common/Location.h>
|
||||||
|
|
||||||
class AP_L1_Control : public AP_Navigation {
|
class AP_L1_Control : public AP_Navigation {
|
||||||
public:
|
public:
|
||||||
AP_L1_Control(AP_AHRS &ahrs, const AP_SpdHgtControl *spdHgtControl)
|
AP_L1_Control(AP_AHRS &ahrs, const AP_TECS *tecs)
|
||||||
: _ahrs(ahrs)
|
: _ahrs(ahrs)
|
||||||
, _spdHgtControl(spdHgtControl)
|
, _tecs(tecs)
|
||||||
{
|
{
|
||||||
AP_Param::setup_object_defaults(this, var_info);
|
AP_Param::setup_object_defaults(this, var_info);
|
||||||
}
|
}
|
||||||
@ -81,7 +81,7 @@ private:
|
|||||||
AP_AHRS &_ahrs;
|
AP_AHRS &_ahrs;
|
||||||
|
|
||||||
// pointer to the SpdHgtControl object
|
// pointer to the SpdHgtControl object
|
||||||
const AP_SpdHgtControl *_spdHgtControl;
|
const AP_TECS *_tecs;
|
||||||
|
|
||||||
// lateral acceration in m/s required to fly to the
|
// lateral acceration in m/s required to fly to the
|
||||||
// L1 reference point (+ve to right)
|
// L1 reference point (+ve to right)
|
||||||
|
Loading…
Reference in New Issue
Block a user