Here's what I hope is the final release.
As the new Manual gets formatted, you can view it at: http://code.google.com/p/ardupilot/wiki/ArduPilot25
Until the content is finally moved over the 2.4 manual is still a great resource.
Ardupilot_25_RC2.zip
Bonus - If you look check out the Waypoint_writer_25.pde file in the test suite, you can upload relative waypoints. This isn't supported in the config tool yet.
Jason
UPDATE -
A lot of people were having trouble with the GPS code and LEDs. I reworked the GPS parsers today to iron out some things. They were nothing that would interfere with flight, but I highly recommend using this new version. I've also added the ability to scale down your plane's roll based on airspeed. This should help planes that turn faster when they go slower. We may tweak this a bit in the future, so I'm looking for feedback on it. Note you can always turn it off in your header file with this line:
//6-4
#define AIRSPEED_TURN_P 1
see the header file for more instructions
Comments
case 1: // First position
set_mode(POSITION_1);
break;
case 2: // middle position
//set_mode(RTL);
set_mode(POSITION_2);
break;
case 3: // last position
set_mode(POSITION_3);
break;
As you can see in the latests events.pde file I pull the defines in from the header. You could completely edit the events.pde file yourself if you wanted to get tricky. You can also add all sorts of control code in there too.
Manual is reserved for switch position 1 - the mux prevents any other mode.
positions 2 and 3 are up to the user.
I left position 1 editable in case someone wanted to create a new mode that output different telemetry or some other thing I cant think of.
Here is the relevant part of the header:
// Flight Modes
// these Flight modes can be changed to either here or directly in events.pde
// options are MANUAL, STABILIZE, FLY_BY_WIRE, AUTO, RTL, LOITER
#define POSITION_1 MANUAL
#define POSITION_2 AUTO
#define POSITION_3 STABILIZE
If the radio isn't setup correctly, you won't output the right PWM values for the board to read position 2. I know the Futaba 7C that I have doesn't work out of the box.
#3 and #4 are reserved for future modes. In the code I basically do "> AUTO" to see if the plane is flying itself or the user is in control.
Jason
void switch_event(byte switchPosition)
{
switch(switchPosition)
{
case 1: // First position
set_mode(MANUAL);
break;
case 2: // middle position
//set_mode(RTL);
set_mode(AUTO);
break;
case 3: // last position
set_mode(STABILIZE);
break;
}
}
And what happened to ##3 and ##4?
You can also turn on debug mode to see the plane fly your waypoints as a check to make sure the WP are loaded correctly. Telemetry will output to the ground station. You can also turn off throttle output or disconnect your motor if you do that indoors.
Jason
Can you make sure your switch registers all three positions? You can do this with the Airframe tester or the full version. When the switch changes you should see a message output in the telemetry or Serial window of Arduino.
##0| MANUAL
##1| STABILIZE
##2| FLY BY WIRE
##5| AUTOPILOT
##6| RTL
##7| LOITER
To adjust your radio, you need to adjust the endpoints of channel 5 (or whatever channel you use for the three position switch.) Do that until you see the modes change.
The stabilized mode works I will need to tune the gains to make this work better but first try all seems very good.
I had 4 waypoints loaded and when I flipped to Auto or RTL nothing happens. Looking at the Telemetry
there is never a bearing or dist to any waypoints regardless of wich mode i are in?
I used the configuration tool to up load the waypoints.
-
8
-
9
-
10
-
11
-
12
of 12 Next