Mavlink hyperterminal parsing

I'm trying to interpret the mavlink protocol implemented in the APM Mission Planner into the hyper terminal to grab the longitude and latitude.  The coordinates i've gotten from the Mission planner is : 32.77735, -117.070595.  I'm communicating between two xbees with one attached to the APM2.5.  This is what I got using at hyperterminal:

FE 1E 9A 01 01 18 4085950E00000000 16 6D8913C4 7238BA16 F20100B7 00FF FF01 0000 0003 09 14 63

FE 1E 26 01 01 18 907B4F0E00000000 23 6D8913D8 7238BAE2 F30100DF 00FF FF02 0000 0003 08 D3 A9

after the message id shown as '18' in hex, (24 in decimal) the message in packed.  seeing the two packets received, i'm having a hard time interpreting the gps_raw_int.  Can anyone help me with the interpretation of these packets?  I'm using u-blox lea-6

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

Join diydrones

Email me when people reply –

Replies

  • Have same Problem, did not understand how it works :-(

    FE 1E CF 01 01 18 40 A4 6F 10 00 00 00 00 B8

    FA 4C 1C 9D         lat // Latitude (WGS84), in degrees * 1E7 [4'199'292'061 / 10000000= 419]

    E9 14 05 8E          lon // Longitude (WGS84), in degrees * 1E7 [3'910'403'470 / 10000000 = 391}

    0B 07 00 6F 03 FF FF 06 00 19 00 03 05 D9 5E

    But Mission Planner shows other Data

    Could you explain me?

    Thanks

  • this is the mavlink parsing i've taken from the APM mission planner source:

    public const byte MAVLINK_MSG_ID_GPS_RAW_INT = 24;
    [StructLayout(LayoutKind.Sequential, Pack = 1, Size = 30)]
    public struct mavlink_gps_raw_int_t
    {
    /// <summary> Timestamp (microseconds since UNIX epoch or microseconds since system boot) </summary>
    public UInt64 time_usec;
    /// <summary> Latitude in 1E7 degrees </summary>
    public Int32 lat;
    /// <summary> Longitude in 1E7 degrees </summary>
    public Int32 lon;
    /// <summary> Altitude in 1E3 meters (millimeters) above MSL </summary>
    public Int32 alt;
    /// <summary> GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535 </summary>
    public UInt16 eph;
    /// <summary> GPS VDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535 </summary>
    public UInt16 epv;
    /// <summary> GPS ground speed (m/s * 100). If unknown, set to: 65535 </summary>
    public UInt16 vel;
    /// <summary> Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535 </summary>
    public UInt16 cog;
    /// <summary> 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix. </summary>
    public byte fix_type;
    /// <summary> Number of satellites visible. If unknown, set to 255 </summary>
    public byte satellites_visible;

    };

    as u can see, i'm only interested in the public Int32 lat & public Int32 lon.

    • Hello! Thank you. But I have a question.

      Your coords in mavlink packet are 6D8913C4 7238BA16

      6D8913C4 = 1837700036, 1837700036 / 10000000 = 183

      7238BA16 = 1916320278, 1916320278 / 10000000 = 191

      The coordinates i've gotten from the Mission planner is : 32.77735, -117.070595

      How to get 32.77735,-117.070595 from 6D8913C4,7238BA16?

      Thank you!

      PS

      My Message is FE 1E970101 18 0000000000000000 EA AF99231F C7211260 C3FFFF1F 06FFFF2700000001 04 5374

      and my coords are 59.726968, 30.418956

      • Oh!!!

        this should be read front to back=))

This reply was deleted.

Activity

DIY Robocars via Twitter
Sunday
DIY Robocars via Twitter
Saturday
DIY Robocars via Twitter
Saturday
DIY Robocars via Twitter
RT @f1tenth: Say hi to our newest #F1TENTH creation for @ieee_ras_icra next week in Philly. It’s going to be huge! 😎 🔥 @AutowareFdn @PennEn…
Saturday
DIY Robocars via Twitter
May 11
DIY Robocars via Twitter
May 8
DIY Robocars via Twitter
RT @SmallpixelCar: Noticed my car zigzagged in last run. It turned out to be the grass stuck in the wheel and made the odometry less accura…
May 8
DIY Robocars via Twitter
RT @SmallpixelCar: Test my car. RTK GPS worked great. Thanks @emlid for their support. https://t.co/EkQ6qmjmWR
May 8
DIY Drones via Twitter
RT @chr1sa: @kane That's @diydrones circa 2009. Still have a box of those Canon cameras that we used to strap into planes, just like this.…
May 3
DIY Robocars via Twitter
RT @chr1sa: Our next @diyrobocars race is going to be outside at a real RC racetrack in Fremont on May 28. Fully autonomous racing, head-to…
Apr 30
DIY Robocars via Twitter
RT @f1tenth: Our Spring 2022 F1TENTH course @PennEngineers is coming to an end with a head-to-head race as a big finale. So proud of our st…
Apr 26
DIY Robocars via Twitter
RT @DanielChiaJH: I wrote a thing! Throughout the development of my @diyrobocars car I've been using @foxglovedev Studio to visualize and d…
Apr 23
DIY Robocars via Twitter
RT @SmallpixelCar: My new car for high speed. Low body, everything ( @NVIDIAEmbedded Jetson Xavier NX, @emlid RTK GPS, IMC) under the deck…
Apr 23
DIY Robocars via Twitter
Apr 21
DIY Robocars via Twitter
RT @f1tenth: F1TENTH Race training setup @PennEngineers for our upcoming ICRA2022 @ieee_ras_icra competition. @OpenRoboticsOrg @IndyAChalle…
Apr 21
DIY Robocars via Twitter
RT @fatcatFABLAB: Proud to be hosting a restarted DIY Robocars NYC Meetup April 26. Come by if you want to talk about and race self-driving…
Apr 17
More…