Commit Graph

11139 Commits

Author SHA1 Message Date
Julian Oes 462cf131d5 mavlink: add sysid to UUID
To avoid that multiple SITL instances have the same UUID we add the
mavlink system ID to the UUID which is sent via mavlink.

This should resolve the case where multiple vehicles show up with the
same UUID in simulation.

Note that the UUID show in `ver` will still be the same for all
instances.
2018-07-27 11:49:28 +02:00
Lorenz Meier c86dbe60a0 Increased mixer load buffer to allow larger mixer structures to fit.
This allows to load mixers with more inputs.
2018-07-26 08:39:01 +02:00
Daniel Agar 77751d4822 EKF2 set param EKF2_MAG_DECL volatile 2018-07-26 08:32:09 +02:00
Paul Riseborough 77f0883cb9 ekf2: Reinstate saving of mag declination for use next start
This capability was removed unintentionally by previous changes.
Requires ecl version with updated declination accessor function
2018-07-26 08:32:09 +02:00
Jake Dahl 57dfcee842 added a check for not maybe_landed upon takeoff 2018-07-26 07:49:14 +02:00
Jake Dahl 4144a53cd6 added a check to ensure the current position setpoint is valid 2018-07-26 07:46:24 +02:00
Jake Dahl a1ff4a8a67 removed unneccessary includes, eliminated namespace on math, changed date
changed a comment

reverted a file back to master
2018-07-26 07:46:24 +02:00
Jake Dahl 21db15ff4f If already in landing, go straight to state RTL_LAND. Also cleaned up the comments 2018-07-26 07:46:24 +02:00
Jake Dahl 130cdf25bf prevent RTL if already landing 2018-07-26 07:46:24 +02:00
Jake Dahl 7c84e77312 we used to check if we have actually landed not mission reached in navigator 2018-07-26 07:45:00 +02:00
PX4 Jenkins b98f5aaf7e Update submodule micro-CDR to latest Tue Jul 24 20:26:29 CDT 2018
- micro-CDR in PX4/Firmware (eca3a58a36d7367d5d5ca4a6289585e13003cf51): https://github.com/eProsima/micro-CDR/commit/890b118196a253540bc175096fa53d7733005d7b
    - micro-CDR current upstream: https://github.com/eProsima/micro-CDR/commit/df48e526feca3bd140b0adf12c3c847a6d78ed79
    - Changes: https://github.com/eProsima/micro-CDR/compare/890b118196a253540bc175096fa53d7733005d7b...df48e526feca3bd140b0adf12c3c847a6d78ed79

    df48e52 2018-07-11 Luis Enrique Muñoz Martín - Removed some inline modifiers
