http://code.google.com/p/ardupilot-mega/downloads/list

This is a new version of Mega for Alpha testers to try out. Please use this thread to let me know if you are having issue or questions.

Enjoy,
Jason


Things left to do:
- Move the Reverse servo functions to the hardware switches
- finish binary GCS
- uplink parser
- magnetometer support
- better integration of baro sensor

What this release has:
- A complete waypoint command set including Auto Launch, Loiter N times, Loiter N seconds, Land, etc.
- missed waypoint detection
- All flight modes are available.
- Xplane integration with the IMU library for tetsing
- a Waypoint Writer for manually uploading commands - sorry, no GCS yet!


Here are the commands:

CMD_WAYPOINT   - normal autopilot waypoints
CMD_LOITER - enter Loiter mode around the specified coordinates
CMD_LOITER_N_TURNS - enter Loiter mode around the specified coordinates N times
CMD_LOITER_TIME - enter Loiter mode around the specified coordinates N seconds
CMD_RTL - enter RTL mode - come home
CMD_LAND_WP - enter landing mode, got to the specified coordinates
CMD_TAKEOFF - enter takeoff mode, height and pitch defined

CMD_CH_MODE - change flight mode - see defines for corresponding numbers
CMD_RESET_INDEX - start over waypoint commands
CMD_GETVAR_INDEX - return the variable referenced by an index code
CMD_SENDVAR_INDEX - send a variable value referenced by an index code
CMD_TELEMETRY - toggle telemetry on or off

CMD_THROTTLE_CRUISE - set the value of the throttle for cruising
CMD_AIRSPEED_CRUISE - set the value of the target airspeed in meters/second
CMD_LAND - set the pitch, target airspeed, and throttle cruise for landing
CMD_RESET_HOME - resets home to current location

CMD_PAYLOAD_0 - not implemented
CMD_PAYLOAD_1 - not implemented

CMD_KP_GAIN - set the value
CMD_KI_GAIN - set the value
CMD_KD_GAIN - set the value
CMD_KI_MAX - set the value
CMD_KFF_GAIN - set the value
CMD_RADIO_TRIM - set the value
CMD_RADIO_MAX - set the value
CMD_RADIO_MIN - set the value

Here is an example of a command set to launch, loiter 4 times and land. I used special CMD_LAND_WP waypoints for two reasons. They keep the flight mode in "Land" which lets me override the pitch with my own special value. Then it lets me stage my landing in multiple steps. As I reach each waypoint, the next CMD_LAND function is executed and I pitch the nose up and cut the throttle at the last minute.


// 1 pitch 20°, Altitude meters
CMD_TAKEOFF, 20, 0, 0, 100
// 2 Loiter 4 turns around this waypoint
CMD_LOITER_N_TURNS, 4, 37.621392, -122.374660, 80
// 3 Extra point for line up
CMD_WAYPOINT, 0, 37.622354, -122.378007, 40
// 4 Pitch 20°, reduce airspeed to 10 m/s, throttle to 30%, track WP on
CMD_LAND, 20, 10, 30, 1
// 5 This is a special intra-waypoint to keep us in landing mode
CMD_LAND_WP, 0, 37.623880, -122.381736, 30
// 6 Pitch 20°, reduce airspeed to 5 m/s, throttle to 0%, track WP on
CMD_LAND, 20, 5, 0, 1
// 7 This is a special intra-waypoint to keep us in landing mode
CMD_LAND_WP, 0, 37.626073, -122.387028, 20
// 8 Pitch 30°, reduce airspeed to 0 m/s, throttle to 0%, track WP off
CMD_LAND, 30, 0, 0, 0
// 9 our final destination
CMD_LAND_WP, 0, 37.628123, -122.392101, 0

Views: 57

Reply to This

Replies to This Discussion

Hello, I am very new to this and to compile the 1.0.1 APM gives me the following error.

In function 'void fast_loop ()':
error: 'class GPS_UBLOX_Class' has no member named 'airspeed'

Not if you need a library for the airspeed.
Jason,
Did you change the gps ublox lib file ?
I get the same error.
Earl
compiles ok now
Earl
For now set GCS_PROTOCOL to 5 in your config like this:

#define GCS_PROTOCOL 5
I re-uploaded it.
The trick is the GPS can't be set in the header anymore until I figure out how to use defines and includes together to "compute" the header. Anyone know how to do that in C++?

You need to uncomment the correct GPS library in the main file:

// GPS
//#include // ArduPilot IMU/XPLANE GPS Library
#include // ArduPilot Ublox GPS Library
//#include // ArduPilot MediaTek GPS Library
//#include // ArduPilot NMEA GPS library
Thank you very much Jason, now compiles perfectly and seems to work ok, over a week I will prove in the plane test / crash that I have prepared for these tests, a greeting and congratulations to the entire team.
Jason,

I'm using the MediaTek GPS Library and on compile receive the following error. I'm using the zips from the download section and not the SVN.

In function 'void update_GPS()':
error: 'class GPS_MTK_Class' has no member named 'Speed_3d'
Try something like this:

#define GPSTYPE ublox
#define xhdr(a) str(a.h)
#define str(a) #a
#include xhdr(GPSTYPE)
#LeeJR, you've installed the updated library GPS_MTK?
I have tried both the versions of the library. The one in the zip files and the one pulled from

https://arducopter.googlecode.com/svn/trunk/libraries Revision 55

Is there another source I should be using?
Well, if you've tried these two not to tell you, because I've done exactly the same and with the. Zip worked well, yet I made it to make sure we did not have any files without upgrading, I copied the library completely. greetings and luck.
Javier,

Thank you, just know it can be done helps, I will keep at it and reset my source files and try again.

RSS

Social Networking

Contests

Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.

A list of all T3 contests is here

Groups

Advertisement

© 2013   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service