Commit Graph

85 Commits

Author SHA1 Message Date
Samuel Tabor 684ee11fc3 AP_TECS: Add flags to indicate gliding flight, and use these with AP_Soaring. 2020-04-08 09:11:54 +10:00
Samuel Tabor 247738518e AP_TECS: Add a feed-forward term from adjusted demanded airspeed to nav pitch. 2020-04-08 09:11:54 +10:00
Samuel Tabor a27c99fab9 AP_TECS: Return the adjusted demanded airspeed. The aspd_error mavlink message now shows the rate-limited airspeed. 2020-04-08 09:11:54 +10:00
Andrew Tridgell 176d3c0b2f AP_TECS: added reset() method
used at end of VTOL takeoff
2020-02-16 17:04:07 +11:00
Andrew Tridgell a415423975 AP_TECS: removed TECS_LAND_PMIN
thanks to TunaLobster for pointing out that it is redundent
2019-11-19 07:50:40 +11:00
Andrew Tridgell 3e72538f07 AP_TECS: added TECS_LAND_PMIN for min pitch in flare
this is useful to narrow the range of available pitch after flare
2019-10-26 18:05:17 +11:00
Andrew Tridgell 4f243aca02 AP_TECS: prevent rapid changing of pitch limits on landing approach
when on landing approach we estimate time to flare based on two noisy
numbers, the vertical speed and height above ground. With noisy
rangefinders this can change rapidly, which resulted in the pitch
limit changing rapidly, leading to a porpoising movement

