9308 Commits

Author SHA1 Message Date
Paul Riseborough
6474922224 ekf2: Save learned magnetometer biases 2017-05-03 08:37:14 +02:00
Paul Riseborough
3bcb710da9 voted_sensors_update: publish sensor selections (+3 squashed commits)
Squashed commits:
[290660d] voted_sensors_update: revert the new_accel_data check (and others)

The check removed the ability to detect sensor timeouts.
[c8dc7ad] sensors: publish changes to sensor selection
[dd90dec] sensors: ensure all sensor selections published first time
2017-05-03 08:37:14 +02:00
priseborough
8ea0b2d3c5 commander: rework posvel validity checks
Move into functions.
Reset probation time and recalculate checks if a mode change is demanded to give the operator ability to regain control as soon as possible after nav performance is regained. (+11 squashed commits)
Squashed commits:
[a4bb800] commander: enable pilot to quickly recover from loss of position accuracy
[19e16a0] commander: rework postal probation time
[f96284e] commander: rework bad pos and vel test probation time
[00d5f0c] commander: Allow EKF preflight checks to pass with moving vehicle

Separates the 'is using GPS' and the GPS quality checks.
Uses a reasonable subset of the GPS quality checks which allows checks to pass if the vehicle is moving.
[4cdfb5c] commander: remove unused variable
[349385a] commander: add EKF GPS quality checks to pre-arm checking

Only perform check if GPs checking is activated by parameter setting.
Display fault messages that makes it clear if EKF quality checks are failing or the EKF is not using GPS for another reason. We do not want to confuse this with GPS lock.
[340ae29] commander: make position invalid fail-safe more sticky

Require check to pass for 7 seconds before exiting failsafe. This is required because if GPs is failing innovation tests for a prolonged period, the EKF will periodically reset to the GPS and report good accuracy at the time of reset.
Adding this delay gives time for an underlying error condition (eg bad IMU or compass) to be re-detected.
[b04ac95] commander: Increase RAM allocation to eliminate low stack warnings
[9dca12f] commander: add missing position invalid fail-safe responses
[69f264d] commander: Update position invalid fail-safe responses

Replace separate logic for each case with a generic function
Add velocity checks.
[8e8cef1] commander: rework position validity checks

Consolidate existing checks for global and local position validity and add checking of velocity accuracy.
Enable checks to be bypassed using the CBRK_VELPOSERR parameter.
2017-05-03 08:37:14 +02:00
priseborough
519e903347 systemlib: Add circuit breaker parameter for position error checks 2017-05-03 08:37:14 +02:00
priseborough
e61e733d1d local_position_estimator: publish placeholder values for velocity accuracy 2017-05-03 08:37:14 +02:00
priseborough
68c1ffd3e5 position_estimator_inav: publish placeholder values for velocity accuracy 2017-05-03 08:37:14 +02:00
priseborough
1f5908786e ekf2: don't publish estimator status and innovations unless updated 2017-05-03 08:37:14 +02:00
priseborough
fb6e050b06 ekf2: Improve error reporting
Add missing velocity accuracy reporting
Add missing dead reckoning reporting
2017-05-03 08:37:14 +02:00
David Sidrane
6aadc75d18 Removed interrupt based locking on FMUv4 HW
The ramtron driver already calls SPI_LOCK when accessing the
  FRAM.

  Removed the interrupt lockout and anabled the SPI_LOCK
  in the ms5611 driver on any HW where the
  PX4_SPI_BUS_BARO == PX4_SPI_BUS_RAMTRON
2017-05-03 08:17:12 +02:00
Lorenz Meier
40eb5df8de UAVCANCAN: Better param documentation and reboot requirements where appropriate 2017-05-02 07:42:14 +02:00
David Sidrane
05ceeec1ba piofirmware:Base the debug message buffer size on the defconfig
Recover 16 bytes. Size of debug max message is 40 so limit
  the usart tx buffer to same size.
2017-05-02 07:40:50 +02:00
Lorenz Meier
60a022329f IO Firmware: Use new RC lib format 2017-05-02 07:40:50 +02:00
Lorenz Meier
118b9aad19 MC pos control: Document the reference update handling function better 2017-05-01 17:23:11 +02:00
Paul Riseborough
9983bf2364 ekf2: fix errors in publishing of local position origin validity flags 2017-05-01 17:23:11 +02:00
ChristophTobler
6c15666368 ekf2: accept min/max range 2017-04-27 21:15:47 +02:00
Khoi Tran
1b7838c2fe Implement Mavlink PLAY_TUNE 2017-04-27 14:48:25 +02:00
Matthias Grob
0c4719de3e mc_pos_control: smooth takeoff, fixed gradient of the velocity ramp by takeoff speed parameter
because we need a workaround for the broken auto takeoff logic which can start the vehicle with a loiter setpoint
in this case the very first moment is still a jump but then it gets taken over by the fix gradient ramp
this can basically be reverted after the auto takeoff logic is fixed
2017-04-27 14:05:20 +02:00
Matthias Grob
b5820afa14 mc_pos_control: smooth takeoff, fixed ramp reset bug and takeoff speed limiting condition
currently when the vehicle is landed again (not after bootup) the core position controller does not run anymore
therefore the velocity limit ramp in some cases did not get reset correctly

