[glideplan_swproj] Re: [glideplan_swproj] Re: Line drawing

  • From: Tomáš Zámečník <pulcik@xxxxxxxx>
  • To: glideplan_swproj@xxxxxxxxxxxxx
  • Date: Wed, 25 Apr 2012 11:03:18 +0200 (CEST)

I made some measurements. (attached file)
There are three tasks with distances measured by updraft, cpska.cz, mapy.cz 
(manual measurement) and FAI Calculator.
Distances measured by updraft are quite similar to WGS84 (by FAI Calculator). 
There is visible difference
between FAI sphere and WGS84 (see the results).
I think, we need following functions in the utils library, computing EXACT 
values:

qreal distance(location1,location2,model)
qreal course(location1,location2,model)
// model could be either FAI Sphere or WGS84 (enumerator)

Everywhere in application we should use these functions with model selected by 
user in settings (default WGS84).

Kuba, you can inspire from the javascript FAI Calculator (there is code :) 
which I send as an attachment.
This program is published at:
http://www.fai.org/how-to-set-a-record/121-cia/34839-world-distance-calculator

Tom

> ------------ Původní zpráva ------------
> Od: Kuba Marek <blue.cube@xxxxxxxxx>
> Předmět: [glideplan_swproj] Re: Line drawing
> Datum: 24.4.2012 19:36:16
> ----------------------------------------
> Look here:
> https://secure.wikimedia.org/wikipedia/en/wiki/Great_circle_distance#Radius_for_spherical_Earth
> It should be within 1% (?) for the quadratic mean radius that Ales is
> using. There seems to be another way of calculating it, that works on
> ellipsoidal earth
> ( https://secure.wikimedia.org/wikipedia/en/wiki/Vincenty%27s_formulae
> ), but looks a bit too complicated to me.
>
> Harder question now:
> The great circle distance should be available to all parts of updraft.
> Where to put it? Utils::Location?
>
> K
>
> > Hi
> >
> > yes it's an approximation that should be sufficient in most of the
> > cases (imho).
> >
> > A.
> >
> > 2012/4/24 Tomáš Zámečník <pulcik@xxxxxxxx>
> >
> > > This is not distance on ellipsoid WGS84, but on some sphere with r =
> > > EARTH_RADIUS_IN_METERS.
> > > T.
> > >
> > > > ------------ Původní zpráva ------------
> > > > Od: Ales Zita <ala.zita@xxxxxxxxx>
> > > > Předmět: [glideplan_swproj] Re: Line drawing
> > > > Datum: 24.4.2012 09:56:34
> > > > ----------------------------------------
> > > > Hi
> > > >
> > > > I use the following distance calculation in airspaces:
> > > > have a look at
> > > >
> > >
> https://github.com/updraft/updraft/blob/master/Updraft/src/plugins/airspaces/oaengine.cpp
> > > > row 509 :
> > > > double oaEngine::DistanceInMeters()
> > > >
> > > > A.
> > > >
> > > >
> > > > 2012/4/24 Tomáš Zámečník <pulcik@xxxxxxxx>
> > > >
> > > > > I don't know how to compute distance on WGS84, maybe there are
> > > > > some routines in osg/osgEarth.
> > > > > Have you any idea?
> > > > > Maybe it would be sufficient to subdivide the line with
> > > > > osgEarth::Symbology::MeshSubdivider to some level (subdivision
> > > > > step is defined with radians) and somehow take the data from it.
> > > > >
> > > > > T.
> > > > >
> > > > > > ------------ Původní zpráva ------------
> > > > > > Od: Kuba Marek <blue.cube@xxxxxxxxx>
> > > > > > Předmět: [glideplan_swproj] Re: Line drawing
> > > > > > Datum: 24.4.2012 00:36:21
> > > > > > ----------------------------------------
> > > > > > Is there any realistic chance someone is going to use tasks
> > > > > > this
> > > large?
> > > > > > Because if there is, then I need to fix calculations of task
> > > > > > distance (now it uses euclidean distance in XYZ, it would
> > > > > > probably be better
> > > to
> > > > > > use great circle distance)
> > > > > >
> > > > > > K
> > > > > >
> > > > > > > I found an easy way how to draw lines on the earth surface.
> > > > > > > It can be done with osgEarth::Symbology::MeshSubdivider,
> > > > > > > which subdivides (any?) geometry according to ellipsoid
> > > > > > > surface. It's
> > > very
> > > > > > > easy to use - just call one method on your geometry and
> > > > > > > specify wheter you want to interpolate according to great
> > > > > > > circle or not.
> > > ...I
> > > > > > > send screenshot (in attachment) of declaration of 25000km
> > > > > > > FAI triangle :-)
> > > > > > >
> > > > > > > T.
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > > To visit archive or unsubscribe, follow:
> > > > > http://www.freelists.org/list/glideplan_swproj
> > > > >
> > > >
> > > >
> > > >
> > >
> > > To visit archive or unsubscribe, follow:
> > > http://www.freelists.org/list/glideplan_swproj
> > >
>
>
> 
Mereni vzdalenosti (bez cylindru otocnych bodu...tzn.vzdalenost od bodu k bodu)

