20023 Commits

Author SHA1 Message Date
Paul Riseborough
9ff1feb92f ekf2: fix formatting 2016-11-15 23:58:05 +01:00
Paul Riseborough
056ac3c9c6 EKF: Update default value for sideslip fusion noise
Use value obtained from tuning on replay logs
2016-11-15 23:58:05 +01:00
Paul Riseborough
680a8f0b44 ekf2: fix rebase compile errors 2016-11-15 23:58:05 +01:00
CarlOlsson
72ad6627e1 updated beta noise
Conflicts:
	src/modules/ekf2/ekf2_params.c
2016-11-15 23:58:05 +01:00
CarlOlsson
5435b99f86 added beta innovations to ekf_innovations 2016-11-15 23:58:05 +01:00
CarlOlsson
e4f5710ec3 added logic for beta fusion 2016-11-15 23:58:05 +01:00
CarlOlsson
f00f6e6eff added parameter for when to fuse sideslip 2016-11-15 23:58:05 +01:00
CarlOlsson
1223e4ba6b added beta to replay 2016-11-15 23:58:05 +01:00
CarlOlsson
106c882cea modified logging 2016-11-15 23:58:05 +01:00
CarlOlsson
d550290e63 modified ekf2_main.cpp 2016-11-15 23:58:05 +01:00
Anton Matosov
0734db1740 Ignore all CLion related files as they are all generated from cmake 2016-11-15 11:10:22 +01:00
Anton Matosov
3414fc1c7c Setup default CLion ignores 2016-11-15 11:10:22 +01:00
Julian Oes
25d1daa7a5 px4fmu-v1: Raise INTERRUPTSTACK again
This fixes #5855.
2016-11-15 08:10:40 +01:00
Julian Oes
53c23e7bff Revert "Revert "FMUv1: Save resources in config""
This reverts commit 0ca397ab2046c2a2a71b3ca758e1cbb6f80a87fb.
2016-11-15 08:10:40 +01:00
Lorenz Meier
0ca397ab20 Revert "FMUv1: Save resources in config"
This reverts commit c24046ca5bcfc220b579ab5229af8fbf5010816c.
2016-11-14 22:37:01 +01:00
Beat Küng
2f19aebac0 mavlink_ulog_streaming: always send an ack (#5853)
Fixes the case where an ack got lost and the FMU resends the data, but
the client does not resend the ack.
2016-11-14 17:06:21 +01:00
Roman
896118281c TECS: remove logic which shifts or limits integrator during large transients
- during large transients in pitch demand the pitch integrator value
was shifted such that the final demanded pitch did not violate given
limits. Since this strategy can cause large knock-backs of the pitch
integrator we remove this logic completely. We already have logic in place
which reduces the integrator at the pitch time constant in case the
pitch limits are exceeded so we don't need to limit it further. This
has the advantage that spikes in the specific energy balance error
signal does not lead to integrator knock-back.

Signed-off-by: Roman <bapstroman@gmail.com>
2016-11-14 22:43:33 +11:00
Paul Riseborough
9221c74e46 tecs: improvements to pitch integration limiting
Constrain the specific energy balance integrator input to prevent increasing saturation of pitch demand.
Decay the specific energy balance integrator state if the pitch demand is saturated to reduce saturation to zero and do so at the same tome constant as the control loop
Relax the clipping threshold on the specific energy balance integrator to allow the input constraint and decay functions to do more of the work
Improve variable naming and commenting
2016-11-14 22:43:33 +11:00
Roman
7106881cbc tecs: fix limiting of pitch integrator input, better comments and structure
- when limiting the pitch integrator input the value was related to
a quantity with different units (specific energy error rate vs delta pitch)
- once the unconstrained pitch demand is larger / smaller than the max/min
allowed pitch angle the integrator input should only be allowed to drag
the integrator into the direction leading to less pitch demand violation

Signed-off-by: Roman <bapstroman@gmail.com>
2016-11-14 22:43:33 +11:00
Roman
12ddf9d25e TECS: better handling of the constraint for the pitch integrator
- if the specific energy balance correction term produced a demanded
pitch value which exceeded the aircraft pitch limits then the pitch
integrator was shifted such that the pitch demand violation was prevented.
However, this meant that the exceeding pitch was just unloaded into the
integrator and caused unexpected behavior of the pitch loop.
In an underspeed condition e.g. this has lead to the plane pulling up it's
nose very quickly shorty after the underspeed condition kicked in.

Signed-off-by: Roman <bapstroman@gmail.com>
2016-11-14 22:43:33 +11:00
Roman
eec55a0918 TECS: run underspeed detection method before calculating speed demand
- the method in TECS for detecting an underspeed condition was run after
the method which calculated the airspeed demand. As a result the specific
engergy balance error signal showed a spike when TECS detected an underspeed
condition.

Signed-off-by: Roman <bapstroman@gmail.com>
2016-11-14 22:43:33 +11:00
Beat Küng
dc6ca7c372 VDev & CDev: dynamically allocate & resize _pollset array
In most cases, really only 1 element is needed. The dynamic allocation
handles cases where more are necessary. This is all done within a locked
state, so no races can occur.

Frees roughly 2.3KB RAM.
2016-11-14 10:27:57 +01:00
Beat Küng
14fd1b8693 ulog_stream_ack.msg: lower timeout & increase max retries
We expect a short round-trip time, so lowering the retry timeout will
increase throughput on links with high drop rate.
2016-11-14 10:27:57 +01:00
Beat Küng
d54e22614f fix mavlink ulog: return if initial ack not yet received
Avoid sending data before we have an ack from the logger.
2016-11-14 10:27:57 +01:00
Carlo Wood
a96ee50442 Stop people from using broken awk. 2016-11-13 19:36:27 +01:00
Carlo Wood
0fbf26e955 Add Tools/fix_headers.sh
Running this script will parse the top of all source files
that are not submodules, examples or test cases, to find
all #include's and then do basically two things:

1) Reorder and group the headers so that px4_* headers are
   included first, then local headers (headers of the project
   that aren't submodules) then C++ headers if any, then C
   headers if any, then system headers (which includes submodules)
   and finally any #includes that are inside #if*...#endif
   constructs.
2) Fix the use of "" or <> in a consistent manner.

