Commit Graph

10176 Commits

Author SHA1 Message Date
Andrew Tridgell
0966398d8d SITL: improved realism of fixed wing sim somewhat
still not good, but a bit better for manual flight
2016-01-04 08:03:46 +11:00
Andrew Tridgell
83c8505b3c HAL_SITL: send state to flightgear viewer 2016-01-04 08:02:37 +11:00
Lucas De Marchi
f3ee7a9a85 AP_AccelCal: use union instead of reference
The current approach to access the same memory location by using a
reference is giving this warning:

	../libraries/AP_AccelCal/AccelCalibrator.cpp: In constructor ‘AccelCalibrator::AccelCalibrator()’:
	../libraries/AP_AccelCal/AccelCalibrator.cpp:34:64: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
	 _param_struct(*reinterpret_cast<struct param_t *>(&_param_array))
									^
	../libraries/AP_AccelCal/AccelCalibrator.cpp: In member function ‘void AccelCalibrator::run_fit(uint8_t, float&)’:
	../libraries/AP_AccelCal/AccelCalibrator.cpp:336:79: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
	     struct param_t &fit_param(*reinterpret_cast<struct param_t *>(&param_array));
                                                                               ^
Using a union allows us to get rid of the warning, make sure the sizes of the
different structs match and have a more elegant solution.
2016-01-02 10:04:16 +11:00
Tom Pittenger
841f34effa AP_Arming: add param for accel error threshold
This is the threshold error to determine inconsistent accelerometers.
2016-01-02 10:01:46 +11:00
Andrew Tridgell
b2745bb545 AP_InertialSensor: we only need peak hold for negative X for now 2016-01-02 09:58:32 +11:00
Tom Pittenger
3aaf2b1d2b AP_InertialSensor: add pos/neg peak detector
new functions that get a filtered min/max accel peaks on each axis with fixed 500ms timeout:
    Vector3f get_accel_peak_hold_pos()
    Vector3f get_accel_peak_hold_neg()

This allows slower mechanisms, such as is_flying, to detect accel spikes which would indicate ground or object impacts. Vibe is too filtered. Independent positive and negative peaks are available
2016-01-02 09:58:31 +11:00
Andrew Tridgell
b052959c61 GCS_MAVLink: re-generated headers 2016-01-02 08:44:49 +11:00
Jonathan Challinger
c2b4235662 GCS_MAVLink: merge mavlink-solo 2016-01-02 08:42:33 +11:00
Jonathan Challinger
41c881cc9e GCS_MAVLink: temporarily remove GIMBAL_ and GOPRO_ messages pending solo sync 2016-01-02 08:42:33 +11:00
Jonathan Challinger
2a3fe35731 GCS_MAVLink: run xmlpretty.py on ardupilotmega.xml 2016-01-02 08:42:33 +11:00
Andrew Tridgell
22873ee687 SITL: reduced drag in plane model 2016-01-01 18:40:22 +11:00
Andrew Tridgell
619a4c0925 SITL: use common dynamics code for QuadPlane 2016-01-01 17:20:30 +11:00
Andrew Tridgell
33998a58ac SITL: prevent aircraft going below ground level 2016-01-01 17:01:23 +11:00
Andrew Tridgell
d425965f6d SITL: expose home yaw to FDMs 2016-01-01 17:00:57 +11:00
Andrew Tridgell
630d4410d4 SITL: removed debug code from QuadPlane 2016-01-01 15:48:56 +11:00
Andrew Tridgell
8a98ce427c SITL: moved to common code for attitude/pos update 2016-01-01 15:12:33 +11:00
Andrew Tridgell
e6555aae6d HAL_SITL: added quadplane model 2016-01-01 14:35:15 +11:00
Andrew Tridgell
d0896a1fb2 HAL_SITL: fixed init of channel 8 out in plane and rover
should be low
2016-01-01 14:35:15 +11:00
Andrew Tridgell
f2c8193f8b SITL: added a QuadPlane model 2016-01-01 14:35:15 +11:00
Andrew Tridgell
6f9e9d761f SITL: move calculations into multicopter frame class
this will enable a QuadPlane model
2016-01-01 14:35:15 +11:00
Andrew Tridgell
c6b6d7137d HAL_SITL: added plane simulator 2016-01-01 12:41:06 +11:00
Andrew Tridgell
16e0a6d7b0 AP_Math: fixed angle between two vector3s 2016-01-01 12:41:05 +11:00
Andrew Tridgell
fcfd11ef53 SITL: very simple fixed wing simulator
useful for debugging
2016-01-01 12:41:05 +11:00
Randy Mackay
bea69521c8 AC_PrecLand: velocity PI controller into parent class 2015-12-31 15:30:33 +09:00
Andrew Tridgell
8e4586b4a2 AP_Param: allow for nested groups without subclassing
this allows for param tables containing other unrelated objects
2015-12-31 15:30:31 +09:00
Tom Pittenger
4e4c1831f0 AP_ADSB: added guided mode handling 2015-12-31 15:36:49 +11:00
Randy Mackay
4e9f82a0e7 Notify: fix parameter description 2015-12-31 11:33:02 +09:00
pepevalbe
0d5e59eaa3 AP_Notify: configurable RGB LED brightness 2015-12-31 11:32:59 +09:00
Lucas De Marchi
180359d6dd AP_Math: fix unit test
For ROTATION_ROLL_90_PITCH_68_YAW_293 consider the angles as 90, 68.8
and 293.3 degrees to pre-calculate rotation. This matches the rotation
matrix used in code.

