Developer

ArduPilot Telemetry Protocol

If you ever wonder how to read and decode the protocol check this:The protocol looks like this in terminal:!!!LAT:33952600,LON:-117409072,SPD:0.38,CRT:0.00,ALT:0,ALH:0,CRS:185.80,BER:94,WPN:0,DST:25853,BTV:11.84,***+++ASP:0,THH:85,RLL:26,PCH:-31,STT:2,***+++ASP:6,THH:85,RLL:27,PCH:-30,STT:2,***+++ASP:11,THH:85,RLL:27,PCH:-29,STT:2,***+++ASP:14,THH:77,RLL:28,PCH:-29,STT:2,***+++ASP:15,THH:72,RLL:28,PCH:-28,STT:2,***!!!LAT:33952596,LON:-117409072,SPD:0.24,CRT:0.00,ALT:0,ALH:0,CRS:185.57,BER:94,WPN:0,DST:25853,BTV:11.88,***+++ASP:16,THH:68,RLL:29,PCH:-23,STT:2,***+++ASP:18,THH:60,RLL:30,PCH:-20,STT:2,***+++ASP:17,THH:61,RLL:31,PCH:-21,STT:2,***+++ASP:14,THH:69,RLL:30,PCH:-27,STT:2,***+++ASP:13,THH:71,RLL:29,PCH:-31,STT:2,***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: LatitudeLON: LongitudeSPD: Speed over ground from GPSCRT: Climb Rate in M/SALT: Altitude in metersALH: The altitude is trying to holdCRS: Course over ground in degrees.BER: Bearing is the heading you want to goWPN: Waypoint number, where WP0 is home.DST: Distance from WaypointBTV: 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 leftPCH: Pitch in degreesSST: 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..Enjoy!
E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • Hi all .....

    May I ask experts ... In EZ-ground-station we connect the ground station with audio port in VRX (video receiver) to get the GPS data for tracking antenna pointing ...

    What is the same line in ARDU-STATION ??
  • Says this thing has 2 powered servo outputs for steering a directional antenna.  How big of servos are we talking about here?  As in, how much current can a servo draw from it?
  • LAT:33952600,LON:-117409072,SPD:0.38,CRT:0.00,ALT:0,ALH:0,CRS:185.80,BER:94,WPN:0,DST:25853,BTV:11.84

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

  • LAT:33952600

    LON:-117409072

     

    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.

  • Jordi,
    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.

    Greg
    ps ConfigTool now working well with UAVX - thanks again. Unfortunately we don't seem to have elevation data via Google here in Oz.
  • 3D Robotics
    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)
  • Developer
    You need the airspeed.
  • Developer
    Hello Happy, maybe yes, because is in function of the airspeed.
This reply was deleted.