Afterwards few fixes might be necessary for compile errors that
pop up. Most of those are already fixed in my previous commits.
However, I was not able to test a compilation for ros
(with __PX4_ROS defined) -- so some more fixes might be necessary
because of the header reordering.

The script comes with a progress counter and an error summary
(if any) at the end (so no scrolling back is necessary).
It is highly recommended to only run this script in a clean
project with no outstanding changes that need to be committed.
In fact, the script enforces this (unless you pass --force).
Reverting a run of the script is then easy with 'git checkout .'.

It is also possible to run the script on a single file
by passing that on the command line. In that case it
might make sense to pass --debug too, though that was really
meant for just me, while developing the script. This will write
debug output into the file that is passed, so you don't
want to commit that! ;)
2016-11-13 19:36:27 +01:00
Carlo Wood
de85fbe1dc Remaining fixes needed before running Tools/fix_headers.sh
<systemlib/err.h> --> "systemlib/err.h" that fix_headers.sh
would miss because it comes after code it doesn't understand.

Effectively remove the '__EXPORT extern perf_counter_t perf_alloc('
line, because currently perf_alloc is defined to be NULL, and
after running fix_headers.sh that happens *before* this header
is included (the order of headers will be changed).

Do not define NULL to be (void*)0: that only works for C.
In fact, the conversions needed for NULL are so full of exceptions
that standard C++ introduced a new *keyword*: nullptr.
That's what we really should be using for C++ code.
In this case I just include the correct header to define NULL
the correct way.

Not really related to the header line:
Removed an #include <time.h> because I noted that px4_time.h
was already included... and moved a #include <sys/time.h>
to the top of the file (not really a fan of including headers
in the middle unless absolutely necessary).
Removed a include of queue.h because I noted it wasn't used.
2016-11-13 19:36:27 +01:00
Carlo Wood
ebeb187522 Move #pragma once outside #ifdef's.
In this particular case it does no harm,
but since in other cases it can lead to
problems I didn't want to add an exception
for this case to fix_headers.sh, that currently
chokes on this because it doesn't know better
than that it's a bad thing.