this limits the rate of change, and also prevents it coming down once
it has nosed up due to pending flare on approach
2019-08-01 11:28:22 +10:00
Andrew Tridgell 587aa33617 AP_TECS: added TECS_OPTIONS
used for full-time glider
2019-08-01 11:28:22 +10:00
Peter Barker c0f25a96fb AP_TECS: move include of logger to .cpp file 2019-07-09 10:57:20 +10:00
Andrew Tridgell c3545be8a1 AP_TECS: fixed a bug in changes from rate-limited to non-limited airspeed
The calculation of the non-limited airspeed rate demand used the last
non-limited airspeed, whereas it should have used the last adjusted
value. This led to a single frame spike in airspeed demand, which fed
through to a sudden change in pitch integrator.
2019-04-01 12:14:25 +11:00
Peter Barker b47733142f GLOBAL: rename DataFlash_Class to AP_Logger 2019-01-18 18:08:20 +11:00
Andrew Tridgell f3336fdb60 AP_TECS: removed dependency on soaring controller 2018-07-30 13:09:15 +10:00
Andrew Tridgell b6ecce8329 AP_TECS: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Lucas De Marchi 61a629d766 AP_TECS: add static create method 2017-09-26 03:01:21 +01:00
Andrey Kolobov 5fdebe23cc AP_TECS: disable bad descent for soaring 2017-03-14 08:53:11 +11:00
akolobov a3f3097941 AP_TECS: added function to reset integrator 2017-03-14 08:20:48 +11:00
Tom Pittenger 84e11fd899 Plane, AP_TECS: do not pass auto_land flag to TECS, it already knows it 2016-12-30 23:50:03 -08:00
Tom Pittenger 8019cedf5b AP_Vehicle,AP_SpdHgtControl,AP_TECS: move enum FlightStages to AP_Vehicle::FixedWing 2016-12-30 23:50:02 -08:00
Tom Pittenger b614b41d6d AP_TECS: fixed compiler warning
- AP_Landing _landing was declared out-of-order
2016-12-05 16:46:55 -08:00
Tom Pittenger 9035dcbbc5 AP_TECS: migrate aparm "LAND_" params from plane to AP_Landing 2016-11-25 19:07:30 -08:00
Mathieu OTHACEHE 152edf7189 Global: remove mode line from headers
Using a global .dir-locals.el file is a better alternative than
reincluding the same emacs header in every file of the project.
2016-10-24 09:42:01 -02:00
Andrew Tridgell 1171b33419 AP_TECS: added TECS_SYNAIRSPEED parameter
this allows for the synthetic airspeed estimate to be used in TECS
2016-10-20 13:22:39 +11:00
Andrew Tridgell 2fab15dcd5 AP_TECS: added use_synthetic_airspeed() API
used by quadplane during transitions
2016-10-05 11:52:34 +11:00
Tom Pittenger e5bd23e34a Revert "AP_TECS: Convert references to AP_Airspeed."
This reverts commit 09d53eaeca.
2016-08-07 17:54:24 -07:00
Tom Pittenger 8dad05d12e Revert "Airspeed: store reference in libraries and populate it"
This reverts commit c090ba2257.
2016-08-07 17:54:24 -07:00
Tom Pittenger c090ba2257 Airspeed: store reference in libraries and populate it
- also had to move the initial definition in plane.h so it happened before the others.
2016-08-04 11:06:44 -07:00
AndersonRayner 09d53eaeca AP_TECS: Convert references to AP_Airspeed. 2016-08-04 10:09:04 -07:00
Tom Pittenger 7be15be185 AP_TECS: slew the hgt_lag_filter when starting a land 2016-07-19 17:19:10 -07:00
Andrew Tridgell d3d2ce3e0d AP_TECS: use full throttle in initial takeoff
during the first part of a takeoff when we have not yet reached the
target airspeed this forces the throttle to maximum. This fixes a case
where the throttle may drop too low during the first part of takeoff
and lead to a stall.
2016-07-16 08:14:29 +10:00
Tom Pittenger 773372d2f3 Revert "AP_TECS: coverity scan - variables not initialized in constructor"
This reverts commit 753c0d47f0.
2016-07-11 22:01:26 -07:00
Tom Pittenger c38c3ae7fe Revert "AP_TECS: coverity scan: init variable struct"
This reverts commit 19713200e5.
2016-07-11 22:01:02 -07:00
Tom Pittenger 19713200e5 AP_TECS: coverity scan: init variable struct 2016-07-05 14:09:40 -07:00
Tom Pittenger 753c0d47f0 AP_TECS: coverity scan - variables not initialized in constructor 2016-07-05 13:53:26 -07:00
Andrew Tridgell 98a86bd205 AP_TECS: create TEC2 log message for detailed energy internals 2016-05-14 08:26:10 +10:00
Andrew Tridgell ff97f52555 AP_TECS: removed log_tuning structure 2016-05-14 08:26:10 +10:00
Andrew Tridgell bc911d15d1 AP_TECS: convert to using Log_Write
preparation for a TEC2 message
2016-05-14 08:26:10 +10:00
Andrew Tridgell c52451b01b AP_TECS: rename some variables to make them clearer 2016-05-14 08:26:09 +10:00
Andrew Tridgell e698d1f47e AP_TECS: use 64 bit micros
prevent possible wrap if TECS is not run for a long time
2016-05-14 08:26:09 +10:00
Tom Pittenger 595badce3e AP_TECS: rely on single flag for all land stage differences
recent fixes in Plane have made the stage more accurate so exceptions/hacks are no longer needed to differentiate between knowing if executing NAV_LAND vs being in stage_approach.
2016-04-21 21:30:52 -07:00
Tom Pittenger 525c7b24e3 AP_TECS: created accessor for TECS_LAND_ARSPD param 2016-04-21 21:30:48 -07:00
Michael du Breuil fd51c3cc16 AP_TECS: Remove hgt_afe from update_50hz() 2016-04-21 17:03:00 +10:00
Andrew Tridgell b4c6a0e30e AP_TECS: added logging of speed_weight and state flags 2016-03-26 08:41:09 +11:00
Andrew Tridgell 8ff932b61c AP_TECS: allow underspeed to end faster
we now can exit an underspeed condition if we stay above min speed for
3 seconds and also reach 15% above min speed. This prevents a problem
with the thrust line causing downpitch leading to a crash due to too
much throttle
2016-03-26 07:44:22 +11:00
Lucas De Marchi 9271e97c0b AP_TECS: replace header guard with pragma once 2016-03-16 18:40:43 +11:00
Tom Pittenger 67e2db7975 AP_TECS: add TECS_LAND_PDAMP
// @Description: This is the damping gain for the pitch demand loop. Increase to add damping  to correct for oscillations in speed and height. If set to 0 then TECS_PTCH_DAMP will be used instead.
2016-03-02 10:54:21 -08:00
Tom Pittenger fcb802cccc AP_TECS: add TECS_LAND_I_GAIN and TECS_TKOFF_I_GAIN
// more integral gain options for land
2016-03-02 10:54:20 -08:00
Tom Pittenger a139789693 AP_TECS: add TECS_LAND_TDAMP for land damp
+     // @Description: This is the damping gain for the throttle demand loop during and auto-landing. Same as TECS_THR_DAMP but only in effect during an auto-land. Increase to add damping to correct for oscillations in speed and height. When set to 0 landing throttle damp is controlled by TECS_THR_DAMP.
2016-03-02 10:54:19 -08:00
Tom Pittenger 67ce22660e AP_TECS: 1/3 new param TECS_LAND_SRC for Land Sink Rate Change
// @Description: When zero, the flare sink rate (TECS_LAND_SINK) is a fixed sink demand. With this enabled the flare sinkrate will increase/decrease the flare sink demand as you get further beyond the LAND waypoint. Has no effect before the waypoint. This value is added to TECS_LAND_SINK proportional to distance traveled after wp. With an increasing sink rate you can still land in a given distance if you're traveling too fast and cruise passed the land point. A positive value will force the plane to land sooner proportional to distance passed land point. A negative number will tell the plane to slowly climb allowing for a pitched-up stall landing. Recommend 0.2 as initial value.
2016-02-12 11:38:40 -08:00
Tom Pittenger e40bba3d13 AP_TECS: removing mission_cmd in TECS and making it bool is_landing
this is reverse-thrust cleanup
2016-02-12 11:08:47 -08:00
Tom Pittenger 5ba2bff85f AP_TECS: Reverse Thrust
Reverse thrust for controlled landings, even with much steeper approach slopes. This is achieved by allowing throttle demand to go negative to maintain a target airspeed. A Pre-Flare stage was added, triggered by an altitude, to allow for a slower airspeed just before land. That lower airspeed can be near stall.
new params TECS_APPR_SMAX - sink rate max during approach
2016-02-09 14:18:02 +11:00