While at it, check not only the values are close enough but also the
length of the vector.
2015-12-30 20:22:28 -02:00
Lucas De Marchi
ba3325ffd3 AP_Math: rename rotation
The rotations are supposed to follow the name of the enum, in order. The
ROTATION_YAW_293_PITCH_68_ROLL_90 was added with the name of an
intrinsic 321 rotation, but the matrix is actually a 123 rotation,
following the other rotations already present.

Change the name to follow the other names.
2015-12-30 20:22:27 -02:00
Jonathan Challinger
bae16a61e2 AP_InertialSensor: fix segfault 2015-12-29 23:10:56 -08:00
Jonathan Challinger
83d5a6664a AP_Math: minor changes to matrix_alg in response to review 2015-12-29 22:57:21 -08:00
Jonathan Challinger
0a3c2774e9 AP_InertialSensor: fixes in response to review 2015-12-29 22:55:04 -08:00
Jonathan Challinger
24e413c6af AP_AccelCal: fixes in response to review 2015-12-29 22:55:04 -08:00
Jonathan Challinger
660d9e86d5 AP_AccelCal: basic sanity check on fit parameters 2015-12-29 11:00:20 -08:00
Jonathan Challinger
1482614a7d AP_Arming: add accel cal requires reboot 2015-12-29 10:46:35 -08:00
Jonathan Challinger
137ace473d AP_InertialSensor: add accel_cal_requires_reboot 2015-12-29 10:46:35 -08:00
Jonathan Challinger
f6a41a8936 AP_InertialSensor: ensure that accel calibration object isn't allocated more than once 2015-12-29 10:46:35 -08:00
bugobliterator
1a4b4fa85e AP_Math: add inverse matrix test to check if inverse(mat)*mat = I
where I is an identity matrix (a matrix with diagonal elements = 1)
2015-12-29 10:46:35 -08:00
Jonathan Challinger
65915bbe71 StorageManager: fix example build 2015-12-29 10:46:35 -08:00
Jonathan Challinger
027e622a3c RC_Channel: fix example build 2015-12-29 10:46:35 -08:00
Jonathan Challinger
2c0657f326 GCS_MAVLink: fix example build 2015-12-29 10:46:35 -08:00
Jonathan Challinger
b85631bec3 DataFlash: fix example build 2015-12-29 10:46:35 -08:00
Jonathan Challinger
94543d55bb AP_Scheduler: fix example build 2015-12-29 10:46:35 -08:00
Jonathan Challinger
780d0de4bb AP_RangeFinder: fix example build 2015-12-29 10:46:35 -08:00
Jonathan Challinger
b0de3957ea AP_OpticalFlow: fix example build 2015-12-29 10:46:35 -08:00
Jonathan Challinger
99636b3e8b AP_Notify: fix example build 2015-12-29 10:46:35 -08:00
Jonathan Challinger
62701448ca AP_Mount: fix example build 2015-12-29 10:46:35 -08:00
Jonathan Challinger
b803907163 AP_Motors: fix example build 2015-12-29 10:46:35 -08:00
Jonathan Challinger
30a563044e AP_Mission: fix example build 2015-12-29 10:46:35 -08:00