speed limiting in auto takeoff mode only needs to be limited when the user did not take over
2017-04-27 14:05:20 +02:00
Matthias Grob
9a162a24bb mc_pos_control: improved smooth takeoff and used it for manual takeoff as well
adresses:
there were setpoint twitches at the beginning and end of my smooth takeoff routine
it was to slow and not configurable
it was only available for automatic takeoff
2017-04-27 14:05:20 +02:00
Matthias Grob
75872b0713 mc_pos_control: switched auto takeoff to clean position control to takeoff point with gradual velocity limit
auto takeoff  was pretty chaotic and bypassed the velocity controller until some magic condition
the goal of this approach is to make the behaviour and smoothness more predictable and reuse the exact same logic for manual takeoff
2017-04-27 14:05:20 +02:00
Matthias Grob
5fd6bfc18c mc_pos_control: reorder velocity setpoint limiting, adding comments 2017-04-27 14:05:20 +02:00
Matthias Grob
f5964ec237 mc_pos_control: pure refactor, reduce one level of indentation in calculate_thrust_setpoint 2017-04-27 14:05:20 +02:00
Matthias Grob
40d058558b mc_pos_control: pure refactor, split up core position control into velocity and thrust setpoint generation 2017-04-27 14:05:20 +02:00
Matthias Grob
fac34de11e mixer_multirotor: switched to math::constrain (#7073)
- a local implementation was used before which is not necessary
2017-04-26 15:25:05 -04:00
Daniel Agar
f04f1d6b03 sensors HIL increase gyro and accel timeout
- fixes #7050
2017-04-25 23:52:11 +02:00
Beat Küng
0d22e97c09 sensor_params: document PWM_RATE=0 for Oneshot125 2017-04-25 12:59:12 +02:00
Mohammed Kabir
60fe87aac2 commander : preflight checks increase max_mags to 4 2017-04-24 12:24:11 +02:00
Mohammed Kabir
57aa41df2c sensors : decouple maximum sensor count and allow flexible maximums 2017-04-24 12:24:11 +02:00
Mohammed Kabir
f0accd39f0 sensors : add support for 4th magnetometer 2017-04-24 12:24:11 +02:00
Mohammed Kabir
74f4f72a4c commander : add support for calibrating 4 magnetometers 2017-04-24 12:24:11 +02:00
Mohammed Kabir
9909a373b0 commander : warn if more than 4 mags are connected 2017-04-24 12:24:11 +02:00
Lorenz Meier
4d8b5e60c3 System: Set new logger system as the default
This will upgrade systems to the new .ulog format used by http://logs.px4.io and supported by Flight Plot
2017-04-24 10:12:23 +02:00
Mohamed Abdelkader Zahana
60e0ca9321 add both options (pwm/i2c) for lidar lite 2017-04-23 23:29:10 +02:00
Mohamed Abdelkader Zahana
9911a55393 use i2c for lidar lite 2017-04-23 23:29:10 +02:00
Lorenz Meier
21f409366a MAVLink app: Warn sender if a command has been rejected 2017-04-23 19:23:09 +02:00
Andreas Antener
00efbffea9 UAVCAN: disable ESCs when in VTOL fixed-wing 2017-04-23 14:59:24 +02:00
Daniel Agar
1fd343b5cc navigator remove FW and MC cruise parameters 2017-04-23 14:50:21 +02:00
Sander Smeets
0106840b87 Allow inflight updates of cruise throttle during missions 2017-04-23 14:50:21 +02:00
Michael Schaeuble
21de5bbc39 Acknowledge vehicle commands in UAVCAN server 2017-04-23 14:49:24 +02:00
Daniel Agar
f8e291dab1 mavlink VFR_HUD throttle use first 2 groups (#7106)
- fixes #6974
2017-04-22 16:08:27 -04:00
David Sidrane
0754e8f8bc Bugfix:hrt is used before it is initalized.
sched_note_{suspend|resume} were calling hrt_absolute_time before
   it hrt_init is called. This can lead to register access before
   clocking is enabled. The result is a hardfault.
2017-04-22 07:57:37 +02:00
Sander Smeets
545458a687 Consider FW PSP in pitch limits (#7098)
The FW_PSP_OFF parameter no longer breaches the pitch min/max limits
2017-04-21 13:34:43 +02:00
Paul Riseborough
ed9a9b772e ekf2: minimum change required to use updated ecl library 2017-04-21 08:34:19 +02:00
Andrew C. Smith
d21b6655d2 Add the Gumstix AeroCore2 to the build system. 2017-04-20 12:24:27 -10:00
Daniel Agar
ed1b442065 mission require valid landing after DO_LAND_START 2017-04-20 14:41:01 -04:00
Daniel Agar
56b028148b Navigator move get_time_inside and cleanup (#7062) 2017-04-20 11:24:55 -04:00
Daniel Agar
1913b970d7 main state auto mission don't require valid mission 2017-04-20 11:18:32 -04:00
Daniel Agar
c1d9972244 commander add parameter COM_ARM_MIS_REQ
- arm without mission on by default
2017-04-20 11:18:32 -04:00
Matthias Grob
709bd8cb28 mc_pos_control: combine separate pitch and roll maximum tilt angles into one
because there is no sense to have different angle scalings into different directions
it would lead to unintuitive piloting experience
acceleration is directly coupled to the tilt angle regardless of possible assymetric multicopter vehicles
2017-04-20 13:20:01 +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