GPS serialdevice : 3 sentence in one string

Discussion in 'Questions (Windows Mobile)' started by alea46, Jun 19, 2008.

  1. alea46

    alea46 Member Licensed User

    HI,
    after making a test program that is decode manualy NMEA sentence, I saw that I received a single string with 3 NMEA sentences :
    (program use listbox and strsplit to write NMEA sentence)

    $GPZDA Date & Time
    $GPGGA Global Positioning System Fix Data
    $GPRMC Recommended minimum specific GPS/Transit data

    These 3 sentences are separated by 2 specials Characters, but I don't know witch one (represented by square)

    Is someone already had this problem?

    How can I decoded this 2 specials characters?

    How can I change this (serial parameters?)?

    How can I securize data reading to avoid crash with not numeric data in latitude and longitude (single/double....)
    :sign0085:
     
  2. agraham

    agraham Expert Licensed User

    You could try getting their numeric value with "val = Asc(StrAt(...))" and then use "Chr(val)" in StrIndexOf(...) to find them.
     
  3. Erel

    Erel Administrator Staff Member Licensed User

    Why don't you let the GPS library to parse the sentences?

    The ending character is probably chr(10) which is linefeed.
     
  4. alea46

    alea46 Member Licensed User

    Problem solve

    Hi,
    thanks for your Help.

    I unsderstand the mistake I do using GPS.dll.
    My GPS object is call "GPS1" and I do a sub call GPS_GPSdecoded in place of GPS1_GPSdecoded.

    So it's work fine now.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice