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
RT @gclue_akira: 柏の葉で走行させてるjetracerの中身 #instantNeRF #jetracer https://t.co/giVvuE4hP7
Jul 4
DIY Robocars via Twitter
Cool web-based self-driving simulator. Click save when the AI does the right thing https://github.com/pncsoares/self-driving-car
Jul 4
DIY Robocars via Twitter
RT @donkey_car: Human-scale Donkey Car! Hope this makes it to a @diyrobocars race https://www.youtube.com/watch?v=ZMaf031U8jg
Jun 25
DIY Robocars via Twitter
Jun 25
DIY Robocars via Twitter
Jun 16
DIY Robocars via Twitter
RT @GrantEMoe: I won my first @diyrobocars @donkey_car virtual race! Many thanks to @chr1sa @EllerbachMaxime @tawnkramer and everyone who m…
Jun 13
DIY Robocars via Twitter
RT @gclue_akira: JetRacerで自動走行したコースを、InstantNeRFで再構築。データセットは別々に収集 #jetracer #instantNeRT https://t.co/T8zjg3MFyO
Jun 13
DIY Robocars via Twitter
RT @SmallpixelCar: SPC 3.0 Now the motor also works. This car is doable. I just need to design a deck to mount my compute and sensors. http…
Jun 13
DIY Robocars via Twitter
RT @SmallpixelCar: My new car SPC 3.0. https://t.co/CKtkZOxeNQ
Jun 7
DIY Robocars via Twitter
RT @SmallpixelCar: High speed at @diyrobocars thanks @EdwardM26321707 for sharing the video https://t.co/o4317Y2U1S
Jun 7
DIY Robocars via Twitter
RT @SmallpixelCar: Today at @RAMS_RC_Club for @diyrobocars. Used @emlid RTK GPS and @adafruit @BoschGlobal IMU. Lap time 28s https://t.co/R…
May 28
DIY Robocars via Twitter
May 15
DIY Robocars via Twitter
May 14
DIY Robocars via Twitter
May 13
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…
May 13
DIY Robocars via Twitter
May 11
More…