Commit Graph

252 Commits

Author SHA1 Message Date
Julian Oes 8ff237c69f Remove size optimization for individual modules
It makes more sense to set the optimization flags on a platform basis
instead of individually for each module. This allows for different
optimization options for SITL, NuttX, Snapdragon, etc.
2016-09-30 08:11:51 +02:00
Daniel Agar cff9e90bec position_estimator_inav fix and enforce code style 2016-08-07 10:40:17 +02:00
Lorenz Meier 7601788c43 INAV: clean up vision timestamps 2016-07-10 12:44:00 +02:00
Beat Küng 9c73eae941 sensor_combined: replace accel & gyro integral with value, use float for dt
Reason: the value is easier to read & handle (for example plotting). In
most places the value is needed, not the integral.

Note that this breaks the replay format for sdlog2 replay
2016-07-07 11:35:50 +02:00
Beat Küng 8e136779ec stack sizes: reduce stack sizes for modules that use sensor_combined
The sensor_combined topic got reduced from ~780 bytes to 72 bytes.
2016-07-07 11:35:50 +02:00
Beat Küng c5ea4b43be sensor_combined.msg: make timestamps relative
This is needed for the new logger & saves some space as well.
2016-07-07 11:35:50 +02:00
Beat Küng d846ad5dac sensors: move voting into sensors module
- voting is now at a central place instead of duplicated within the
  estimators
  -> this also means that estimators that did not do voting so far,
     now have voting, like ekf2
- estimators requiring more than that can still subscribe to the raw
  sensors
- allows sensors_combined to be 3 times smaller
  - reduces logger, memcpy (cache) & RAM overhead
- all modules requiring only 1 or 2 sensor values now automatically get
  the voted result
- this also adds voting to baro
2016-07-07 11:35:50 +02:00
Beat Küng b4ecc5a8d9 sensor_combined cleanup: remove many unneeded fields
Decreases the message size from 780 to 280 bytes.
In particular, all modules using sensor_combined must use the integral now.
The sensor value can easily be reconstructed by dividing with dt.

Voters now need to be moved into sensors module, because error count and
priority is removed from the topic.

Any module that requires additional data from a sensor can subscribe to
the raw sensor topics.

