Discussion Board

Results 1 to 4 of 4

Hybrid View

  1. #1
    Registered User lol_breaker's Avatar
    Join Date
    May 2008
    Posts
    5
    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
    Nokia Developer Champion Den123's Avatar
    Join Date
    Jul 2007
    Location
    Magnitogorsk, Russia
    Posts
    536
    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 genoulcha's Avatar
    Join Date
    Jul 2008
    Posts
    1
    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
    Nokia Developer Champion Den123's Avatar
    Join Date
    Jul 2007
    Location
    Magnitogorsk, Russia
    Posts
    536
    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 Python
    Replies: 3
    Last Post: 2008-07-14, 06:24
  2. About bitmaps Locations
    By pistha in forum Symbian C++
    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
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved