Commit Graph
271 Commits
Author SHA1 Message Date
Youssef Demitri da29b88a04 added LP filters (10Hz) on attitude rates in estimator 2015-06-24 14:37:58 +02:00
Lorenz Meier 71fc0f5bc4 EKF: Fix mavlink output 2015-06-22 09:58:11 +02:00
Lorenz Meier 9d0d6ba2bf EKF: Fix isfinite calls 2015-06-13 11:31:55 +02:00
Lorenz Meier c9fefe236b Merged release into master 2015-06-13 11:06:01 +02:00
Lorenz Meier 3cc2b7ed12 EKF: Add small gyro failover hysteresis 2015-06-11 14:52:04 +02:00
Lorenz Meier e8a9c20056 EKF: Ensure we start with zero local altitude and zero GPS offset. Since the filter is not publishing any data at this point this is not relevant in operation, but might be important later if we publish a separate altitude estimate topic 2015-06-11 12:30:05 +02:00
Lorenz Meier da6a07421b EKF: Add hysteresis to mag failover 2015-06-09 09:15:45 +02:00
Lorenz Meier 3eebd8eb30 EKF: Prevent bad data from being published 2015-06-08 16:48:50 +02:00
Lorenz Meier fe09e53b5b EKF reset handling: Ensure altitude reinitializes correctly 2015-06-08 16:48:50 +02:00
Lorenz Meier e1ecac078d EKF: Harden GPS offset filter value for HIL 2015-06-08 16:48:50 +02:00
Lorenz Meier f02ffa5a90 Att / Pos EKF: Fix handling of altitude initialization for local frame 2015-06-08 16:48:50 +02:00
Lorenz Meier 06ba8d924a Move estimator_status to generated topics 2015-05-27 15:21:31 -07:00
Lorenz Meier 4565f57468 Merged release_v1.0.0 into master 2015-05-27 15:28:41 -07:00
Mark Charlebois 1ca05aaa64 orb_advert_t changed to void * and checks changed to nullptr
The existing orb_advert_t use thoughout the code sometimes tries
to treat it as a file descriptor and there are checks for < 0
and ::close calls on orb_advert_t types which is an invalid use
of an object pointer, which is what orb_advert_t really is.

Initially I had changed the -1 initializations to 0 but it was
suggested that this should be nullptr. That was a good recommendation
but the definition of orb_advert_t had to change to void * because
you cannot initialize a uintptr_t as nullptr.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-27 14:42:49 -07:00
Mark Charlebois a734fc96d1 extensive orb_advert_t fixes
The calls to orb_advertise were being mishandled throughout the code.
There were ::close() calls on memory pointers, there were checks
against < 0 when it is a pointer to a object and values larger than
0x7ffffffff are valid. Some places orb_advert_t variables were
being initialized as 0 other places as -1.

The orb_advert_t type was changed to uintptr_t so the pointer value
would not be wrapped as a negative number. This was causing a failure
on ARM.

Tests for < 0 were changed to == 0 since a null pointer is the valid
representation for error, or uninitialized.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-27 14:41:33 -07:00
Ban Siesta 13a4cdd05e ekf_att_pos_estimator: adapted to change in distance_sensor msg 2015-05-24 15:58:15 +01:00
TSC21 43668cc8c8 distance_sensor: adopt message in both range drivers and on ekf_att_pos_estimator 2015-05-23 17:49:52 +01:00
Mark Charlebois c5237f7f6f Removed extra abstracton layer in systemlib
The calls to task_spawn_cmd, kill_all, and systemreset  were wrappers
around the px4_{task_spawn_cmd|kill_all|systemreset} implementations.

Removed the wrappers and changed all calls to the px4_ equivalents.

NuttX specific code was moved into px4_tasks.h

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-06 14:43:11 -07:00
Mark Charlebois 187f13cd70 QuRT and POSIX changes - part 4
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-24 01:24:31 -07:00
Mark Charlebois 612579c809 Removed check for isfinite as no longer needed
PX4_ISFINITE resolves the definition of isfinite.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 12:08:06 -07:00
Mark Charlebois 8c8f57b5b4 Fixed std::isfinite vs isfinite differences
Added PX4_ISFINITE(x) to px4_defines.h to handle the differences on
NuttX and Linux.

