Commit Graph

10529 Commits

Author SHA1 Message Date
Matthias Grob 9ff9692270 mc_att_control: switch to quaternion attitude control (no yaw reduction yet) 2018-03-15 17:16:14 +01:00
Daniel Agar 1abf90c6d4 EKF2 only publish wind_estimate if wind velocity is being estimated
- refactor body wind velocity calculation
2018-03-15 07:18:58 +01:00
Daniel Agar 7607c71ca8 fw_pos_control_l1 project virtual waypoint to handle landing overshoot 2018-03-14 16:39:19 -04:00
Daniel Agar d1dca4e74c fw_pos_ctrl_l1 move takeoff to control_takeoff() 2018-03-14 16:39:19 -04:00
Daniel Agar c72340e039 fw_pos_ctrl_l1 move landing to control_landing() 2018-03-14 16:39:19 -04:00
Beat Küng 2bcc5cf3e5 imu filter defaults: set IMU_GYRO_CUTOFF to 80 and MC_DTERM_CUTOFF to 30
tested on at least 5 different vehicles, including AeroFC. The values
should be conservative, good setups (with low vibrations) can increase
these values even further.

increasing IMU_GYRO_CUTOFF allows for better tuning gains (increased P).
2018-03-13 20:54:49 +01:00
Beat Küng a99e49a856 landing_target_estimator: fix param type: int -> int32_t 2018-03-13 17:35:15 +01:00
Beat Küng 7ee464c264 LPE: refactor to use ModuleParams 2018-03-13 17:35:15 +01:00
Beat Küng 83d55773af LPE: refactor to use ModuleBase 2018-03-13 17:35:15 +01:00
Beat Küng 9fb9b2916a LPE: use default & delete keywords for constructors & destructors 2018-03-13 17:35:15 +01:00
Beat Küng f7ee3c2015 cmake configs: add vtol_att_control for required parameters VT_B_DEC_MSS & VT_B_REV_DEL
Required by Navigator.
2018-03-13 17:35:15 +01:00
Beat Küng 279b66bfbd ekf2: use new Param class
reduces RAM usage by 1.3KB
2018-03-13 17:35:15 +01:00
Beat Küng 89a775b401 navigator: remove use of final to allow extending class hierarchy 2018-03-13 17:35:15 +01:00
Beat Küng 8a5cdac1f4 FixedwingPositionControl: fix ordering of PRINT_MODULE_USAGE_NAME 2018-03-13 17:35:15 +01:00
Beat Küng e0af2912a1 navigator: avoid use of a static variable last_geofence_check 2018-03-13 17:35:15 +01:00
Beat Küng 320bdc6482 navigator: refactor to use ModuleBase class 2018-03-13 17:35:15 +01:00
Beat Küng 246be4f0ab precland: use 'default' for destructor 2018-03-13 17:35:15 +01:00
Beat Küng 2e6904b8a4 navigator: use '#pragma once' as include guard 2018-03-13 17:35:15 +01:00
Beat Küng f2dddc65a5 navigator: use new Param class 2018-03-13 17:35:15 +01:00
Beat Küng 32eaf278ad Battery: remove unnecessary updateParams() call in constructor 2018-03-13 17:35:15 +01:00
Beat Küng fca99cf775 param: refactor BlockParam classes
- make the selected parameter a template argument. This
  enables type-checking at compile-time.
- move things to src/platforms.
  This provides consistent includes with ModuleBase
- add ModuleParams base class (replaces Block & SuperBlock)
- drop the Block* prefix from the class names
2018-03-13 17:35:15 +01:00
Beat Küng 0e4034d01e param: add a px4_parameters_public.h.jinja template
Generates an enum with all params & additional type information for static
type checking

