×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    May 2008
    Posts
    5

    Calculating Distance between Two Locations?

    Hi, Does anyone know how to calculate the distance between two geographic coordinates(longitude and latitude)? Any help at all would be GREATLY appreciated, thanks

  2. #2
    Super Contributor
    Join Date
    Jul 2007
    Location
    Magnitogorsk, Russia
    Posts
    536

    Re: Calculating Distance between Two Locations?

    Class TLocality contains method Distance for calculating distance between two landmarks.

    Or You can calculate distance via Haversinus (half the versed sine) formula:
    http://wiki.forum.nokia.com/index.ph..._two_landmarks

  3. #3
    Registered User
    Join Date
    Jul 2008
    Posts
    1

    Re: Calculating Distance between Two Locations?

    The calculation is a bit simple:

    First, calculate the distance between the two coordinates throght the cosine law:

    cos(S) = sin(l1)*sin(l2)+cos(11)*cos(l2)*cos(dl)

    where:

    l1 and l2 are the latitude of the points
    dl is the difference between the longitude of the points

    S is the arc linking the two points. The secound step is multiply this value by 6378,1km (the aproximated radius of the Earth).

  4. #4
    Super Contributor
    Join Date
    Jul 2007
    Location
    Magnitogorsk, Russia
    Posts
    536

    Re: Calculating Distance between Two Locations?

    Hi genoulcha, Welcome to Dibo !

    Your approach is correct only if distance between the points short.

Similar Threads

  1. GPS: Keeping track of distance
    By pure_x01 in forum Symbian
    Replies: 3
    Last Post: 2008-07-14, 06:24
  2. About bitmaps Locations
    By pistha in forum Symbian
    Replies: 3
    Last Post: 2008-03-11, 10:47
  3. Does S60 3rd Ed Emulator Return Different Locations?
    By napperley in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2007-05-08, 00:48
  4. How can I find distance between two mobiles? Can I use bluetooth?
    By b4605318 in forum Symbian Networking & Messaging (Closed)
    Replies: 3
    Last Post: 2006-06-02, 09:05
  5. bluetooth distance doubt
    By karfei00 in forum Bluetooth Technology
    Replies: 0
    Last Post: 2004-07-27, 09:49

Posting Permissions

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