c77a49f 2018-07-11 Luis Enrique Muñoz Martín - indent
4f659ab 2018-07-11 Luis Enrique Muñoz Martín - Removed unused images.
d3a5b4a 2018-07-11 Luis Enrique Muñoz Martín - Removed old files.
2018-07-25 07:31:02 +02:00
Matthias Grob 152c6db212 Fix logger signed unsigned error with GCC 7.3 in Cygwin (#10009) 2018-07-24 17:39:45 -04:00
Julian Oes 80cac6561f sensors: no temperature compensation in HITL
Temperature compensation is not supported in HITL. Therefore, don't try
and fail. This basically removes the confusing error message that we get
in HITL.
2018-07-24 18:56:36 +02:00
MaEtUgR 5dae404fb2 vehicle_commands: add VEHICLE_CMD_DO_ORBIT 2018-07-24 15:03:53 +02:00
Beat Küng 7753dd4b4e refactor uorb: inline orb_publish_auto
It is a very small core function that needs to be fast.
2018-07-23 22:32:17 +02:00
Beat Küng 875ee794ef sensors: do not advertise topics before we have valid data
Modules generally do not check for a valid timestamp, thus we need to avoid
publishing invalid data.

This is for example problematic in the attitude_estimator_q, if the
system has no mag: it will copy the (invalid) data and then fails to
initialize, as there is no more mag data coming in.
2018-07-23 22:32:17 +02:00
Beat Küng f4fef5efc8 attitude_estimator_q: cleanup output, remove unnecessary topic init 2018-07-23 22:32:17 +02:00
Beat Küng 97fe5f928a mavlink_orb_subscription: remove unneeded checks
not needed anymore after the previous commit
2018-07-23 22:32:17 +02:00
Beat Küng 2fe5e7735a uorb: allow an orb subscription to retrieve data that was published prior to subscribe 2018-07-23 22:32:17 +02:00
Kurt Kiefer 7a5a135739 PX4IO Firmware: promote rssi to static storage
The controls_tick() rate exceeds the rate at which RC receivers
provide digital rssi. As such, most ticks set PX4IO_P_RAW_RC_NRSSI
to 0.

This change promotes the controls_tick() local variable 'rssi' to
static storage so that it doesn't have to be updated every tick to
keep the correct value in PX4IO_P_RAW_RC_NRSSI.
2018-07-23 08:16:51 +02:00
Daniel Agar b1d3bb0403 stop ignoring Wmissing-field-initializers and fix (#9912) 2018-07-22 12:45:52 -04:00
Paul Riseborough fc65939f0e ekf2: Add support for use of multiple GPS receivers (#9765) 2018-07-22 12:18:30 -04:00
Paul Riseborough a37580ceac mc_pos_control: remove un-used parameter 2018-07-22 17:42:31 +10:00
Paul Riseborough dd3fb84db8 mc_pos_control: Fix parameter description error 2018-07-22 17:42:31 +10:00
Paul Riseborough c9ca27e7c2 ekf2: Update documentation for EKF2_RNG_AID parameter 2018-07-22 17:42:31 +10:00
Paul Riseborough 82780e33b9 mc_pos_control: Add parameter support for terrain hold function
This new mode of altitude control uses terrain following when holding position and normal altitude control when moving.
2018-07-22 17:42:31 +10:00
Kurt Kiefer a114450f51 spektrum_rssi: clear PX4IO_P_SETUP_FEATURES_ADC_RSSI when valid
When we're getting valid rssi input from the telemetry receiver,
clear the flag PX4IO_P_SETUP_FEATURES_ADC_RSSI in r_setup_features.
2018-07-22 08:42:30 +02:00
Kurt Kiefer 597372bec9 Gather RSSI data from Spektrum Telemetry receivers
On SPM4649T receivers with firmware versions at least 1.1RC9, the
serial data will contain an rssi value in dbm, as outlined in the
Remote Receiver Interfacing document section 8.3.1.

If the value received is greater than or equal to zero, the receiver
does not support rssi data, and the incoming value will be ignored.
However, if the value is negative, we can use the rssi value.

When we have a valid rssi, it gets mapped to a percentage from 0 to
100 as expected by mavlink. This mapping is constructed as a
logarithmic function over Spektrum's published minimum and maximum
rssi values, -92dBm to -42dBm as 0 to 100:
100 Log10[1 + (x - min) * (9 / (max - min))]

This change updates all calls to the dsm input rountes to return
the rssi value.

Note that one place this doesn't work with the px4io enabled.
There is a comment left in the absence of analog rssi that:
"we do not actually get digital RSSI regs[PX4IO_P_RAW_RC_NRSSI]".
This restriction has been left in place, as removing it exposes a
problem where the frequency of the control tick is greater than
that of valid dsm frames so the rssi isn't valid every cycle.
2018-07-22 08:42:30 +02:00
Dennis Mannhart 18a3c08659 mc_pos_control: idle to armed state delay controlled by parameter MPC_IDLE_TKF 2018-07-20 09:26:18 +02:00
Dennis Mannhart ab1ae1fb4e mc_pos_control_main: trigger failsafe if no setpoint along D-direction is valid 2018-07-20 09:26:18 +02:00
ChristophTobler 9362f844f4 position control: fix failsafe thrust
invert direction to point upwards and increase to 70% of throttle range between min and hover
2018-07-20 09:26:18 +02:00
ChristophTobler 7cc85885a4 position control: set _skip_controller before calling _interfaceMapping()
Without this failsafe will be overwritten
2018-07-20 09:26:18 +02:00
ChristophTobler 80867343ab mc_pos_control: trigger failsafe if no pos, vel or thrust pair is valid 2018-07-20 09:26:18 +02:00
Dennis Mannhart 260284571d mc_pos_control: move failsafe logic into method 2018-07-20 09:26:18 +02:00
Dennis Mannhart ac2c49218d mc_pos_control: remove mavlink_log_info 2018-07-20 09:26:18 +02:00
Dennis Mannhart f11a65a74f mc_pos_control: fix overwrite for state velocity 2018-07-20 09:26:18 +02:00
Dennis Mannhart f2d559a4c2 mc_pos_control: minor refactor 2018-07-20 09:26:18 +02:00
Matthias Grob cc0bc05156 mc_att_control: remove useless parameter MC_YAW_FF
It scales the yawspeed setpoint arbitrarily by default with 0.5.
This makes no sense because when you give a setpoint of 1rad/s then
you expect the setpoint to get executed. If you want manual yawspeed
response to be less agressive on the stick use the scaling parameter
for the stick MPC_MAN_Y_MAX.
2018-07-20 09:26:18 +02:00
Dennis Mannhart b5731e0ccd FlightTaskOffboard: only start task if control mode flags are met 2018-07-20 09:26:18 +02:00
Dennis Mannhart bf4ac7a9d6 mc_pos_control: for terrain following use range sensor climbrate for velocity estimate 2018-07-20 09:26:18 +02:00
Dennis Mannhart e51e1bbe74 mc_pos_control: replace legacy refactor
Until now we replaced legacy position controller functionality inside
the flight task architecture to split up the huge position control
module into the different tasks and have a modular setup with a clear
setpoint interface. This commit removes all the legacy code and hard
switches to using the flight task architecture for multicopter.

This is done because maintaining and testing everything in parallel is
not sustainable. The architecture is by now tested to cover all basic
legacy functionality and missing corner cases can be fixed a lot easier
with the new architecture.
2018-07-20 09:26:18 +02:00
Dennis Mannhart a5e8eb23ad PositionControl: saturate thrust integral 2018-07-20 09:26:18 +02:00
Dennis Mannhart 5ffcb6af01 PositionControl: set vel_dot to 0 if NAN 2018-07-20 09:26:18 +02:00
Dennis Mannhart 7b13803e2c PositionControl: for thrust setpoints only use MPC_MANTHR_MIN for minimum thrust 2018-07-20 09:26:18 +02:00
Dennis Mannhart f30bf215db MulticopterLanddetector: adjust minimum throttle if climb-reate is not enabled 2018-07-20 09:26:18 +02:00
Dennis Mannhart e8620708b3 PositionControl: set states to zero if not valid 2018-07-20 09:26:18 +02:00
Dennis Mannhart e6f6e2085c ControlMath: remove false comment 2018-07-20 09:26:18 +02:00
Dennis Mannhart 9c7c60ddc8 remove mc_pos_control_tests 2018-07-20 09:26:18 +02:00
Dennis Mannhart 89c266e699 by value to reference 2018-07-20 09:26:18 +02:00
Dennis Mannhart 9c2ec3c229 PositionControl: add control states structure 2018-07-20 09:26:18 +02:00