mcsauder
df662245a2
Standardize class member variable naming convention in the LandDetector class.
2019-06-26 14:06:56 -04:00
mcsauder
d7cfebe0a3
Add check_params(true) call to the LandDetector start() method. Break out _update_total_flight_time() method in the LandDetector class.
2019-06-26 09:23:02 +02:00
mcsauder
f783982edb
Revert changes to the check_params(const bool force) declaration/definition to match current PX4:master.
2019-06-26 09:23:02 +02:00
mcsauder
faa3c3dc6f
Refactor the LandDetector class to
...
- Reduce duplicate code in LandDetector _check_params() method.
- Standardize naming cases.
- Implement DEFINE_PARAMETERS() macro.
2019-06-26 09:23:02 +02:00
Daniel Agar
106ee280c5
land_detector initiate cycle immediately
...
- fixes #12190
2019-06-15 21:30:09 -04:00
Daniel Agar
777b615cf9
land_detector move to PX4 WQ hp_default
2019-06-04 18:10:21 -04:00
Daniel Agar
53aa4130a8
land_detector move orb subscriptions to uORB::Subscription
2019-06-04 18:10:21 -04:00
Julian Oes
b29e5e3adb
hysteresis: remove dependency/side effect on time
2019-05-27 09:57:50 +02:00
Roman
ecc8a696d0
added ground effect reporting to land detector
...
Signed-off-by: Roman <bapstroman@gmail.com>
2019-03-21 10:07:12 +01:00
Daniel Agar
184aa2861a
PX4_ISFINITE use builtin everywhere
2019-02-21 14:56:08 -05:00
Beat Küng
481bfc6308
px4_module: use px4_atomic_t
2019-01-30 10:24:06 -05:00
Daniel Agar
60f2a92e3d
replace <cfloat> with <float.h>
...
- <cfloat> isn't available in the NuttX c++ library
2019-01-06 19:20:57 -05:00
Beat Küng
465d399e8f
land_detector: move _parameterSub to the right place
2018-09-28 16:04:40 +02:00
Beat Küng
b69dd50d90
land_detector: cleanup subscriptions & publications
2018-09-28 16:04:40 +02:00
Mohammed Kabir
1a2f9dd37a
land_detector : use INFINITY when altitude limiting is not needed
2018-06-09 13:38:04 +02:00
Beat Küng
123f11fcdd
land_detector: use user-defined literals for time constants
2018-04-14 13:45:57 +02:00
Daniel Agar
2ae5e575a5
land detector initialize landed and publish periodically
2018-01-24 17:36:53 +01:00
Beat Küng
a0afc370d0
land detector: move arming state into base class & set param when disarming
...
Before that, different modules (ekf2, commander & land detector) changed
params upon different events:
- ekf2 & commander set params after disarm
- land detector set params on land detected
If the 2 events were several 100ms appart, it led to 2 param saves, and
the latter param set could have been blocked by an ongoing save. And if
the land detector was blocked, it could lead to mag timeouts.
This patch makes all modules use the same event, thus only a single param
save will happen.
If we want to have guarantees to never block, we should introduce a
param_try_set() API method.
2017-12-07 11:55:51 +00:00
Beat Küng
0dcf9775f1
LandDetector: make type passed to param_get() explicit
2017-10-27 10:43:15 +02:00
Daniel Agar
f67ac8ba00
land detector clang-tidy trivial changes
2017-08-31 22:49:44 -04:00
Daniel Agar
6e402bd6f4
land detector uniform initialization cleanup
2017-08-31 22:49:44 -04:00
Daniel Agar
cb8cc9a795
land detector add cycle perf
2017-08-31 22:49:44 -04:00
Daniel Agar
90819b2852
land detector move hysteresis constants into FW and MC
2017-08-31 22:49:44 -04:00
Daniel Agar
b70b8288b9
px4_includes cleanup incomplete list
2017-08-20 20:42:42 +02:00
Dennis Mannhart
f75dd37326
landdetector: delete or for ground_contact detection
2017-08-01 19:31:34 +02:00
Dennis Mannhart
f8e9f380d0
landdetector: add additional landdetection state
2017-08-01 19:31:34 +02:00
Beat Küng
8a83fb7dc2
land_detector: use ModuleBase & add module documentation
2017-07-14 11:57:11 +02:00
Beat Küng
1e2ce51c6d
LandDetector: fix vehicle flight time
...
The problem was signed vs unsigned mixing together with 64bit conversion:
int32_t flight_time = ...;
uint64_t _total_flight_time = ...;
_total_flight_time |= flight_time;
When flight_time is negative, the last line would first extend the sign
bit to the upper 32bits of the 64bit uint and then apply the bitwise OR.
The fix is to use an unsigned 32 bit value.
2017-07-04 14:13:18 +02:00
Matthias Grob
d1b270d5b2
land_detector: fix sanity condition that we have ground contact when we are landed to include the hysteresis flag
...
because the condition was looking for the instantaneous flag and during the hysteresis time the state did not change anymore
2017-04-20 13:20:01 +02:00
Beat Küng
4b18f8ea46
LandDetector: remove param_notify_changes()
...
not needed anymore because of autosave
2017-04-06 11:49:03 +02:00
Beat Küng
948635c989
LandDetector: call param_notify_changes() instead of param_save_default()
...
param_save_default() could take something like 0.5s, and because the
LandDetector is running on the HP work queue, this would block other
tasks, like RC handling or drivers.
2017-03-14 21:43:44 +01:00
Beat Küng
c715228b8f
LandDetector: save & initialize total flight time
2017-03-08 04:19:22 +08: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
a1982e0392
land_detector: battery level status to adjust maximum altitude possible
2017-02-27 22:54:19 +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
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
Lorenz Meier
58983e4c52
Land detector: Fix code style
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
Julian Oes
21bc5d1716
land_detector: remove leftover printf ( #5178 )
2016-07-31 07:49:11 -07: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
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
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
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
Lorenz Meier
5c1d2c1cee
Land-detector: Better granularity for manual and auto flight modes
2016-04-29 14:50:45 +02:00
Lorenz Meier
3ccd9988d3
Multicopter land detector: Enforce sync between system and detector
2016-04-29 12:34:58 +02:00