extracting data from GPS pls help

Discussion in 'Embedded Systems and Microcontrollers' started by pawankumar, Jan 19, 2012.

  1. pawankumar

    Thread Starter Member

    Oct 28, 2009
    42
    3
    Hi friends,

    I tried interfacing GPS module with PC to extract the co ordinates (lat,long)

    As soon as I connected the device to serial port @9600 baud, it started spitting data.

    as per NMEA(pretty straight forward), I extracted latitude and longitude from the $GPGGA string. but every time I land up to a place about 30Km away from home :( .

    Then I used the software GPSCockpit, which provided the exact co-ordinates of my house. This is mystery to me.

    for instance,

    a GGA string i received is like:

    $GPGGA,075529.844,1307.2917,N,08012.5775,E,1,4,1.34,30.2,M,-88.5,M,,*40

    this gives the (lat, long) data 13.072917N,080.125775E

    but the original co ordinates are (13.121540,80.209590)

    How do I get this? I ve done a lot of google search to ensure no one else has faced a similar problem. Please suggest me proceed further.
     
  2. pawankumar

    Thread Starter Member

    Oct 28, 2009
    42
    3
    someone please help me....
     
  3. davebee

    Well-Known Member

    Oct 22, 2008
    539
    46
    The numbers that look bad are timestamped 7:55:29, but the good numbers are timestamped 7:55:50.

    If you compare readings of about the same timestamp, do they still show about the same 30 km offset?
     
  4. pawankumar

    Thread Starter Member

    Oct 28, 2009
    42
    3
    @davebee :

    Thanks 4 your response. I am experimenting this with my desktop. so, no chance to move .

    I feed the raw data into this site, it gives me the exact location

    http://youngindia99.com/gps.aspx

    There are many such apps.but I just need the method how these guys do it
     
  5. pawankumar

    Thread Starter Member

    Oct 28, 2009
    42
    3
    Got it!!!!

    this one seems to work

    to convert NMEA co ordinates into google understandable co ordinates,

    NMEA===================>Google understandable
    1307.2917===>13+07.2917/60 =13.12152

    this is a blind guess work

    anyone knows the logic please let me know
     
  6. davebee

    Well-Known Member

    Oct 22, 2008
    539
    46
    Google must give the location in fractions of a degree instead of in degrees, minutes and seconds.

    0.12152 degrees * 60 minutes/degree = 7.2912 minutes
     
  7. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    Read your datasheet and find the exact data format used, 13.121540° is 13°7'17.544" which is exactly the error youre seeing.
     
  8. pawankumar

    Thread Starter Member

    Oct 28, 2009
    42
    3
    Yeah.... I get it now... thanks guys :)
     
Loading...