Commit Graph

21 Commits

Author SHA1 Message Date
Andrew Tridgell 6ced622da4 APM: fixed some build warnings and type errors 2012-07-06 19:59:18 +10:00
Andrew Tridgell 5623ef99a0 APM: changed test for having completed a waypoint
the new test is that we have passed a "finish line" perpendicular to
the track between the last waypoint and the current waypoint.

The previous tests are also still used, so if we circle a waypoint or
get within the waypoint radius we also consider it completed
2012-07-04 12:42:46 +10:00
Amilcar Lucas a12cb8fd9a Added camera trigger functionality 2012-06-13 21:00:20 +02:00
Andrew Tridgell c1e4f63907 APM: adapt ArduPlane for AHRS framework 2012-03-19 17:29:02 +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 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 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
Doug Weibel a3f9fee3d2 Additional commenting on global variables 2012-01-16 09:45:42 -07:00
Doug Weibel 0fb4082581 Bug fix for issue 438.
The rate in a change alt command does not need to be signed.  The code will determine if the rate needs to be positive or negative
2012-01-08 18:24:55 -07:00
Doug Weibel f34333d42b Minimum ground speed patch from Claudio Natoli. Thanks Claudio!
This patch will boost the target airspeed as necessary to keep the ground speed above a parameter value - param_min_groundspeed.  Airspeed is still limited to FBW-max.  Setting min_groundspeed to zero (default) disables the feature.
2011-12-09 16:43:25 -07:00
Doug Weibel 1c6469d25b Fix Do_Jump bug. Also fix cross track bearing bug after Jump 2011-11-15 20:44:19 -07:00
Amilcar Lucas 01df18b292 Added camera and/or antenna mount support.
It is fully configurable with the mission planner, there is no need to change
the source code to adapt to your setup.
It needs more testing, but the SIL is not working for me.
2011-10-31 22:55:58 +01:00
Doug Weibel c7d91a199c Bug fixes for command logic re-write 2011-10-27 13:45:57 -06:00
Doug Weibel 1cd3c21774 Initial rewrite of command logic.
Changes mission structure so that conditional and immediate commands are located between associated waypoints instead of after the second waypoint.
2011-10-27 13:45:52 -06:00
Amilcar Lucas 4b35757a1e Moved relay control functions to it's own library 2011-10-02 01:00:27 +02:00
Doug Weibel aac8eac0cb Add code to disable throttle if we are on the ground and in FBW_B or higher
Add code to disable throttle if we are on the ground and in FBW_B or higher.  We believe we are on the ground if speed < 5 and alt < 5.  Also check that we are not trying to perform a takeoff.
2011-09-30 07:25:35 -06:00
Andrew Tridgell c2126e127d use gcs_send_text_fmt() and cleanup a few old debug lines 2011-09-19 11:04:02 +10:00
Andrew Tridgell 8f604a1035 added gcs_severity enum
this makes it harder to mixup defines
2011-09-19 11:04:02 +10:00
Andrew Tridgell de18df06b5 GCS: make the two GCS links gcs0 and gcs3
the artifical separation between 'gcs' and 'hil' just leads to
confusion. This also simplifies the code a bit more, and saves us a
bit more text
2011-09-19 11:04:02 +10:00
Andrew Tridgell 35fcd6dae7 GCS: simplify the API for sending messages
this makes the code clearer, and saves us another 100 bytes of text
2011-09-19 11:04:02 +10:00
Andrew Tridgell 89fa70520f imported ArduPlane from ArduPilotMega svn 2011-09-09 11:29:39 +10:00