![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Share Your Creations Show your developed application to Basic4ppc community. Please include source code if possible. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
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 - create 5x TextBox - Lat1,2; Lon1,2; result and one Button - Calc My sample is here: Last edited by PatrikL : 04-29-2007 at 04:22 PM. |
|
|||
|
I need
Code:
distanceEast=(Lon2.Text - Lon1.Text) distanceNorth=(Lat2.Text - Lat1.Text) direction= Atan(distanceNorth/distanceEast) Mod (2 * cPI) direction = (direction)*(180/cPI) If direction < 0 Then direction+= 360 End If |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Calculating distance | abastien | Code Samples & Tips | 8 | 01-10-2009 08:49 AM |
| GPS Distance Problem | Georg | Questions & Help Needed | 6 | 04-25-2008 04:10 AM |
| Distance-test on UTM and LAT-LON | Put Claude | Questions & Help Needed | 1 | 10-16-2007 01:06 PM |
| Distance between UTM zones | jerryjukem | Questions & Help Needed | 3 | 10-10-2007 10:19 AM |
| Measuring distance on move | Agrartec | Code Samples & Tips | 15 | 08-28-2007 01:43 AM |