This change also picked up some file renaming for virtual character devices

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:34:12 -07:00
Lorenz Meier 7bdaec9ff0 att + pos EKF: Enable execution on Linux 2015-04-20 11:27:17 -07:00
Mark Charlebois 9758112e31 Use px4_config.h instead of nuttx/config.h
Modified code to use OS independent header file for config settings.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 10:55:41 -07:00
Mark Charlebois bf429188b4 Reverted: Use OS independent API for task creation/deletion
Keep existing API use in code. Bind the use of the OS independent
implementation in the systemlib layer.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 10:49:44 -07:00
Mark Charlebois ddb32742eb Use OS independent API for task creation/deletion
Calls to task_delete and task_spawn_cmd are now
px4_task_delete and px4_task_spawn_cmd respectively.

The px4_tasks.h header was added to the affected files
and incusions of nuttx/config.h were removed.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 10:49:44 -07:00
Lorenz Meier 8978278320 EKF combined att + pos estimator: Robustify against mag 0 vectors and timeouts 2015-04-18 20:49:18 +02:00
Johan Jansen b7a6f18ca6 AttPosEKF: Only fuse GPS velocity if they are valid 2015-04-18 17:23:19 +02:00
Daniel Agar 2e824bbeea fix incorrect argc < 1 check for no arguments
-requiring arguments should be argc < 2
2015-04-18 12:02:58 +02:00
Lorenz Meier cc11e8a098 EKF: Sync to upstream repo 2015-04-03 17:01:32 +02:00
Lorenz Meier 368a21ddab Fix typo in vector matrix product, fixes #1969, reported by @cat888 2015-04-03 08:54:49 +02:00
Lorenz Meier bab79ece49 Better defaults for filter noise params 2015-03-15 12:00:37 +01:00
Lorenz Meier aceca6b2a9 Fix gyro offset calculation 2015-03-15 11:32:37 +01:00
Johan Jansen 8508287590 AttPosEKF: Remove unused code 2015-03-13 15:59:01 +01:00
Johan Jansen 4a8f799e9e AttPosEKF: Make local_pos output Z ref pos relative 2015-03-13 15:27:02 +01:00
Johan Jansen 435d82dee2 AttPosEKF: Remove barometer reference altitude 2015-03-12 18:17:39 +01:00
Johan Jansen 211760e3e3 AttPosEKF: Fix 5Hz sawtooth oscilation in XY position estimate 2015-03-12 17:28:21 +01:00
Johan Jansen 67695f191e AttPosEKF: Use Geolib lat/lon position projection 2015-03-12 13:17:51 +01:00
Johan Jansen 20592ce4d8 AttPosEKF: Compile fix for protected HIL function 2015-03-12 10:29:16 +01:00
Johan Jansen 5f5a6e841f AttPosEKF: Reset states to current state 2015-03-12 09:41:38 +01:00
zefz 588edd794d AttPosEKF: Reset covariance calculation on state reset 2015-03-11 12:47:11 +01:00
Johan Jansen 73ac2d90cf AttPosEKF: Compile fix for missing braces 2015-03-08 22:18:28 +01:00
Johan Jansen cdbd6872ed AttPosEKF: Fix inverted logic for inhibitMagStates 2015-03-08 22:00:38 +01:00
Johan Jansen 1dc7d4905c VectorMath: Optimization by passing vector by reference instead of value 2015-03-08 12:26:59 +01:00
Johan Jansen 34f6cf9eb6 AttPosEKF: Inhibit mag state if not fixed wing and not accelerating forwards 2015-03-08 12:15:39 +01:00
Johan Jansen 11568c77d4 VectorMath: Add scalar division to custom EKF vector math 2015-03-08 12:14:47 +01:00
Johan Jansen 807e02b4a0 AttPosEKF: Direct to EKF whether the vehicle is flying like a FixedWing or not 2015-03-08 12:13:56 +01:00
Johan Jansen e0d1e3ca5e AttPosEKF: Fix code style using AStyle script 2015-03-03 13:36:18 +01:00
Johan Jansen 35e0faa48a AttPosEKF: Fix dead-reckoning for global position estimates without GPS 2015-03-03 13:28:55 +01:00
Johan Jansen 74a5dcdb1b AttPosEKF: Subscribe to vehicle armed status 2015-03-03 13:28:21 +01:00
Sebastian Verling a77420ede8 corrected rate offset calculation such that units match 2015-02-23 18:44:38 +01:00