View Single Post
  #1 (permalink)  
Old 04-29-2007, 05:18 PM
PatrikL PatrikL is offline
Knows the basics
 
Join Date: Apr 2007
Location: Slovakia, Martin
Posts: 51
Send a message via ICQ to PatrikL Send a message via Skype™ to PatrikL
Default Distance Calculator

This sub is usable in GPS programs -
Code:
Sub Calc
result.Text = 
sqrt(69.1 * (Lat2.Text - Lat1.Text) * 69.1 * (Lat2.Text - Lat1.Text) + 69.1 * (Lon2.Text - Lon1.Text) * cos(lat1.Text/57.3) * 69.1 * (Lon2.Text - Lon1.Text) * cos(lat1.Text/57.3))
End Sub
(Source: http://www.meridianworlddata.com/Dis...alculation.asp )
- create 5x TextBox - Lat1,2; Lon1,2; result and one Button - Calc
My sample is here:
Attached Files
File Type: zip gpsdistance.zip (109.1 KB, 130 views)

Last edited by PatrikL : 04-29-2007 at 05:22 PM.
Reply With Quote