×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor
    Join Date
    Dec 2012
    Posts
    59

    distance between two gps coordinates

    can anyone tell me the distance between two gps coordinates.
    I doesnt need formula for calculate.
    Realy i need two nearest gps positions distance

  2. #2
    Nokia Developer Expert
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,142

    Re: distance between two gps coordinates

    Generally GeoCoorrdinate Classes have the function for calculating distances to other coordinates, so you might want to select the API you are suing, and check the functionality from the documentation..

  3. #3
    Regular Contributor
    Join Date
    Dec 2012
    Posts
    59

    Re: distance between two gps coordinates

    i dont know how to write what i realy need.
    What is the distance from one position to its nearest or next position.example 10.5.5.2 to 10.5.5.6

  4. #4
    Nokia Developer Expert
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,142

    Re: distance between two gps coordinates

    Which target devices you have in your mind ? and which technology you are thinking of using for implementing the app you need this for ?

  5. #5
    Nokia Developer Moderator
    Join Date
    Aug 2011
    Location
    Berlin
    Posts
    288

    Re: distance between two gps coordinates

    You need to use the relevant platform implementation of the Haversine formula. This is usually a function associated with the Coordinate (lat/Long) implementation within the API

    For example:

    Where there is no coordinate implementation, if you are using the RESTful services for example, you can write one yourself as in these examples :

    Regarding "getting the nearest ..."
    • Here is an example of the formula in use to obtain all items from a database near to a specified location.
    • Here is the Maps API for JavaScript iterating through a series of markers using the nokia.maps.geo.Coordinate.distance() function to find the nearest one.


    Also this thread includes a lengthy discussion on optimizing a server-side SQL query to find the nearest X using a combination of the Haversine Formula and limiting the search area to a box
    Last edited by jasfox; 2013-04-12 at 13:27.

Similar Threads

  1. How do I calculate distance between two gps coordinates?
    By sreerajvr in forum Symbian Web Runtime
    Replies: 3
    Last Post: 2012-01-25, 10:07
  2. Get GPS distance between coordinates.
    By dtorrent in forum Windows Phone General
    Replies: 10
    Last Post: 2012-01-12, 07:38
  3. converting coordinates in pixel -> m3g coordinates
    By Kayron in forum Mobile Java General
    Replies: 0
    Last Post: 2011-02-27, 21:33
  4. Coordinates.distance() question
    By hardc0d3r in forum Mobile Java General
    Replies: 3
    Last Post: 2007-10-18, 01:56
  5. Getting Ir distance
    By prakashforum in forum Mobile Java General
    Replies: 1
    Last Post: 2007-08-01, 12:39

Posting Permissions

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