Pages

vendredi 27 avril 2012

Maintaining heading lock

I found a file for ardupilot mega, that was made for test purpose, but that fits perfectly my needs.

Here's the content of the file (with the link to the original post below)

[optional] Ground Testing with the FixedDirection ModeIf you want to test the autopilot further on the ground, we have included a special softwaremode to allow this. In previous version of the software, we had special "NorthEast" codethat would attempt to always steer the plane north-east for testing purposes. In version 2.2and above, this mode can be enabled with a simple settings change in the EasyStar.h (orwhatever airframe you're using) file:Set the following lines as per the below://9-1#define FAKE_BEARING 1 //If set to 1, will fake the bearing and willtry to go always head to the defined DESIRED_FAKE_BEARING//9-2#define DESIRED_FAKE_BEARING 45 //Will try to go NorthEast, you canchange that to 0 = NORTH, 90 = EAST, 180 = SOUTH, 270 = WEST orwhatever!//9-6#define WALK_AROUND 1 //Must be "0" to test the GPS and headingagainst the servo and "1" for normal operation[Walk-Around mode disables stabilization, turning ArduPilot into a navigation-only autopilot.This is also useful if you want to use ArduPilot in ground vehicles that don't requirestabalization, or if you want to use ArduPilot in an aircraft that already has its ownstabilization system, such as the FMA CoPilot]Save the file, then open the Arduino IDE, load the ArduPilot code and download it toArduPilot.Now walk outside with your plane (with all the RC stuff hooked up) and power up, waitinguntil you get a GPS lock (solid blue LED). Once you've got that, toggle the autopilot on andstart walking around at a brisk pace in big circles. You should see the rudder (assumingyou're using the EasyStar; ailerons if you you're using a plane with them) try to steer youso you're going NorthEast.When you're done with the ground testing, return the autpilot to its normal mode by editingthis line as follows and re-uploading the code to ArduPilot://9-1#define FAKE_BEARING 0 //If set to 1, will fake the bearing and willtry to go always head to the defined DESIRED_FAKE_BEARING

From here : http://api.ning.com/files/8uesEX-AhXHtK*U594HwOxfrqYufSbIoQAlrDkdwsBdI5cy1IHpwN2fjM8j4uq-pgdgq-iHztCUjG3YBXUeL0vaetPJviF0U/ArduPilot_2_Manual.pdf

The config file is here :
http://ardupilot.googlecode.com/files/ArduPilotNE.zip

Aucun commentaire:

Enregistrer un commentaire