If you ever wonder how to read and decode the protocol check this:

The protocol looks like this in terminal:

There's a low rate string at 1hz that start with !!! and the second string is 4hz and starts with +++, both finish with ***.

You need to be able to search for the head of every string like "LAT:", without care of the order, then you read the value after and stop until you reach the comma. In C/C++ are functions that do that for you, if you need an example please read the ardustation source code.

Definitions low rate:
LAT: Latitude
LON: Longitude
SPD: Speed over ground from GPS
CRT: Climb Rate in M/S
ALT: Altitude in meters
ALH: The altitude is trying to hold
CRS: Course over ground in degrees.
BER: Bearing is the heading you want to go
WPN: Waypoint number, where WP0 is home.
DST: Distance from Waypoint
BTV: Battery Voltage.
RSP: Roll setpoint used to debug, (not displayed here).

Definitions high rate:
ASP: Airspeed, right now is the raw data.
TTH: Throttle in 100% the autopilot is applying.
RLL: Roll in degrees + is right - is left
PCH: Pitch in degrees
SST: Switch Status, used for debugging, but is disabled in the current version.

I know the protocol sucks but is very flexible and i can add and remove new strings when ever i want without damaging the parsing of every groundstation. In ArduPilot Mega i will use ONLY binary protocol with Message ID's, Payload Bytes and CheckSums, better/faster/efficient/flexible..


Views: 10240

Tags: ardupilot

Comment by Paul Mather on August 13, 2009 at 7:56am
Jordi, I never see a change in THH, is this because I don't have the sensor connected?

3D Robotics
Comment by Jordi Muñoz on August 13, 2009 at 9:07am
Hello Happy, maybe yes, because is in function of the airspeed.
Comment by Paul Mather on August 13, 2009 at 8:19pm
If I'm sending it GPS commands that say it's doing 40 MPH or 200 MPH, the THH never tells me to slow down or speed up.

3D Robotics
Comment by Jordi Muñoz on August 15, 2009 at 5:29pm
You need the airspeed.
Comment by I Heart Robotics on August 15, 2009 at 6:29pm
If I understand the schematic correctly, then the microcontroller sends telemetry data while the gps is not sending data. Is is correct that there is no secondary hardware serial port that could be used for an alternate telemetry data stream?

3D Robotics
Comment by Chris Anderson on August 15, 2009 at 8:31pm
No, the GPS has exclusive access to the Rx side of the serial port, while telemetry has exclusive access to the Tx side. There is no second serial port. (The Arduino library has a "software serial" function that's supposed to turn any digital pin into a serial port, but it doesn't work)
Comment by gke on March 7, 2010 at 12:49am
Do you have a draft of the binary protocol yet for the Mega. Converting to human readable in the flight code is a little expensive. I usually use message ID, LENGTH, payload, Checksum. The length is useful. I assume you will keep with using the message IDs only once rather than reusing the ID if a message type is abandoned.

ps ConfigTool now working well with UAVX - thanks again. Unfortunately we don't seem to have elevation data via Google here in Oz.
Comment by Resat Emre Ayvaci on December 11, 2010 at 4:11pm




i can't figure out what these values are. I tired to use this webpage to figure out, but failed. Can someone explain please?

http://itouchmap.com/latlong.html is the webpage that i used.

Comment by Paul Mather on December 11, 2010 at 4:22pm

Take each number and divide by 1000000 That will give you actual lat and long. You can plug them into Google Earth.

Comment by Resat Emre Ayvaci on December 11, 2010 at 4:28pm


please can someone explain this in measurement units? i don't know the units, and i can't the assumption. 


You need to be a member of DIY Drones to add comments!

Join DIY Drones

© 2015   Created by Chris Anderson.

Badges  |  Report an Issue  |  Terms of Service