Commit Graph

14455 Commits

Author SHA1 Message Date
Andrew Tridgell
f13248e5f5 SITL: implement SIM_TERRAIN
either use AP_Terrain or flat earth
2015-01-03 21:47:54 +11:00
Andrew Tridgell
9b65376961 SITL: added SIM_TERRAIN parameter
to choose either flat earth or AP_Terrain for sonar and optical flow
AGL emulation
2015-01-03 21:47:28 +11:00
Andrew Tridgell
ab62105afe Copter: use common send_opticalflow() 2015-01-03 15:53:49 +11:00
Andrew Tridgell
a2242305c7 Plane: use common send_opticalflow() 2015-01-03 15:53:35 +11:00
Andrew Tridgell
d25bd8955d GCS_MAVLINK: move send_opticalflow() into common library 2015-01-03 15:53:22 +11:00
Andrew Tridgell
28f58df310 Plane: send HAGL in OPTICAL_FLOW 2015-01-03 15:44:50 +11:00
Andrew Tridgell
66a03d100e SITL: make some units clearer in comment 2015-01-03 15:44:19 +11:00
Andrew Tridgell
16affe51be AP_NavEKF: avoid an extra quaternion copy 2015-01-03 15:44:07 +11:00
Andrew Tridgell
023c42593f SITL: fixed units of body frame conversion for optical flow 2015-01-03 15:43:30 +11:00
priseborough
bf4ebcfda1 AP_HAL_AVR_SITL: Add maths for calculation of truth optical flow rates 2015-01-03 14:45:13 +11:00
Andrew Tridgell
0d8faab48f Replay: fixed build with AHRS change 2015-01-03 14:16:34 +11:00
Andrew Tridgell
86c5d2932a AntennaTracker: fixed build with AHRS change 2015-01-03 14:16:34 +11:00
Andrew Tridgell
788bb8ab9f Copter: make optflow available to AHRS 2015-01-03 14:16:34 +11:00
Andrew Tridgell
8f571f1225 Plane: make optflow available to AHRS 2015-01-03 14:16:34 +11:00
Andrew Tridgell
70c2aeca42 AP_AHRS: make optflow available via AHRS
same pattern as compass and airspeed sensor
2015-01-03 14:16:34 +11:00
Andrew Tridgell
51cd64b3b2 SITL: make velocity and rotmat available to the optical flow simulator 2015-01-03 14:16:34 +11:00
Andrew Tridgell
aff01c6d09 AP_OpticalFlow: fixed reversed timestamp
thanks to Randy
2015-01-03 14:16:34 +11:00
Andrew Tridgell
d2634a26bd SITL: added framework for SITL optical flow sensor 2015-01-03 14:16:34 +11:00
Andrew Tridgell
254aa32d4e SITL: added SIM_FLOW_ENABLE option 2015-01-03 14:16:34 +11:00
Andrew Tridgell
5193b2b7cf Rover: added OpticalFlow object
needed to keep SITL build happy
2015-01-03 14:16:33 +11:00
Andrew Tridgell
8708297341 Plane: update for new OptFlow API 2015-01-03 14:16:33 +11:00
Andrew Tridgell
c784ee717b Copter: update for new OptFlow API 2015-01-03 14:16:33 +11:00
Andrew Tridgell
11ff12dfd3 AP_OpticalFlow: split library into frontend/backend
this will make it easier to add a SITL backend
2015-01-03 14:16:33 +11:00
priseborough
a9eec29e45 DataFlash: Update EKF optical flow data logging 2015-01-03 14:09:15 +11:00
priseborough
69e86d3ea4 AP_NavEKF: Update EKF optical flow data logging 2015-01-03 14:09:12 +11:00
priseborough
b651eac48d AP_NavEKF: Apply timeout to terrain offset validity reporting
The terrain offset solution status is usable for a short period of time without state updates so a timeout has been added which prevents the rapid changes in solution status due to short duration sensor read errors.
2015-01-03 14:09:09 +11:00
priseborough
e6474d676e AP_NavEKF: Report correct horiz vel sol'n status during optical flow nav 2015-01-03 14:09:05 +11:00
Andrew Tridgell
584fa9b4bf Replay: fixed format string for EKF4 2015-01-03 14:07:25 +11:00
priseborough
75201c8968 AP_NavEKF: Prevent divide by zero casued by Tnb_flow.c.z = 0 2015-01-03 14:07:13 +11:00
Andrew Tridgell
1e3c23e5a3 Plane: on takeoff set prev_WP_loc to current_loc 2015-01-03 14:07:02 +11:00
Andrew Tridgell
6bb4a8c361 AP_Math: make location_path_proportion() and location_passed_point() more efficient
the dot product is much more efficient than the trigonometry. Thanks
to Paul for the suggestion
2015-01-03 14:06:59 +11:00
Andrew Tridgell
6993be54b7 HAL_Linux: raise storage size to 16k
match PX4 size
2015-01-03 14:06:54 +11:00
Andrew Tridgell
80d1bd230e Plane: report bad AHRS health if uncalibrated accels with EKF
fixes issue #1720
2015-01-03 14:06:46 +11:00
Andrew Tridgell
745b739ab7 AP_InertialSensor: make calibrated() function fast enough to call in flight
this will be used in plane to make AHRS SYS_STATUS unhealthy if a user
tries to fly with EKF enabled without a full 3D accel cal.