The generated public param header is required to build the modules using
the new BlockParam classes.
2018-03-13 17:35:15 +01:00
Beat Küng 0a5af01454 NavigatorMode: inherit from Block instead of SuperBlock 2018-03-13 17:35:15 +01:00
Mohammed Kabir f95f4c5f09 UAVCAN : Correct startup sequence and improve parameter description 2018-03-10 23:09:19 -05:00
Vasily Evseenko ebe74ccb2e Add 'forced on' flow control mode to mavlink UART (#8776) 2018-03-10 14:54:57 -05:00
acfloria fd0be3c412 Remove MavLink dependency in navigator 2018-03-09 21:16:28 +01:00
Roman 64b97cb18e fw_att_control: in acro use thrust from rate setpoint topic
Signed-off-by: Roman <bapstroman@gmail.com>
2018-03-09 13:48:14 +01:00
Thomas Stastny 74730273c1 fw_att_control move angular rate limits to body angular rates (#9023)
* ecl: attitude_fw update
- move angular rate limits to body angular rates
- handle rattitude/acro vs attitude mode rate limits
2018-03-08 22:55:45 -05:00
Daniel Agar 2ce8b6a984 delete VT_FW_PITCH_TRIM parameter (#9014) 2018-03-07 09:08:59 -05:00
Roman ac2b3ccadc vtol_att_control: default front transition throttle to 100%
- the main idea is to prevent airspeed less systems to stall after a
transition

Signed-off-by: Roman <bapstroman@gmail.com>
2018-03-07 14:01:51 +01:00
Roman e4ea7262fd tailsitter.cpp: small cosmetic fix
Signed-off-by: Roman <bapstroman@gmail.com>
2018-03-07 14:01:51 +01:00
Roman 03338935e0 vtol_att_control: make sure blending airspeed is smaller than transition airspeed
Signed-off-by: Roman <bapstroman@gmail.com>
2018-03-07 14:01:51 +01:00
Roman e0ca38e794 standard vtol: fix mc weight calculation
Signed-off-by: Roman <bapstroman@gmail.com>
2018-03-07 14:01:51 +01:00
Roman 23257bf6ee standard vtol: simplify blending weight calculation
Signed-off-by: Roman <bapstroman@gmail.com>
2018-03-07 14:01:51 +01:00
Roman b66bc712af tailsitter: avoid doing same calculation twice
Signed-off-by: Roman <bapstroman@gmail.com>
2018-03-07 14:01:51 +01:00
Roman 1d8f588d37 vtol_att_control: switch from division to multiplication for variable
calculation

Signed-off-by: Roman <bapstroman@gmail.com>
2018-03-07 14:01:51 +01:00
Roman 9e16543dbe tiltrotor: represent time since transition in seconds
- more intuitive
- avoids tons of divisions

Signed-off-by: Roman <bapstroman@gmail.com>
2018-03-07 14:01:51 +01:00
Roman ae2e6c7a18 tailsitter: represent time since transition in seconds
- more intuitive
- avoids tons of divisions

Signed-off-by: Roman <bapstroman@gmail.com>
2018-03-07 14:01:51 +01:00
Roman bf22f02567 tailsitter: removed usage of hrt_elapsed and small cleanup
- do not call hrt_elapsed_time since it's expensive
- remove P2 front transition phase (was not even used)

Signed-off-by: Roman <bapstroman@gmail.com>
2018-03-07 14:01:51 +01:00
Roman 196d0e40b4 standard vtol: use time in second since transition start instead of using
microseconds

- seconds is more intuitive
- avoids tons of divisions by 1e6f

Signed-off-by: Roman <bapstroman@gmail.com>
2018-03-07 14:01:51 +01:00
Roman 5a2a5127fa tailsitter: removed common vtol parameters
Signed-off-by: Roman <bapstroman@gmail.com>
2018-03-07 14:01:51 +01:00
Roman 07a84f2246 tiltrotor: removed common vtol parameters
Signed-off-by: Roman <bapstroman@gmail.com>
2018-03-07 14:01:51 +01:00
Roman 6900f97b72 vtol_att_control: use airspeed_disabled flag instead of airspeed mode
Signed-off-by: Roman <bapstroman@gmail.com>
2018-03-07 14:01:51 +01:00
Roman daa6c6ffc8 vtol_att_control: consolidated standard parameters & fix usage of hrt_elapsed time
- standard vtol was implementing many custom parameters although they
are generic and should be shared between the vtol types
- removed heavy usage of hrt_elapsed_time() which is a system call and
could be computationally expensive
2018-03-07 14:01:51 +01:00
Julian Oes 9c6b1a0f04 navigator: fix incorrect takeoff altitude
This fixes a problem where we do not properly go to the set takeoff
altitude but end up lower.

The problem was that the setpoint triplet is reset when the navigation
mode changes. So in this case, the triplet is reset when we switch from
takeoff to loiter which can happen before reaching the actual takeoff
altitude.

The fix is an ugly hack to prevent the reset in the case of takeoff to
loiter. A better solution would be to remove the general reset and have
all navigation modes do the proper resets themselves.

This hotfix should however be lower risk.
2018-03-07 08:48:44 +01:00
Daniel Agar 623e16e8be logger SITL add additional messages by default 2018-03-06 17:42:33 +01:00
AlexKlimaj 83d01a7c76 Updated batt_smbus. Expanded battery_status.msg. Fixed mavlink_messages.cpp temperature. (#8991)
* Updated and expanded batt_smbus to work with bq40z50-R2. Expanded battery_status.msg. Fixed mavlink_messages.cpp temperature, added commented out expanded battery_status.msg parameters for future mavlink expansion.

* Changed errx to PX4_ERR

* Added PX4_ERR returns
2018-03-06 10:42:20 +01:00
Daniel Agar 493c41c76e VtolLandDetector require vehicle_status timestamp 2018-03-05 15:46:24 -05:00
Daniel Agar 354584acfc MulticopterLandDetector initialize all class members 2018-03-05 15:46:24 -05:00
Daniel Agar 69470f6991 land_detector use THROTTLE index 2018-03-05 15:46:24 -05:00