25316 Commits

Author SHA1 Message Date
Matthias Grob
c4fb2b26fd mc_att_control: prepare yaw weight from gain ratio
According to the paper the quaternion controller is built on
the yaw weight represents the ratio between the roll/pitch and
the yaw attitude control time constant. It also states that as a
thumb rule a value of ~0.4 works alright for most multicopter
platforms. The default attitude gains of PX4 which were determined
independent of the paper from experimental results have a ratio of
2.8/6.5 = 0.43 which matches.
2018-03-15 17:16:14 +01:00
Matthias Grob
6317d36ec9 mc_att_control: remove time constant parameter
Because the parameter does not make sense from a control theory
perspective. Either you have a gain with the unit 1/s or an inverse
gain or time constant with the unit s. But the time constant parameter
was neither bound to any exact unit nor did it apply instead of a gain.
Rather it adjusted multiple gains from rate and attitude control
according to an arbitrary scale. This can only by accident lead to
good tuning.
2018-03-15 17:16:14 +01:00
Matthias Grob
ba5f2254cd mc_att_control: add reduced quaternion attitude control
to prioritize yaw compared to roll and pitch by combining
the shortest rotation to achieve a total thrust vector with
the full attitude respecting the desired yaw
not by scaling down the control output with the gains
2018-03-15 17:16:14 +01:00
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
Daniel Agar
f194c5424c move hmc5883 i2c address into driver 2018-03-14 14:38:40 -04:00
Daniel Agar
bb7466c596 move rgbled i2c address into driver 2018-03-14 14:38:40 -04:00
Karl Schwabe
2a5a7b3a1e Adds ability to have out-of-tree uORB message definitions
If the EXTERNAL_MODULES_LOCATION variable has been set, and the
EXTERNAL_MODULES_LOCATION/msg/ directory exists containing a
CMakeLists.txt file with the following format:
    set(config_msg_list_external
      message1.msg
      message2.msg
      message3.msg
      ...
      PARENT_SCOPE
      )
then the messages defined in config_msg_list_external are added to the
msg_files list in Firmware/msg/CMakeLists.txt and are used to generate uORB
message headers. The generate uORB message headers are generated in the same
location as the normal uORB message headers in the build directory, namely,
<build_dir>/uORB/topics. The uORB topic sources are generated in
<build_dir>/msg/topics_sources.
2018-03-14 10:01:43 +01:00
Daniel Agar
dacec87d6b px4fmu-v3 add missing lsm303d and sort 2018-03-14 08:02:19 +01:00
Daniel Agar
de85acb8b0 px4fmu-v2 version detection and init cleanup
- if an invalid version is detected reinit, then reset
2018-03-14 08:02:19 +01:00
Daniel Agar
24be68b27a eclipse project add paths for new params 2018-03-13 23:30:50 -05: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
22acb1dab1 cmake configs: add landing_target_estimator wherever local_position_estimator is enabled
LTEST_MODE is defined in landing_target_estimator and required by
local_position_estimator.
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
eb33145ac8 px4_param.h: add ParamExtFloat & ParamExtInt (required by ekf2) 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
523bb11577 module template: update to use the new Param classes 2018-03-13 17:35:15 +01:00
Beat Küng
0d26aeafe2 px4_parameter.h: remove this file - it's not used anymore 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
Amir Melzer
118214c6b5 update submodule to include ASL_PWR_BRD 2018-03-13 15:24:44 +01:00
Philipp Oettershagen
ff66605a8a Fix: Increase pwmsim module stack by 100 bytes again because load_mon was giving warning about low stack 2018-03-13 12:51:33 +01:00
Jan Okle
63121b74df NuttX update - fix kinetis transmission status handling in the serial interrupt (#8944)
efc3d9e92b
2018-03-12 11:56:59 +01:00
David Sidrane
de9368319f Do not change mode to read temperature
The mode change was not necessary and in fact caused the chip to not update the registerfile resulting in MAG timeouts
2018-03-12 11:56:59 +01:00
Beat Küng
bb6802a1ed kinetis: fix PPM decoding
On kinetis, the TPM_STATUS_TOF was used to detect missed interrupts for
PPM decoding. However this was not correct, because the TOF bit was set on
each timer overflow. This happened regularly after every 64ms interval,
which meant that most PPM frames were just discarded.

I have not found any equivalent register/solution that is used on STMF4,
so this just removes the TOF handling. However there is now no way to
detect missed edges/interrupts!
2018-03-12 11:56:59 +01:00
Beat Küng
5a7885610d fmu: fix PPM publication if RC_SERIAL_PORT is not defined
Before, the RC channel was published as fast as the fmu was running
(around 200Hz in unarmed state).

And fix code style.
2018-03-12 11:56:59 +01:00
Beat Küng
dde922a971 fxos8701cq: add a 'stop' command 2018-03-12 11:56:59 +01:00
Beat Küng
06df2fcb65 rc.interface: disable AUX mixer on NXPHLITE_V3 2018-03-12 11:56:59 +01:00
David Sidrane
0ed631227f fxos8701cq:Work with fxos8701cq and fxos8700cq
Allow whoami of fxos8701cq and fxos8700cq
2018-03-12 11:56:59 +01:00
Daniel Agar
5335778f6e nxphlite start correct sensors and disable debug 2018-03-11 18:19:12 -05: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
Simone Guscetti
dbdb2c9c22 px4-fmuv5: config fix stm32f7 max SD card speed
In the stm32f7 the configuration variable for SD card with DMA changed from CONFIG_STM32_SDIO_DMA to CONFIG_STM32F7_SDMMC_DMA
the maximum clock speed of 16MHz can now be achieved.
2018-03-09 14:54:54 +01:00