Commit Graph

135 Commits

Author SHA1 Message Date
Beat Küng c715228b8f LandDetector: save & initialize total flight time 2017-03-08 04:19:22 +08:00
Lorenz Meier daf668e687 Fixed wing land detector: Fix RTL logic with a temporary altitude limit workaround 2017-03-07 15:48:23 +08:00
Matthias Grob 2b90224075 land_detector: added parameter for manual position stick takeoff threshold 2017-02-28 13:05:33 +01:00
Dennis Mannhart 9c2dd48814 landdetector: m/s to m 2017-02-27 22:54:19 +01:00
Dennis Mannhart 7f54f891c1 land_detector: set max height to 100 2017-02-27 22:54:19 +01:00
Dennis Mannhart 3d4e7819a0 landdetector: delete function update_alt_max 2017-02-27 22:54:19 +01:00
Dennis Mannhart 1774e01c00 rtl: keep rtl altitude below max altitude
land_detector: delete unused class enum
2017-02-27 22:54:19 +01:00
Dennis Mannhart a1982e0392 land_detector: battery level status to adjust maximum altitude possible 2017-02-27 22:54:19 +01:00
Matthias Grob e6031a97fa land_detector: added a parameter for the manual land detection stick throshold
because it is definitely something that needs to be allowed to tune or disable for different application scenarios
2017-02-23 13:18:49 +01:00
Matthias Grob 3183cbda90 land_detector: manual land detection stick throshold less strict
Even for well calibrated RC sticks 5% stick movement is a too small margin for the end user that might not land because of this.
15% is still clearly restricting the stick far down.
2017-02-22 21:56:41 +01:00
Roman 8c9f27bb8a land detector (mc): takeoff throttle should be the same for all manual,
altitude controlled modes