At two places, values are set to zero instead of subscribing to the raw
sensors (with the assumption that no one reads them):
- mavlink mavlink_highres_imu_t::abs_pressure
- sdlog2: sensor temperatures
2016-07-07 11:35:50 +02:00
Beat Küng b28bfce186 position_estimator_inav: fix compiler issue for GCC 6.1.1 (#4923)
GCC output:
implicit conversion from ‘float’ to ‘double’ to match other operand of
binary expression [-Werror=double-promotion]

It seems gcc 6.1.1 uses the float variant of fabs, whereas older gcc's
use the double version. This makes it compile for both.
2016-06-28 09:25:36 +02:00
Beat Küng e2a7145379 vehicle_gps_position: remove timestamp_variance & timestamp_velocity (they're not used) 2016-06-24 00:22:01 +02:00
Beat Küng 89f5bd27e8 vehicle_gps_position: use timestamp field instead of timestamp_position
timestamp was unused. This allows to remove timestamp_position.
2016-06-24 00:22:01 +02:00
Lorenz Meier fe69be05ca INAV: Move to -Os 2016-05-29 15:54:04 +02:00
Daniel Agar 76387b1693 uorb autogeneration 2016-05-14 11:27:07 +02:00
Daniel Agar e08e8fa24f position_estimator_inav_params.cpp param metadata 2016-05-13 21:03:40 -04:00
Beat Küng 27d821ac9f fix position_estimator_inav_main: put terrain_estimator on the stack
This fixes a memory leak
2016-05-03 17:34:42 +02:00
James Goppert f73af95b38 Added SYS_MC_EST_GROUP to allow fine grained algorithm selection. 2016-04-14 15:22:25 -04:00
James Goppert 967e4dd127 Modified cmake to use STACK_MAX and STACK_MAIN 2016-04-14 13:36:36 -04:00
Daniel Agar 70a68def83 params correct boolean tag 2016-03-25 20:25:17 -04:00
Julian Oes bba0d0384d drivers/modules: changes after mavlink_log change
The mavlink_log API changes lead to changes in all drivers/modules using
it.
2016-03-24 13:10:02 +01:00
Daniel Agar 7a9427bc34 param remove empty @unit 2016-03-14 09:12:34 +01:00
Daniel Agar c10dbfed7b position_estimator_inav param @unit 2016-03-14 09:12:34 +01:00
Daniel Agar cfac0b0640 position_estimator_inav param @unit 2016-03-14 09:12:34 +01:00
Mark Charlebois 9f3bf8e9f4 Rebase changes on upstream master
This brings in many of the changes from the PX4 fork on ATLFLight.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2016-02-19 16:59:41 +01:00
Julian Oes 1bbfb02430 position_estimator_inav: fix function declaration 2016-02-18 18:53:00 +01:00
ChristophTobler 19bc39e7ad added a offset parameter for lidar in inav 2016-02-10 09:24:39 +01:00
ChristophTobler 0a76347c9d Changed min/max distance with distance topic params. Added a check for mocap: mocap estimation requires heading from mocap 2016-02-10 09:24:39 +01:00
ChristophTobler c7640723c9 change std::fabs to fabs and rate_threshold to double 2016-02-10 09:24:39 +01:00
ChristophTobler c7ff253a6d change abs to std::fabs 2016-02-10 09:24:39 +01:00
ChristophTobler e7cdb19424 gyro threshold for optical flow and lidar min/max parameter 2016-02-10 09:24:39 +01:00
ChristophTobler a78d732957 change lidar altitude correction threshold 2016-02-10 09:24:39 +01:00
ChristophTobler e2c04b7fa7 replaced lidar min/max distances with parameters 2016-02-10 09:24:39 +01:00
ChristophTobler 1a6c4e123c formatting 2016-02-10 09:24:39 +01:00
ChristophTobler f822b136dc change optical flow weight and scale 2016-02-10 09:24:39 +01:00
ChristophTobler 82be3d09d6 added optical flow scale and removed blanks 2016-02-10 09:24:39 +01:00
ChristophTobler f32021f856 remove lidar filter value from qgc params 2016-02-10 09:24:39 +01:00
ChristophTobler 23f428d639 removed lowpass for lidar correction 2016-02-10 09:24:39 +01:00
ChristophTobler 42131e817d changed value for lidar filter 2016-02-10 09:24:39 +01:00
ChristophTobler b54bc23550 fix in flow yaw compensation 2016-02-10 09:24:39 +01:00
ChristophTobler 6650bca35b decoupled lidar from flow and used it for altitude estimation. qgc params added to enable it. 2016-02-10 09:24:39 +01:00
Andreas Antener 3d971e214a don't update local position reference if home position changes 2015-12-31 13:24:12 +01:00
Andreas Antener bdce1a902f update missin param in inav 2015-12-17 18:25:23 +01:00
Lorenz Meier 4a1dd4f047 Merge pull request #3234 from UAVenture/altitude_message
WIP: Altitude message
2015-12-06 14:10:31 +01:00
Lorenz Meier e1a5efb9a5 INAV: Be less chatty 2015-12-03 13:49:35 +01:00
Lorenz Meier f0a4979da6 Merged master into driver_framework 2015-12-01 12:34:02 +01:00
Lorenz Meier 3515e6ae91 INAV: Increase stack size as needed 2015-11-29 17:38:26 +01:00
Erik de Castro Lopo 0b3889e2e3 INAV: Valgrind fix
Make sure `struct position_estimator_inav_params params` is properly initialized.

At first there was no indication that this struct was un-initialized because valgrind
was issuing warnings about values that were derived (via float calculations) from
values in this struct. Maybe instruction re-ordering during optimization caused
this disconnect between the source of the problem and the symptom.
2015-11-27 17:51:12 +11:00
Andreas Antener c706c30e83 fill pressure altitude in global position from estimators 2015-11-24 14:04:33 +01:00
Andreas Antener 6bec773423 changed isfinite to PX4_ISFINITE 2015-11-24 13:37:06 +01:00
Andreas Antener 67dd28e2c4 update distance sensor separate from flow 2015-11-24 11:56:57 +01:00
Andreas Antener a87ffe9bf3 added terrain estimator to inav 2015-11-24 11:56:57 +01:00