Note on how #pragma once works: when encountered
(aka the #ifdef that it is inside has to
be true), the compiler marks the whole
file as "seen" (this is implementation
defined, but most implementations store
the inode of the file). Subsequent #include's
of that file/inode are then completely skipped.
Hence it doesn't matter if the #pragma is at
the beginning, at the end or in the middle,
but it should be encountered every #include,
usually, and thus not be inside an #if... #endif
construct.
2016-11-13 19:36:27 +01:00
Carlo Wood
04aa2bb3a4 Add missing header files.
These headers files were missing from the header files that
I added them to; the fact that they were missing didn't
lead to compile errors because by coincidence the missing
headers are included in the source files before including
these headers. But, after the reordering of header inclusions
by Tools/fix_headers.sh, these cases will give rise to compiler
errors.
2016-11-13 19:36:27 +01:00
Lorenz Meier
86c581b2ef Enable usage of UAVCAN node ID for params 2016-11-13 18:43:15 +01:00
Lorenz Meier
9866ff8959 Allow sending a param with a different component ID 2016-11-13 18:43:15 +01:00
Benoit3
83e9e1c382 The goal of this patch is to allow compatibility with GR12/GR16/GR24 graupner receiver by :
- allowing decoding of SUMD frame with failsafe bit set
- updating stack failsafe state with the sumd failsafe info

Refer to #5817 issue
2016-11-12 14:28:57 +01:00
Michael Schäuble
697d401b73 Fix boot process on Pixhawk 2 (#5844)
* Pixhawk2: Check for mpu9250 during boot

* Fix indentation style
2016-11-12 12:57:33 +01:00
Mark Whitehorn
77a23a043f use include statement instead of symbolic link 2016-11-11 09:50:42 +01:00
Mark Whitehorn
92ae763535 change board_config to symbolic link 2016-11-11 09:50:42 +01:00
Mark Whitehorn
40f2c4a8e4 add new board config for fmu-v3 2016-11-11 09:50:42 +01:00
Paul Riseborough
bdec646736 ekf2_replay: Display RMS innovation values to assist with tuning
Displaying the RMS innovation values at the end of each replay assets with rapid iteration for time delay parameter tuning without having to plot or post process using another tool.
2016-11-11 08:51:12 +01:00
Julian Oes
ab76a37910 DriverFramework: update of cmake_hexagon 2016-11-10 07:56:28 +01:00
Mark Charlebois
47c14395d3 Updated cmake_hexagon for Semaphore CI fix
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2016-11-10 07:56:28 +01:00
Julian Oes
6bdca1053c Next cmake_hexagon in Firmware and DriverFramework 2016-11-10 07:56:28 +01:00
Julian Oes
88e81aa58e cmake_hexagon: rpcmem and linking fix
This updates cmake_hexagon and cmake_hexagon inside DriverFramework
which fixes somethine about rpcmem.a and the double linking issue.
2016-11-10 07:56:28 +01:00
James Goppert
068ef591ab Added fake landing xy velocity measurement to lpe. (#5820)
Flight tested and is working.
2016-11-09 19:40:25 -05:00
James Goppert
4d6d0b2850 Fix px4io bind failed message to say safet is off instead of armed. (#5834)
Minor message clarity fix.
2016-11-09 19:39:39 -05:00
James Goppert
3511f8abfb Add position ground truth. (#5819)
Have confirmed this works with gazebo sitl.
2016-11-09 19:38:38 -05:00
Julian Oes
d1d47c4c27 mavlink: send MOUNT_STATUS msg if subscribed
This adds the message MOUNT_STATUS to report about the attitude of a
gimbal.
2016-11-09 10:23:34 +01:00
Julian Oes
18d69698a0 vmount: publish mount_status
We need feedback in mavlink about the attitude of the gimbal. Therefore
the gimbal output angles are published in vmount.
2016-11-09 10:23:34 +01:00
Julian Oes
7e312f3961 msg: Added message for mount status 2016-11-09 10:23:34 +01:00
Julian Oes
8ddda0a8fa mavlink: move the msg id from uint8_t to uint16_t
With mavlink2 new messages are added with msg IDs greated than 255.
Therefore the msg ID types needed to be raised everywhere.
2016-11-09 10:23:34 +01:00
Julian Oes
278d63eef6 mavlink: update both submodule to lastest master 2016-11-09 10:23:34 +01:00
Julian Oes
7df11b900d mavlink: use queueing for acks 2016-11-09 08:50:13 +01:00