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

Santiago Perez liked Santiago Perez's profile
yesterday
More…