×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Apr 2009
    Posts
    41

    Long and Lat conversions

    Hi all,

    I have written an app which uses O/S maps and want to integrate GPS. I have the long and lat co's using the Location api but I need some way of converting the long and lat to eastings and northings so I can use them on my maps. The math behind these conversions is beyond my skill set. I cannot see anything in the Location api which helps and have seen some very bad (ie...dont work) examples online but nothing of much use. Does anyone know of any reliable existing libraries that I could use or even better has anyone written a function which does this conversions that they would be willing to share?

    Any ideas or pointers would be really appreciated.

    Many thanks

    Jules

  2. #2
    Super Contributor
    Join Date
    Apr 2009
    Posts
    572

    Re: Long and Lat conversions

    you mean to say converting to Lat nd long's to degree , min format from eastings nd northings I think U better try for nmea sentence which provide much more info than that you obtain from Location API
    Regards,
    Saurabh

  3. #3
    Registered User
    Join Date
    Apr 2009
    Posts
    41

    Re: Long and Lat conversions

    Thanks for the rply..... but can this be used with java ME and if so how?

  4. #4
    Super Contributor
    Join Date
    Apr 2009
    Posts
    572

    Re: Long and Lat conversions

    Quote Originally Posted by jules_ View Post
    Thanks for the rply..... but can this be used with java ME and if so how?
    yes this can be implemented in J2me just put this line

    PHP Code:
    nmeaStr location.getExtraInfo("application/X-jsr179-location-nmea"); 
    location is object of Location and nmeaStr is String that contains whole info about GPS for nokia phopnes fololowing nmea string is obtained from device and then yopu can parse it to your needs
    $GPGGA,100321.000,2647.72755,N,08054.92512,E,1,05,1.7,7.61,M,-43.7,M,,*42" +
    "$GPGSA,A,2,15,07,28,08,17,,,,,,,,1.9,1.7,0.9*33" +
    "$GPGST,100321.000,88.6,58.0,51.9,72.6,48.0,52.6,77.1*5F" +
    "$GPGSV,3,1,10,15,16,29,26,04,18,192,,20,03,106,,27,04,323,*74" +
    "$GPGSV,3,2,10,07,28,147,17,28,,,,08,68,147,18.11,31,053,*77" +
    "$GPGSV,3,3,10,17,66,287,25,25,69,149,*76" +
    "$GPRMC,100321.000,A,2647.72755,N,08054.92512,E,4.1,60.7,210809,0.2,W,A*23" +
    "$GPVTG,60.7,T,61.0,M,4.1,N,107.5,K,A*22";
    for more info on Nmea formats Follow this
    Regards,
    Saurabh

  5. #5
    Registered User
    Join Date
    Apr 2009
    Posts
    41

    Re: Long and Lat conversions

    Thanks again for the reply. I had a look at the link you posted but it seems that I can only extract the Lat and Lon from this. Am i mistaken?

    Many thanks

    Jules

  6. #6
    Super Contributor
    Join Date
    Apr 2007
    Posts
    2,708

    Re: Long and Lat conversions

    yup, you are definitely mistaken...
    In the link the specification is given of every single formatted String which can be found within an NMEA sentence..
    For example in a GPGGA String you can get :
    time of fix, latitude and longitude, altitude, number of satellites, quality of fix and more

    Just take your time, read the given link carefully and even though it's quite a read you will get a lot of info out of it... it's always a good thing to actually know what you are working with...

  7. #7
    Super Contributor
    Join Date
    Apr 2009
    Posts
    572

    Re: Long and Lat conversions

    yes as Mr. Tiger said read it carefully it describes about various formats and in what format they contain various info
    Through this you will be able to extract any info dat is supplied by a GPS device
    Regards,
    Saurabh

Similar Threads

  1. Replies: 1
    Last Post: 2009-04-21, 18:38
  2. photo with lat e long
    By ingsoft in forum Mobile Java Tools & SDKs
    Replies: 2
    Last Post: 2008-03-20, 09:19

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×