Signed-off-by: Roman <bapstroman@gmail.com>
2017-02-15 15:41:44 +01:00
Matthias Grob 194f0c1de8 land_detector: ground detection corrected comment and clarified condition 2017-02-13 11:34:10 +01:00
Matthias Grob 9963cf532d land_detector: refactored helper method names 2017-02-13 11:34:10 +01:00
Matthias Grob c559f195ec land_detector: Hotfix to prevent ground contact detection when descending velocity is very slow with manual stick all the way down
Now the stick down check is only done in manual control and the thrust low is again mandatory to detect ground in any case.
2017-02-13 11:34:10 +01:00
Beat Küng 3dc6e7b574 LandDetector: use a 64bit counter for total system flight time
The previous 32bit counter wrapped in ~1.19h, this switches to 2 32bit
counters, wrapping in 584942 years.
2017-02-02 09:22:25 +01:00
Beat Küng 05b649cc86 LandDetector: fix total system flight time (landed & takeoff logic) 2017-02-02 09:22:25 +01:00
Lorenz Meier 1c131f2523 Land detector: Accumulate total flight time between flights 2017-01-29 15:48:34 +01:00
Lorenz Meier 35efe651ac Land detector main: Fix style 2017-01-29 15:48:34 +01:00
Lorenz Meier 75132a50e6 Land detector: Measure total system flight time
This implementation is a baseline implementation and makes no attempt to be tamper-proof. A monotonic counter like the W25R64FV or a similar HW facility would be required to achieve this.
2017-01-29 15:48:34 +01:00
Matthias Grob 480dd0922b Land detector: revision of the 2 stage landing mechanism
Ground detect: pilot want down or we are on minimum thrust by auto land but no vertical movement
-> Controller should relax x,y corrections and even ramp down desired thrust
Landed: All other conditions are eventually met
2017-01-28 16:23:04 +01:00
Matthias Grob b130913090 land_detector: made sure the 2 stage landing can not happen in one hysteresis time 2017-01-28 16:23:04 +01:00
Lorenz Meier 9ef97b78c8 Land detector: Turn throttle range parameter into proper user-configurable parameter 2017-01-28 16:23:04 +01:00
Lorenz Meier 9448b8cb52 Land detector: Fix hover throttle detection 2017-01-28 16:23:04 +01:00
Lorenz Meier 58983e4c52 Land detector: Fix code style 2017-01-28 16:23:04 +01:00
Dennis Mannhart 3fe45697bb Fix3dwinglandDetector.cpp: adjusted to astyle 2017-01-28 16:23:04 +01:00
Dennis Mannhart 2f164602b4 LandDetector:
- constructor initalization fix
- set trigger time for ground contact hysteresis
- updated ground_contact_state logic
MulticopterLandDetector:
- added hysteresis for ground_contact
VtolLandDetector:
- get_ground_contact_state function that return the one form MultcopterLandDetector
FixedWingLandDetector:
- get_ground_contact_state with a return false: requires implementation
2017-01-28 16:23:04 +01:00
Lorenz Meier 9e9e0e23ad Land detector: Detect ground contact separately
This allows to detect ground contact before concluding the system is landed. This allows to disable some parts of the horizontal control system and only control the vertical position to avoid tipping over.
;
2017-01-28 16:23:04 +01:00
Matthias Grob 5b54d78128 land detector: changed minimum throttle threshold to have useful landing detection in real world scenarios 2017-01-16 08:25:26 -08:00
Matthias Grob f95fb0f20f land detector: commented takeoff throttle values for each mode 2017-01-16 08:25:26 -08:00
Matthias Grob 7ab2958757 land_detector: added takeoff throttle threshold
if we control manually and are still landed, we want to stay idle until the pilot rises the throttle
2017-01-16 08:25:26 -08:00
Lorenz Meier 66226fb754 Land detector: Harden string handling
Due to known input this was not a real issue, but bad style.
2017-01-03 14:44:45 +01:00
Matthias Grob b79e4ab506 land detector: reverted scientific notation unwanted doubles 2016-12-26 15:36:43 +01:00
Matthias Grob 03d7b65299 land detector: refactoring ff to freefall 2016-12-26 15:36:43 +01:00
Matthias Grob 808dedf441 land detector: small refactor while studying 2016-12-26 15:36:43 +01:00
Julian Oes 8ff237c69f Remove size optimization for individual modules
It makes more sense to set the optimization flags on a platform basis
instead of individually for each module. This allows for different
optimization options for SITL, NuttX, Snapdragon, etc.
2016-09-30 08:11:51 +02:00
Daniel Agar ebdfa2860b land_detector status cleanup 2016-09-27 08:49:45 +02:00
Julian Oes 21bc5d1716 land_detector: remove leftover printf (#5178) 2016-07-31 07:49:11 -07:00
Julian Oes 6bf4bd5f35 land_detector: remove unused variable 2016-07-30 12:26:56 +02:00
Julian Oes 50cac88e5b land_detector: big refactor, share update function
This is a big refactor and general cleanup of the land detector. The
main functional change is to share the hysteresis lib across all land
detectors.
2016-07-30 12:26:56 +02:00
Julian Oes 9f928308c4 land_detector: astyle 2016-07-30 12:26:56 +02:00
Julian Oes 93acff8641 MulticopterLandDetector: remove always true call
The result from `!get_freefall_state()` was always true because
`get_freefall_state()` is already called before `get_landed_state()` is
called. Only if we're not in a freefall, we check if we are landed.
2016-07-30 12:26:56 +02:00
Julian Oes 740bfc0b32 MulticopterLandDetector: use hysteresis lib
The hysteresis was not properly implemented in the land detector and is
therefore replaced by the library call, both for the freefall detector
and the land detector.
2016-07-30 12:26:56 +02:00
tumbili 8026273cb0 land_detector: do not publish if landing or freefall state has not changed
Signed-off-by: tumbili <roman@px4.io> and bkueng <beat-kueng@gmx.net>
2016-06-23 15:56:51 +02:00
Julian Oes f56e951f00 land_detector: don't estimate freefall on 0 data 2016-06-07 12:34:54 +02:00
Julian Oes b2719cf439 land_detector: publish when there is proper data
Instead of publishing before even having done update(), let's wait for a
result and then advertise.
2016-06-07 12:34:54 +02:00
Julian Oes 64109daff8 land_detector: fix timestamp type (#4710)
The overflow of the uint32_t lead to the land_detector start getting
aborted.
2016-06-01 17:15:27 +02:00
Julian Oes 224fbbc26b land_detector: fix uninitialized value (#4659) 2016-05-27 17:18:51 +02:00
Lorenz Meier db5212a209 Land detector: add missing init 2016-05-13 10:34:13 +02:00
Julian Oes 49ae3e17d5 land_detector: fix wrong astyle formatting (#4399) 2016-04-29 15:36:18 +02:00
Lorenz Meier 1b11049e42 Land detector: fix code style 2016-04-29 15:01:39 +02:00