(I)

Tabor, Jihlava:
49�23'39"N , 014�42'10"E
49�25'19"N , 015�38'05"E

Srovnani mereni:
updraft:  67.703 km
cpska.cz: 67.7 km
mapy.cz:  67.68 km (zmereno rucne - kliknuti do mapy)
FAI calculator, FAI sphere: 67.49731568637867 km
FAI calculator, WGS84:      67.7033264176139 km

-------

(II)

AZ Cup, Club class, Day 2, 18/04/2012
003 SP3 BOHD    49�46'38"N , 015�13'26"E
031 BYSTRICE    49�31'24"N , 016�16'25"E
246 CESKA TR    49�54'03"N , 016�26'51"E
140 NOVE VESELI 49�31'11"N , 015�54'21"E
001 SP1 ZBRASL. 49�48'51"N , 015�12'06"E

Srovnani mereni:
updraft:  242.827 km
cpska.cz: 242.8 km
mapy.cz:  242.7 km (zmereno rucne - kliknuti do mapy)

-------

(III)

long_leg.tsk:
LZKC     48�56'12"N , 21�59'45"E
BAYREUTH 49�59'7.98"N , 11�38'24"E

Srovnani mereni:
updraft: 758.701 km
mapy.cz: 759.4 km (zmereno rucne - kliknuti do mapy)
FAI calculator, FAI sphere: 756.8421675179827 km
FAI calculator, WGS84:      759.1077974225387 km
Title: Javascript Great Circle Calculator

FÉDÉRATION AÉRONAUTIQUE INTERNATIONALE

WORLD DISTANCE CALCULATOR

World models available: WGS84 Ellipsoid, FAI Sphere

(operation instructions available at the end of this page)


Lat 1
Long 1
Input = Lat/Longs to the same Geodetic Datum, preferably WGS84
NS WE
Lat 2
Long 2
NS WE

Distance Units: International Nautical Miles Kilometres Statute Miles Earth model: WGS84FAI sphere

Course 1-2 (deg)
Course 2-1 (deg)
Shortest distance
Output = true courses, then shortest distance on the surface of the selected world model

OPERATION:

1. This is a self-executing file, enabled by highlighting and double-clicking the file name in Windows Explorer. The calculator does not work if called up in HTML format. For the calculator to operate, _javascript_ must be enabled. With MS Windows 98 or later and MS Internet Explorer, _javascript_ is normally enabled by default. For Netscape Navigator, see Options/ Network Preferences/ Languages, for Netscape Communicator see Edit/ Preferences/ Advanced.

2. Read the operating instructions below and the notes at the end. Scroll the display so that all of the boxes are on screen with the Lat/Long boxes at the top and the output boxes towards the bottom of the screen. You are now ready to make calculations.

3. Enter Latitude and Longitude for the points at the beginning and end of the leg to be calculated, selecting N/S and E/W as required. Enter Lat/longs in the form:  DD.dddddd or DD:MM.mmm or DD:MM:SS.ss , where colons separate degrees, minutes and seconds. Different styles may be used for each Lat/Long entry, entry of decimal places is not required for the calculator to operate, but all four lat/long boxes must have something entered (even a single zero).

4. Select desired distance units and earth model, and click on the "COMPUTE" box.

5. If the calculation does not complete: Click the "RESET" button, re-enter the lat/longs, then click "COMPUTE" again.


Notes
1. Conversion factors used (exact figures, by international definition): 
International Nautical Mile = 1852m; Statute Mile = 5280ft; 2.54cm = 1 inch = 1/12 ft.
2. Above about 89 degrees latitude, and between near-antipodal (opposite) points, courses may not be accurate.

Calculation program: by Ed Williams. Calculations use the Vicenty Algorithm (Source: Direct and Inverse Solutions of Geodesics on the Ellipsoid with Application of Nested Equations, Survey Review, XXII, 176 (1975)). See also the Aviation Formulary (http://www.best.com/~williams/avform.htm), also by Ed Williams.

Text: by Ian Strachan

Online version: the world distance calculator can also be consulted and used online at http://www.fai.org/distance_calculation/

FAI: the website of Fédération Aéronautique Internationale, the World Governing Body for Air Sports, can be consulted at www.fai.org

---------- ends ----------

Other related posts: