![]() |
|
|||||||
| Development Help Help for building applications or diagnosing problems with WWJ |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Super Moderator
Join Date: Nov 2006
Location: Mojave & Oxnard California
Posts: 2,617
![]() |
WWJ has a clipped version of the Vincenty Formula in:
worldwind/geom/LatLon.java #627 Code:
public static double ellipsoidalDistance(LatLon p1, LatLon p2, double equatorialRadius, double polarRadius) Code:
//======================= Vincenty
LatLon p1;
LatLon p2;
double eqR = 6378137.0; // equatorialRadius for Earth WGS84
double poR = 6356752.3142; // polarRadius
// p1 = LatLon.fromDegrees(loc[0], loc[1]);
// p2 = LatLon.fromDegrees(34.2124, -119.1935);
p1 = LatLon.fromDegrees(33.94, -118.40); // LAX
p2 = LatLon.fromDegrees(41.98, -87.90); // O'Hare, Chicago
double geoDist = LatLon.ellipsoidalDistance(p1, p2, eqR, poR);
System.out.println(String.format("%.6fm geodesic distance", geoDist));
OK to 4 decimal places in WWJ (.1mm LAX to O'Hare in Chicago) Just to compare it with the full Vincenty Formula: Vincenty Inverse Input Lat1 33.940000 Lon1 -118.400000 Lat2 41.980000 Lon2 -87.900000 Output s = 2807507.159896060000 aIn = 62.464405076619 aFn = 81.551461342173 Vincenty Direct Input Lat1 33.940000 Lon1 -118.400000 s = 2807507.159896060000 aIn = 62.464405076619 Output Lat2 41.979999999984 Lon2 -87.900000000145 aFn = 81.551461342076 OK to 9 decimal paces Last edited by nlneilson; 07-10-2008 at 12:48 PM. |
|
|
|
![]() |
| 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 |
| WWJ and Platform-dependence | smcnaughton | Development Help | 31 | 11-11-2009 01:09 PM |
| WWJ vs WorldWind.net | coloradokid | WorldWind General | 10 | 10-09-2008 06:24 AM |
| SurfaceShapes are not translucent in WWJ 0.5 | vash | Development Help | 0 | 05-07-2008 02:05 PM |
| WWJ SDK Alpha 3 - 0.3.0 available | patmurris | WWJ Release Announcements | 35 | 12-03-2007 08:56 PM |
| Tilt View: Add Distance movement in the Interface | canosso | Suggestion Box | 0 | 08-23-2005 04:04 PM |