Note that it doesn't rely on using AP_Param load() to detect that a
value has been set, as some users are first doing a 3D cal then later
doing a 1D cal. In that case load() was returning true and would give
a false positive
2015-01-03 14:06:42 +11:00
Randy Mackay
5ba1b20d3b BattMon: add SMBus to MONITOR param description 2015-01-02 17:20:05 +09:00
Randy Mackay
ffbc3862bd Compass: update compass orient param description
Update rotation 38 to Yaw293Pitch68Roll90
2015-01-02 17:19:12 +09:00
Jonathan Challinger
9e5a30d5ba AP_Math: change ROTATION_YAW_293_PITCH_68_ROLL_180 to ROLL_90 2015-01-02 17:15:18 +09:00
Andrew Tridgell
ef55a3c6a6 AP_GPS: keep reporting GPS status messages when no GPS at 1Hz
to ensure the GCS knows that we have lost the GPS we need to keep
reporting GPS_RAW_INT messages when the GPS disappears. Sending at 1Hz
should be sufficient

Fixes issue #1722
2015-01-02 17:10:23 +11:00
priseborough
8d3940ce1b AP_NavEKF: Improved use of enumerated type for aiding mode 2015-01-02 12:10:41 +09:00
priseborough
76d1378962 AP_NavEKF: Fix compiler warning messages 2015-01-01 23:39:48 +11:00
priseborough
3e3dd9d695 AP_NavEKF: Fix parenthesis error in EKF status reporting and clean up logic
This fixes a bug which could have caused the realative position status to be incorrectly reported under some conditions and also caused a compiler warning message. the logic used to report the filter solution status has been broken down into smaller, easier to understand statements.
2015-01-01 23:39:48 +11:00
priseborough
c06f6e105e AP_NavEKF: Consistent initialisation of tuning parameters and variables
Non user adjustable parameters are now declared as 'const' in the header.
The _ prefix has been removed from non user adjustable tuning parameters.
We use a function call rather than a constructor to initialise variables because it enables the filter to be re-started in flight if necessary.
For consistency some signed integer type declarations have been changed to unsigned where appropriate.
2015-01-01 23:39:31 +11:00
priseborough
f1dfa282dc AP_NavEKF: Consolidate constant velocity mode decision logic
The decision to switch to constant velocity mode during optical flow operation and te decision to switch back were previously being made in two different places in code. Both decisions are now made in the one place which makes the code easier to follow and maintain.
2015-01-01 19:53:21 +11:00
priseborough
9caf2ac895 AP_NavEKF: Make reversion to no GPS mode unambiguous 2015-01-01 19:53:21 +11:00
priseborough
58e9dd5dcd AP_NavEKF: Enumerate Position and Velocity aiding status 2015-01-01 19:53:21 +11:00
Andrew Tridgell
fb5e53e1e4 AP_Param: cope with older gcc versions
Travis-CI uses 4.6.3
2015-01-01 18:55:11 +11:00
Andrew Tridgell
9ae0dd05f8 AP_Param: avoid build warning due to %S format 2015-01-01 18:25:05 +11:00
Andrew Tridgell
ae96a48efc Plane: use location_path_proportion()
this should produce better glide slopes when the aircraft is off
course
2015-01-01 15:17:45 +11:00
Andrew Tridgell
f38f86ab8c AP_Math: added location_path_proportion()
this can be used for glide slope calculations
2015-01-01 15:17:10 +11:00
Andrew Tridgell
4e5510c99e AP_TECS: fixed warning 2015-01-01 15:14:48 +11:00