MapPoint Forums

MapForums

Community of MapPoint and Virtual Earth Users and Developers




Trouble calculating distances

This is a discussion on Trouble calculating distances within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi I am having trouble working out distance between two cities. It doesn't happen on all cities but it goes ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Today's Posts Twitter Feed Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-03-2002
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Trouble calculating distances

Hi

I am having trouble working out distance between two cities. It doesn't happen on all cities but it goes wrong on London and adelaide.

London being 51.3 / 0.1
Adelaide -34.55/-138.35

I get an answer of 3,785,583.93216433

it should be more like 16,000,000

my code is


Dim gs As GeoStruct, iretval As Integer
gs.Latitude1 = 51.3
gs.Longitude1 = 0.1

gs.Latitude2 = -34.55
gs.Longitude2 = -138.35

gs.geoid = 16 '' this specifies the elipsoid measurements 16 is international

iretval = VInverse(gs)
If iretval = WICNOERROR Then
lblAnswer.Caption = CStr(gs.Distance)
Else
lblAnswer.Caption = "There was an error working out the distance, ret val : " & iretval
End If

Am I doing something wrong ??
Cheers

Amjid
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
calculating, distances, trouble


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
Optimization trouble Maverick MapPoint 2006/2009 Discussion 5 03-29-2006 11:43 AM
mappoint coordinate trouble WGS-stuff ? Anonymous MapPoint 2006/2009 Discussion 3 08-28-2003 06:40 AM
Calculating distances from a route Anonymous MapPoint 2006/2009 Discussion 0 07-18-2003 11:23 AM
Calculating Distances For Dummies Anonymous MapPoint 2006/2009 Discussion 0 12-20-2002 05:26 PM
I am having trouble... I am trying to calculate r.... Anonymous MapPoint 2006/2009 Discussion 1 07-10-2002 10:30 AM


All times are GMT -5. The time now is 01:55 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0 RC2
MP2K Magazine
Visitor Map

Luxor Holiday
Book your Luxor holiday through UlookUbook and visit this destination stooped in history.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59