Commit Graph

3533 Commits

Author SHA1 Message Date
Jason Short 6913400221 cast D term to float just in case 2012-02-16 22:09:21 -08:00
Jason Short 43e695b1ac removed some unused vars,
formatting, made loop speed same as PIDT1 to eliminate variable.
2012-02-16 22:09:21 -08:00
Andrew Tridgell 3fbb5a2d6c ADC: on channel overflow we should not zero last_ch6_micros
this happens every 64 seconds because of unused channels on the
ADC. Zeroing this creates a bad delta_t value for the DCM code.
2012-02-16 17:48:36 +11:00
Phil f8ed9f0e8d APM: Fix rudder in elevon mode.
elevon planes can have rudders too
2012-02-16 14:43:24 +11:00
Jason Short b070225366 CH 6 Range setup 2012-02-15 11:47:54 -08:00
Jason Short bb4c02fbff Added acro_p to the params 2012-02-15 11:29:25 -08:00
Jason Short f2b6b86265 allow auto-land if failsafe is triggered 2012-02-15 10:53:54 -08:00
Jason Short efb451e475 Marco's updated Motor testing code 2012-02-15 10:49:35 -08:00
Jason Short f9296796fd Added lengthy note about motor testing 2012-02-15 10:49:11 -08:00
Jason Short 0b011e3cd3 added option in code for Loiter specific gains 2012-02-15 09:10:15 -08:00
Jason Short 101979ed7b AP slew rate 2012-02-15 09:10:15 -08:00
Jason Short f20952df49 new defaults for params 2012-02-15 09:10:15 -08:00
Jason Short 11d1973abd Added Acro_P 2012-02-15 09:10:14 -08:00
Jason Short 67892cd8df synced params 2012-02-15 09:10:14 -08:00
Jason Short c916a87a78 added RTL_land_enabled
added auto_pilot slew rate
2012-02-15 09:10:14 -08:00
Jason Short eee43608de Added new params for CH6 Tuning
moved enums to give more room for additional PIDs for Loiter
added new Acro_P gain
added auto_land_enabled option
added pi_loiter_lon and pi_loiter_lat for separate tuning of loiter
2012-02-15 09:10:14 -08:00
Jason Short 4ecbb19dcd Added range setting via a parameter for CH6 tuning 2012-02-15 09:10:14 -08:00
Jason Short 8e88d9e19e change constant to float 44330.0 2012-02-15 09:10:14 -08:00
Michael Oborne b020a87c13 eedump ap param in perl 2012-02-15 21:31:58 +08:00
Andrew Tridgell bc89b53bdc SITL: adjust the SITL compass code to have saner z values 2012-02-15 22:34:16 +11:00
Andrew Tridgell 63d768143d Compass: enable compass offsets for HIL compass
this makes the null_offsets algorithm have an effect for the HIL
compass that is used for SITL, which makes for easier testing of
compass calibration
2012-02-15 22:33:50 +11:00
Andrew Tridgell 7d21692301 fixed dump size 2012-02-15 10:44:09 +11:00
Andrew Tridgell d2cc6740f0 show group_element too 2012-02-15 10:42:21 +11:00
Andrew Tridgell aaba4db144 AP_Param: added eeprom_aaparam.c dump utility 2012-02-15 10:41:06 +11:00
Andrew Tridgell 2dcb594f4a APM: changed hold_course for landing to be based on yaw_sensor
when we are in the final stages of a landing (less than 2 seconds from
landing waypoint, or less than 3m above landing altitude) we switch
the navigation to use a fixed course. The code previously used the
crosstrack_bearing for this, but this can lead to a large nav_roll in
this final stage of the approach, which can put a wing into the
runway. In autotest we were seeing a nav_roll value of -45 degrees as
we crossed the transition point for the landing, which often led to a
crash.

This changes the code to use the current yaw_sensor value instead,
which is much less likely to lead to large rolls in the final landing
stages.
2012-02-15 08:50:45 +11:00
Andrew Tridgell c6b6320b43 APM: report the nav_bearing as hold_course when enabled
this gives a more accurate view of the navigation code, as when
hold_course is not -1 it overrides nav_bearing
2012-02-15 08:50:45 +11:00
Andrew Tridgell 252a2d0c9b APM: added some comments related to hold_course
hold_course is either -1 (for disabled) or a course to hold for
takeoff/landing. This makes the code a bit clearer.

It also resets hold_course in all non-auto modes, to ensure it isn't
used
2012-02-15 08:50:45 +11:00
Andrew Tridgell a4663c4b20 autotest: increase the rudder gain
this gives a bit better landing approach and turns in auto
2012-02-15 08:50:45 +11:00
Andrew Tridgell 812b7ae5ae SITL: catch floating point errors
if we get a FPE then log a message and exit
2012-02-15 08:50:45 +11:00
Andrew Tridgell c39914e734 DCM: added a SITL_debug() for DCM normalisation errors
I have seen normalisation errors during simulation runs, but have not
yet tracked down the cause. This log message may help track things
down.
2012-02-15 08:50:45 +11:00
Andrew Tridgell 7355f5613c added SITL_debug() macro
this can be used to print a message into the logs in the SITL
simulator. This will be used for critical conditions.
2012-02-15 08:50:45 +11:00
Andrew Tridgell 7ba65aecf3 RC_Channel_aux: fixed a uninitialied variable error, and save a bit of stack space 2012-02-15 08:50:45 +11:00
Michael Oborne eaf041dd8c APM Planner 1.1.36
add guided mode wp
fix setup setting save (if closed without switching tabs)
2012-02-14 22:13:11 +08:00
Andrew Tridgell c93dedc955 when setting airspeed and groundspeed in a mission, don't save to EEPROM
If you include airspeed, throttle or groundspeed changes in a mission
then those should not be saved to EEPROM, as otherwise if you restart
and re-fly the mission you will be starting with different parameters
to the ones you used for the first flight.

This is particularly important for setting the target airspeed when
coming in for a landing. You typically set a low target, but if you
fly again the next day I think it would be a real surprise to find
that your loiter airspeed has then changed to the value from the
landing part of your last mission.

This one can be argued either way, but I think that not saving these
changes is the more conservative choice, and better fits the
'principal of least surprise'
2012-02-14 15:20:44 +11:00
Andrew Tridgell b166fbff5a autotest: use more rudder for steering
this helps the landing a lot
2012-02-14 15:16:35 +11:00
Andrew Tridgell 6b33e48514 autotest: raise the target airspeed on landing
we were stalling the plane in the final meters of the approach
2012-02-14 12:30:46 +11:00
Andrew Tridgell 27fd4ca213 autotest: adjusted APM parameters
enable compass and tweak tuning
2012-02-14 11:26:42 +11:00
Andrew Tridgell c105645c57 autotest: added a lot more interal checking
check each of the sub-tests pass for overall pass
2012-02-14 11:26:42 +11:00
Andrew Tridgell 273a974814 SITL: add some magnetometer offsets
this ensures the compass null_offset algorithm has some work to do in
autotest
2012-02-14 11:26:42 +11:00
Andrew Tridgell 9103f7688c fixed SITL GPS heading to be 0..360 2012-02-14 11:26:42 +11:00
Jason Short ff627a8986 removed unused Vars 2012-02-13 15:25:23 -08:00
Jason Short a69dc32020 Lowered for Jani 2012-02-13 15:25:23 -08:00
Andrew Tridgell 2f1f5f14f5 autotest: fixed the directory that the git hash is fetched in 2012-02-14 09:06:24 +11:00
Andrew Tridgell df2ef6ff47 APM: fixed some build warnings 2012-02-14 08:58:56 +11:00
Andrew Tridgell 3907cf81f8 Mavlink: report the corrected pitch via MAVLink
this subtracts the TRIM_PITCH_CD from the pitch reported via
MAVLink. That gives a better indication of the true pitch in the tlog
2012-02-14 08:58:56 +11:00
Andrew Tridgell a1c041b597 use stdint types in the compass code 2012-02-14 08:35:03 +11:00
Andrew Tridgell 6c20ff9492 AP_Param: allow dumping of AP_Vector3f
this means the 'show' command in the CLI shows the compass offsets now
2012-02-14 08:34:50 +11:00
Andrew Tridgell 8d88dbdf79 added some AP_Param testing of the compass 2012-02-14 08:34:25 +11:00
Andrew Tridgell da16ccf993 fixed some printf casts 2012-02-14 08:34:10 +11:00
Andrew Tridgell c6f3f7065c APM: the CLI fits nicely on the 1280 again now
I find the CLI very useful for testing, so enable it by default on the
1280. Logging is still off by default.
2012-02-14 08:33:49 +11:00