tests of new solutions to the direct and indirect geodetic …1065075/... · · 2017-01-13figure...
TRANSCRIPT
Tests of New Solutions to the Direct and Indirect Geodetic Problems
on the Ellipsoid
Jure Kop
Master’s of Science Thesis in Geodesy No. 3107 TRITA-GIT EX 08-010
School of Architecture and the Built Environment
Royal Institute of Technology (KTH) 100 44 Stockholm, Sweden
September 2008
ii
TRITA-GIT EX 08-010
ISSN 1653-5227
ISRN KTH/GIT/EX--08/010-SE
iii
Abstract
The main objective of this thesis is to test new methods on solving the direct and indirect
geodetic problems on the ellipsoid as proposed in the article by Prof. Sjöberg, published in the
Journal of Geodesy in 2006. Methods used for direct and indirect geodetic problems take
advantage of numerical integration. First, strict solution for the sphere is considered then a
small correction to the ellipsoid determined by numerical integration is added to obtain the final
solution. The author also deals with the equations on how to compute the area limited by the
equator, two meridians and the geodesic between two points using numerical integration as
well.
Furthermore the geodetic intersection on the ellipsoid is also considered as described by the
same author in a different article. The solution for the latitude is obtained for the sphere plus a
small correction using numerical integration. As this is iterative procedure, once obtained, the
longitude is calculated without iteration.
With the increase of processor power in computers during the last decade or two the logical
conclusion is to use computers in proving mathematical equations. The numerical integration
has not yet been used in geodesy in this manner, therefore it is used here.
Findings of our tests conclude that numerical integration used for purposes above is good when
used in certain frames and that it has to be used with caution. In fact when numerical
integration is used in those frames it is quite safe to use the formulas as they prove very
accurate.
Keywords
iv
Acknowledgements
1
TABLE OF CONTENTS
LIST OF FIGURES ................................................................................................................................3
LIST OF APPENDICES ........................................................................................................................5
1 INTRODUCTION................................................................................................................................6
2 NUMERICAL INTEGRATION........................................................................................................8
3 DIRECT AND INDIRECT GEODETIC PROBLEMS ...............................................................11
3.1 DIRECT GEODETIC PROBLEM.............................................................................................................11 3.2 INDIRECT GEODETIC PROBLEM .........................................................................................................11 3.3 OLD FORMULAS FOR DIRECT AND INDIRECT GEODETIC PROBLEMS...............................................12 3.4 NEW SOLUTION TO THE DIRECT GEODETIC PROBLEM ON THE ELLIPSOID......................................13 3.5 NEW SOLUTION TO THE INDIRECT GEODETIC PROBLEM ON THE ELLIPSOID ..................................16
4 AREA ...................................................................................................................................................20
4.1 AREA PROBLEM..................................................................................................................................20 4.2 NEW FORMULAS.................................................................................................................................20
5 INTERSECTION ...............................................................................................................................24
5.1 INTERSECTION PROBLEM...................................................................................................................24 5.2 NEW FORMULAS.................................................................................................................................24
6 TESTING NEW FORMULAS.........................................................................................................27
6.1 DIRECT AND INDIRECT METHODS.....................................................................................................27 6.2 AREA ..................................................................................................................................................30 6.3 INTERSECTION....................................................................................................................................31
2
7 RESULTS ............................................................................................................................................32
7.1 DIRECT AND INDIRECT METHODS.....................................................................................................32 7.2 AREA ..................................................................................................................................................45 7.3 INTERSECTION....................................................................................................................................48
8 CONCLUSION...................................................................................................................................50
9 REFERENCES ...................................................................................................................................51
APPENDICES........................................................................................................................................52
3
List of figures
Figure 1: The direct geodetic problem on the ellipsoid.......................................................................................11
Figure 2: The indirect geodetic problem on the ellipsoid ...................................................................................12
Figure 3: Area limited by two meridians, the equator and the geodesic on the ellipsoid ................................20
Figure 4: Intersection of the two geodesics on the ellipsoid ...............................................................................24
Figure 5: Computing the area T limited by the two meridians, the equator and a geodesic using
several small areas Ti ............................................................................................................................31
Figure 6: The result of the Test 1, where direct and indirect geodetic problems have been compared
using new solutions ...............................................................................................................................32
Figure 7: Zoomed-in result of the Test 1, where direct and indirect geodetic problems have been
compared using new solutions .............................................................................................................33
Figure 8: Areas of safe use when using the new solutions to compute the direct problem.............................35
Figure 9: The result of Test 1, where direct and indirect geodetic problems have been compared
using new solutions (azimuths ranging from 100° to 180° in 10° intervals)..................................36
Figure 10: The result of Test 1, where direct and indirect geodetic problems have been compared using
new solutions with azimuth at 100°, negative (left) and positive (right) Clairaut’s constants,
respectfully..............................................................................................................................................37
Figure 11: The result of Test 1, where direct geodetic problem has been computed using new solutions
with negative latitude as a starting point.............................................................................................38
Figure 12: The result of Test 2, where indirect and direct geodetic problems have been compared;
starting point on the equator ................................................................................................................39
Figure 13: The result of Test 2, where indirect and direct geodetic problems have been compared;
starting point north of the equator.......................................................................................................40
Figure 14: The result of Test 2, where indirect and direct geodetic problems have been compared;
starting point south of the equator.......................................................................................................40
Figure 15: The result of Test 3, where Vincenty’s formulas have been compared for both geodetic
problems..................................................................................................................................................41
Figure 16: The results of Test 4 where direct method of the new solutions have been compared to
Vincenty’s direct method.......................................................................................................................42
Figure 17: The result of Test 4 for direct problem; new solution compared to Vincenty’s; maximum
distance 15000 km..................................................................................................................................43
Figure 18: The result of Test 4 for direct problem; new solution compared to Vincenty’s; maximum
distance 20000 km..................................................................................................................................43
4
Figure 19: The result of Test 5 where two indirect methods have been compared ..........................................44
Figure 20: The position of the mid-points on the geodesic.................................................................................46
Figure 21: The position of mid-points when the latitude of geodesic is first increasing and then
decreasing ...............................................................................................................................................47
Figure 22: Distribution of computed points of the two geodesics ......................................................................48
5
List of Appendices
Appendix A: Direct geodetic problem function, source code for Matlab___________________________ 52
Appendix B: Indirect geodetic problem function, source code for Matlab__________________________ 54
Appendix C: Area computation function, source code ________________________________________ 56
Appendix D: Intersection computation, source code for Matlab_________________________________ 57
Appendix E: Convergence of the ds*_____________________________________________________ 60
Appendix F: Direct vs. indirect geodetic problem; source code for Matlab ________________________ 61
Appendix G: Indirect vs. direct geodetic problem, source code for Matlab_________________________ 63
Appendix H: Direct vs. Vincenty’s direct geodetic problem, source code for Matlab _________________ 64
Appendix I: Indirect vs. Vincenty’s indirect geodetic problem, source code for Matlab _______________ 65
6
1 Introduction
For many years geodesists have been trying to come up with new solutions for the direct and
indirect geodetic problems or improve the existing ones. It is an advantage to have a solution
that would cover the whole earth or its mathematical approximation, the ellipsoid. The benefit
is mainly for the navigation where the accuracy is of great importance.
From the early 19th century newer and newer solutions have been introduced by Gauss and then
later improved by Bessel and Helmert. With the computer era at its start methods using the
computer power emerged in the 60s and the 70s by Vincenty. By the end of the last century and
the beginning of the new millennium ordinary personal computers have become powerful
enough to perform tasks that were impossible even for supercomputers some decades ago.
It was merely a question of time when numerical integration would be used for solving the two
basic geodetic problems. L.E. Sjöberg proposed a strict solution for the sphere with a correction
to the ellipsoid determined by the numerical integration (Sjöberg 2006b).
The basic task of this paper was to test the new solutions to the direct and indirect geodetic
problems on the ellipsoid using numerical integration. Furthermore the computation of the area
under the geodesics was also presented using the numerical integration as described in the same
article (Sjöberg 2006b) as well as to test the intersection of two geodesics on the ellipsoid as
described by (Sjöberg 2007a). One important element of this work was how to compute the
Clairaut’s constant. Here we used the solutions as described in the article by (Sjöberg 2007b)
After the introductory chapter some basic facts about numerical integration are described in
Chapter 2. Several different functions are presented and some facts about the numerical
integration in Matlab are on display.
Chapter 3 deals with the two geodetic problems. Three old methods are described, one for short
distances, one for long distances and a method for all distances, respectively. Formulas for the
new solutions are presented as well.
7
Chapter 4 holds an eye on the area computation using numerical integration. After a brief
problem description new methods are described.
Finally, Chapter 5 describes the problem of intersections of geodesics on the ellipsoid.
Testing begins in Chapter 6 where all problems have been described and put out to the light.
Subchapters hold both geodetic problems, the area computation and the intersection problem,
respectively.
Results and comments are being displayed in Chapter 7, followed by some concluding remarks
in the final chapter.
Appendices are attached to the end of this paper.
8
2 Numerical integration
Numerical integration is a procedure how to compute the numeric value of a definite integral.
In one-dimensional integrals the numerical integration is sometimes described as quadrature
and in two or more dimensional integrals it is called cubature.
The basic problem is to compute the approximate value to a definite integral;
( )∫b
a
dxxf (2.1)
Lobatto Quadrature
A Lobatto Quadrature is a Gaussian quadrature (Weisstein) with weighting function W(x) = 1
in which the endpoints of the interval [-1, 1] are included in a total of n abscissas, giving
2r n= − free abscissas. Abscissas are symmetrical about the origin, and the general formula is
( ) ( ) ( ) ( )1 1
121
1 1n
n i ii
f x dx w f w f w f x−
=−
= − + + ∑∫ (2.2)
The free abscissas xi for 2,..., 1i n= − are the roots of the polynomial ( )'1nP x− , where ( )P x is a
Legendre polynomial. The weights of the free abscissas are
( ) ( ) ( )
( ) ( )
2 '' '1
2
1
2
1
2
1
i
i n i m i
n i
nw
x P x P x
n n P x
−
−
= −− ⋅
=−
(2.3)
and of the endpoints are
( ),
2.
1i nw
n n=
−
(2.4)
9
The error term is given by
( ) ( )
( ) ( )( ) ( )
43 2 1
2 2
3
1 2 2 !
2 1 2 2 !
n
nn n nE f
n nξ
−
−− − = −− −
(2.5)
for ( )1,1ξ ∈ − .
Gauss-Kronrod Quadrature
An adaptive Gaussian quadrature method for numerical integration in which error is estimation
based on evaluation at special points known as "Kronrod points." By suitably picking these
points, abscissas from previous iterations can be reused as part of the new set of points,
whereas usual Gaussian quadrature would require recomputation of all abscissas at each
iteration. This is particularly important when some specified degree of accuracy is needed but
the number of points needed to achieve this accuracy is not known ahead of time.
Using numerical integration in Matlab
According to the Matlab manual it is advised to use quad function for low accuracies with
nonsmooth integrands and quadl function for higher accuracies with smooth integrands.
Functions quad and quadl are adaptive Simpson and adaptive Lobatto quadratures,
respectively.
For high accuracies with oscillating integrands quadgk function is suppose to do the task best
since it supports infinite intervals and can handle moderate singularities at the endpoints. It also
supports contour integration along piecewise linear paths. Function quadgk is adaptive Gauss-
Kronrod quadrature.
The quadv function may also be used. This function vectorizes quad for an array-valued
function.
10
When the interval in infinite, e.g. [a, Inf), then for the integral of function(x) to exist,
function(x) must decay as x approaches infinity, and quadgk requires it to decay rapidly.
Special methods should be used for oscillatory functions on infinite intervals, but quadgk can
be used if function(x) decays fast enough.
The quadgk function will integrate functions that are singular at finite endpoints if the
singularities are not too strong.
All methods in this paper were pre-tested with quadl and quadgk methods and no significant
differences had been found. Therefore only results tested with quadl method are displayed.
11
3 Direct and Indirect geodetic problems
3.1 Direct geodetic problem
In the direct geodetic problem the coordinates of point P1 on the rotation ellipsoid are given
(Figure 1). Also given are the azimuth α1 and the length s of the geodesic to point P2. The goal
of the problem is to determine the coordinates of point P2 and the azimuth α2.
Figure 1: The direct geodetic problem on the ellipsoid
3.2 Indirect geodetic problem
With the indirect problem (Figure 2), also called the reverse problem, the situation is as
follows: two points are given with their coordinates and the goal of the problem is to determine
the arc length along the geodesic between the two points and the azimuths at the two points.
12
Figure 2: The indirect geodetic problem on the ellipsoid
3.3 Old formulas for direct and indirect geodetic problems
Three methods described here are the Gauss method for short distances, Bessel-Helmert
method for long distances and Vincenty's method which can be used for all distances.
Gauss’ method for Medium Distances
Gauss’ method, also called the method of the mean argument can be used for short distances up
to 600 km. Developed by K.F. Gauss in the mid 19th century, expands the Taylor series around
the mean arguments φm, λm and αm, respectively. The direct problem is solved iteratively while
the solution for the indirect problem is explicit. Detailed formulas can be found in several
sources (e.g. Fan 2005).
Bessel – Helmert’s method for long distances
This method was first introduced by Bessel in 1828 and later improved by Hessel. The basic
idea is to project geodesics on the ellipsoid to a sphere such that the reduced latitudes of points
on the ellipsoid are equal to the geocentric latitudes of their spherical projections (Fan 2005).
13
Vincenty’s method for all distances
Vincenty presented this method in 1975 (Vincenty 1975). His main objective was to use
computers to do the task and therefore reduce the execution time of the computation. The main
feature was the use of nested equations for elliptic terms. The solution for direct geodetic
problem as well as the solution for the indirect geodetic problem is iterative.
This method can be used for all distances, from a few centimeters to nearly 20000 km.
3.4 New solution to the direct geodetic problem on the ellipsoid
Here the new formulas for the new solution to the direct geodetic problem are presented, as
found in Sjöberg (2006b). The input values are the geodetic latitude and longitude (α1, λ1), the
length of the geodesic arc s and the azimuth α1 of the point P1. The size and shape of the
ellipsoid must also be given, e.g. first eccentricity e and the length of the semi-major axis a. As
output values we obtain the coordinates of the point P2 and the azimuth α2. For convenience we
transform geodetic latitude to reduced latitude using equation:
21 1tan 1 taneβ φ= − ⋅ . (3.1)
First step is to compute Clairaut’s constant for the geodesic:
1 1cos sinc β α= ⋅ . (3.2)
There are several equations on how to solve the direct geodetic problem depending on the
position of the two points. To compute the geodetic latitude we differ two cases; it can either
occur that the latitudes of both points are the same or not. To check whether they are the same
we compute the distance between the two points using the equation:
112
2 arcsin1
xs a ds
cπ
= ⋅ − ⋅ +
− , (3.3)
where
14
( )
( )
2
1
212
12 2 2 2 2
12
1 1 1
c
x
x dxds ae
c x e e x
− −= −
− − + − +∫ , (3.4)
1 sin ix β= , (3.5)
and compare it with the distance given as an input to the direct problem. If they end up the
same, the geodetic latitudes of both points are equal. We should, however, experience problems
in computer programming since it is very hard to get two numbers exactly the same when
dealing with precision over 16 decimals. Therefore we should make a compromise and say that
compared distances are equal if they appear equal within some precision.
When compared distances are not equal we use the following equations to compute the reduced
(and later geodetic) latitude of point P2:
( )2 12 2
sin 1 arcsin1
s ds xc
a cβ
−= − +
− . (3.6)
where
( )
( )2
1
2
2
2 2 2 2 2
12
1 1 1
x
x
x dxds ae
c x e e x
−= −
− − + − +∫ (3.7)
and ds is determined by numerical integration and equation (2.5) is iterated. As starting value
ds is set to 0.
When computing the geodetic longitude of a point P2 three cases occur, depending on the
latitudes of the two points. It can either occur that both latitudes are the same and equal to zero,
the same and different from zero, or completely different.
15
When 1 2 1 2β β ϕ ϕ≠ → ≠ , the longitude is given by the formula below (note that the complete
derivation can be found in e.g. Heck 1987):
2
1
2
1
2 2
2 1 2 2
1 2 2
2
1
0 1
1 cos
cos cos
cos cos
arcsin
i
i
i
e dc
c
dc d
c
td
t
β
β
β
β
β βλ λ
β β
βλ λ
β β
λ λ
=
=
−= +
−
= + +−
= + +
∫
∫ (3.8)
where
( )2
1
2
2 2 2 2 21 1 1
x
x
dxd e c
c x e e xλ = −
− − + − +∫ (3.9)
and
tan ,i it β=2
0
1 ct
c
−= . (3.10)
dλ can be determined by numerical integration between the limits x1 and x2.
When 1 2 1 20 0β β φ φ= ≠ → = ≠ , the longitude of the new point is given by:
( )
2
1
1
2 1 2 2 2
11
0
2 '1 1
2 arcsin ',2
c
x
dxc d
x c x
td
t
λ λ λ
πλ λ
−
= + +− − −
= + − +
∫ (3.11)
where
16
( )
2
1
12
2 2 2 2 2' 2
1 1 1
c
x
dxd e c
c x e e xλ
−
= −− − + − +
∫ (3.12)
In the special case, when 1 2 1 10 0β β φ φ= = → = = (points located on the equator), equations
are given by:
( )( )
2
1
1 22
2 2 2 2 2' 1 2
1 1 1
c
x
cs x dxd c e c
a c x e e xλ π
−
= + − −− − + − +
∫ , (3.13)
or approximately
( )
( )( )
2
1
1 22
2 2
2
2
' 11
11 .
4
c
x
cs x dxd c e c
a c x
c ccsc e
a
λ π
ππ
−
≈ + − −− −
−= + − −
∫ (3.14)
This completes the solution of the direct geodetic problem on the ellipsoid.
3.5 New solution to the indirect geodetic problem on the ellipsoid
We convert the geodetic latitudes φ1 and φ2 to reduced latitudes β1 and β2 using equations
2tan 1 tan .i ieβ ϕ= − ⋅ (3.15)
Then we compute the Clairaut's equation for the geodesic running through the two given points.
Three cases occur:
17
Case 1
When 1 2β β≠ , we compute
( )( )
2 21 2 1 22
0 2
2 cos
sin
t t t t DLt
DL
+ −= (3.16)
with
( )
2
1
12
2 2 2 2 2,
1 1 1
c
c
x
dxd e c
c x e e xλ
−
= −− − + − +
∫ (3.17)
2 1 ,cDL dλ λ λ= − − (3.18)
sin tan .i i i ix and tβ β= = (3.19)
Then Clairaut's constant is given with:
20
1.
1c
t=
+ (3.20)
Case 2
When 1 2 0β β= ≠ , the Clairaut's constant c is given by the equation:
( )
( )2 21
cos,
cos
Dc
t D
λ
λ=
+ (3.21)
where
( )
2
1
122 1
2 2 2 2 2.
2 1 1 1
c
x
dxd e c
c x e e x
λ λλ
−−
= +− − + − +
∫ (3.22)
18
Case 3
If 1 2 0β β= = , when both points are located on the equator, the Clairaut's constant is given by
the equation:
2 2
21
2c
e I e
π λ λ
π
− ∆ ∆ = ≈ −
, (3.23)
where
( )
21
2 2 2 2 2sin 1 1 1i
cdx
Ic x e e xβ
−
=− − + − +
∫ . (3.24)
When ∆λ of the two points is not equal or close to π (when points are not on the opposite side
of the ellipsoid) then c equals 1. But if points are on the opposite side of the equator (and ∆λ
approaches π), Clairaut’s constant c decreases from 1 to 0.
We can imagine this fact by saying that it is closer from one side of the equator to the other side
by going over the pole rather than following the equator.
Once the Clairaut’s constant has been determined, the distance s between the two points can be
computed by:
2
1
2arcsin ,
1
x x
x x
xs a ds
c
=
=
= +
− (3.25)
where
( )
( )2 2
1 1
2sin
2
2 2 2 2 2sin
1
1 1 1
x
x
x dxds ae
c x e e x
β
β
=
=
−= −
− − + − +∫ . (3.26)
19
If β1 = β2, we compute the distance using
( )1 ,a
s I dc
λ λ= ∆ − − (3.27)
with
( )
( )
2
1 1
1 2
2 2 2sin
1 1
20
21 1
1 2 arcsin arcsin1
c
x
x dxI c
x c x
x tc c
tc
β
π
−
=
=− − −
= − + −
−
∫ (3.28)
and
( )
2
1 1
1 22
12 2 2 2 2
sin
21 1 1
c
x
x dxd ce
c x e e xβ
λ−
=
= −− − + − +
∫ . (3.29)
Once Clairaut’s constant and distance have been obtained, azimuths can be computed using:
sin , 1,2.cos
i
i
ciα
β= = (3.30)
20
4 Area
4.1 Area problem
Below the formulas are presented on how to compute the area limited by the equator, the
geodesic between two points and two meridians with longitudes λ1 and λ2 (Figure 3) using
numerical integration.
Figure 3: Area limited by two meridians, the equator and the geodesic on the ellipsoid
4.2 New formulas
Area (T) on the ellipsoid limited by two meridians with longitudes λ1 and λ2, where λ1 > λ2, the
equator and the geodesic with the Clairaut’s constant c can be written as (Sjöberg 2006a):
( ) ( ) ( )2 2
2 2 22 1( ) sinT b f d b b f d
λ λ
λ λ
ϕ λ α α ϕ ϕ λ= = − + − ∫ ∫ . (4.1)
21
with semi-major axis b computed by
21 .b a e= − (4.2)
Expressing dλ in terms of latitude, we arrive at the solution:
( )( ) ( )
( )
2
1
2 22 1
sinfT b b ck d
g
λ
λ
ϕ ϕα α φ
ϕ
−= − + ∫ (4.3)
where
( )2 2
sin 1 1 sin( ) ln ,
4 1 sin2 1 sin
ef
e ee
ϕ ϕϕ
ϕϕ
+= +
−− (4.4)
( ) ( ) ( ) ( ) ( ) ( )2 2 2 2 2 2cos 1 sin 1 1 sing e c e cϕ ϕ ϕ ϕ = − − − − , (4.5)
and
21k e= − and cosx ϕ= . (4.6)
Alternatively, in terms of cosx φ= , equation (4.3) could be written as
( )( )
( )
2
1
2 22 1
1x
x
f xT b b ck dx
g xα α
−= − + ∫ , (4.7)
22
where
( )
2
2 2 2 2
1 1 1 1( ) ln
2 1 4 1 1 1
e xf x
e x e x e x
+ −= +
− − − − (4.8)
and
( ) ( ) ( ) ( ) ( )2 2 2 2 2 21 1 1 1 1g x x e x c e c x = − − − − − − . (4.9)
Note that 1 2 1andϕ ϕ ϕ> are the latitudes at the intersections of the meridians and the
geodesic,
cos ,i ix φ= (4.10)
arcsincos
i
i
cα
β
=
(4.11)
and
2 2 2arccos
1
ii
i
x
e e xβ
= − +
. (4.12)
If 1 2φ φ= , equations (4.3) and (4.7) can be modified to
( )( ) ( )
( )
max
2 21
0
sin2 2
fT b b ck d
g
φ ϕ ϕπ α φ
ϕ
−= − + ∫ (4.13)
23
and
( )( )
( )max
02 2
1
cos
12 2
f xT b b ck dx
g xφ
π α−
= − + ∫ , (4.14)
where
max 12 2cos sin .
1
kcand c
e cϕ α= =
− (4.15)
24
5 Intersection
5.1 Intersection problem
A geodesic is passing through each of two known points P1 and P2 on the ellipsoid (Figure 4).
We try to solve the problem of intersection of the two geodesics. The solution for the latitude
was obtained for the sphere plus a small correction using numerical integration. This is an
iterative procedure and once obtained, the longitude is calculated without iteration.
Figure 4: Intersection of the two geodesics on the ellipsoid
5.2 New formulas
The coordinates ϕ1 and λ1 of the two points P1 and P2 are given. The object of the task is to
determine the coordinates ϕ and λ of the point of intersection P. We start by obtaining the
reduced latitudes β1 and β2. From the given data the Clairaut’s constant of the two geodesics is
determined by (e.g., Sjöberg 2007b):
25
3cos sin ( 1, 2) 0
2 2i i i i ic i if or
π πβ α α π α= = ≤ ≤ ≤ ≤ (5.1)
and
3cos sin ( 1, 2) 2 .
2 2i i i i ic i if or
π πβ α α π α π= − = < < ≤ < (5.2)
Then, the coordinates of P are related by two equations
( ) ( )1 1 2 2 ,F and Fλ β λ λ β λ= + = + (5.3)
where
( )2 2
2 2
1 cos.
cos cosi
i i
i
e u duF c
u c u
β
β
β−
=−∫ (5.4)
By eliminating λ from the two equations, we arrive at the integral equation of β:
( ) ( )2 1 1 2.F Fβ β λ λ− = − (5.5)
We solve β by using:
( )0
arcsin ,
j
y t
j
j y t
yF
tβ
=
=
=
(5.6)
where
2
0
1tan , tan ,
j
j j j
j
ct t t and
cβ β
−= = = (5.7)
26
( )2
1
sin
2
2 2 2 2 2sin
, 1,2.1 1 1j
x
j j
x j
dxd e c for i
c x e e x
β
β
λ=
=
= − =− − + − +
∫ (5.8)
It follows that
01 02 ,t t
t KD
= ± (5.9)
where
2 2 201 02 01 02sin , 2 1K k D t t t t K= = + −m (5.10)
and
2 11 2 1 2
02 01
arcsin arcsin .t t
k d dt t
λ λ λ λ= − − + + − (5.11)
In this case the iteration is required to obtain the value of t. Once β is computed, λ can be
determined by equation (5.3). Suffice to say that we get four different values for t and β, hence
there will be 2 4 8⋅ = values for λ since we have two different equations for λ. So we have 8
values for longitude and 4 values for latitude, which gives us 4 potential candidates for the final
point of intersection.
27
6 Testing new formulas
6.1 Direct and indirect methods
There are several methods how to test the new formulas for the direct and indirect geodetic
problems. The first method described here is to combine direct and indirect methods
simultaneously. Here we differ to approaches:
First, to do as following: take one point of origin and compute the second point in the direct
problem using new formulas and later use this point as an input to the indirect problem. Results
obtained from the indirect problem are then being compared to the initial input data to the
direct problem, azimuth and the distance, respectively.
Second, the reverse of the first approach. We take a grid of points with one point being the first
point and all other points being second points for the input to the indirect problem. As a result
we obtain the distance and the azimuth of the first point which can later be used as an input to
the direct method where we get the coordinates of the second point. Finally, we compare given
coordinates of the second point with the coordinates computed with the direct method.
This type of testing is better when we are testing both direct and indirect methods together
since we already know what the results should be. If we want to look inside of the problem, if
any, this method becomes a bit more complicated since we do not know where the problem
occurs and why the results are bad. Errors may occur in either methods or, in worst case
scenario, both methods are bad, but we still get a good result.
The other method is to compare the results obtained from these new formulas to the results
calculated from the formulas that already exist and that have already been proved trustworthy.
Of course, these ‘old’ formulas have to be tested as well to see whether there are no errors in
the programming code, for example.
28
The comparison of the direct method included the following values as the input:
§ for geodetic latitude value 50°,
§ for geodetic longitude value 0°,
§ for azimuth 0° to 90° range, in 10° steps,
§ for geodesic distance values from 100 000 meters to 1000 000 meters in 100 000 steps.
As for the comparison of the indirect method we used the following procedure:
- a grid of points 10° by 10°, from (-90°,-90° ) southwest corner to (90°, 180°)
northeast corner.
- One starting point on the equator, one north and one south from the equator.
Vincenty’s method
In 1975, Vincenty published a rapidly converging algorithm for computing the distance
between points on an ellipsoid (Internet [1]). The algorithm is supposed to be precise to within
a few millimeters. When using the algorithm for the inverse method for two antipodal points,
one should use it with caution since it is very sensitive to small derivations. In this case the
algorithm returns a warning.
Complete description of a method can be found in (Vincenty, 1975), and the two
implementations in Matlab can be found in (Internet [1]) and (Internet [2]).
Ever since it has been published, this method is being improved and evaluated by many, such
as (Thomas et al., 2005), to name only one.
Of course many other methods are available to be our testing tool, such as (Hradilek, 1976) or
(Sodano) but we have chosen Vincenty’s method since it is accurate enough and the
implementation of the problem was already available.
29
Several tests were made, as listed below:
Test 1: Testing the direct and the indirect methods of the new solutions simultaneously; direct
method first followed by the indirect method
As the first point we selected P1 with coordinates φ1 = 50° and λ1 = 0°. Furthermore we
selected the range of azimuths from α = 0° to α = 90° in 10° steps and a range of
distances from s = 10 000 meters to s = 1000 000 meters in 10 000 meters steps.
Additionally we also changed the azimuths from the initial test, so they were from 100°
to 180° in 10° intervals.
In last test we changed φ1 to 50° south, set azimuth to 50° and set the distance from 100
km to 20 000 km in 100 km steps.
In these methods we compared the azimuth of the first point and the distance between
the two points. If the difference between distances was greater than 1 mm and the
difference between azimuths greater than 0.00003° or 0.108’’ the results were taken
into close inspection and those points were marked red on the output.
Test 2: Testing the direct and the indirect methods of the new solutions simultaneously; indirect
method first followed by the direct method
As a starting point we selected the point of origin P1 with coordinates φ1 = 0°, 45° north
and 45° south, respectively and λ1 = 0° and created a grid of points P2 around the first
point. The latitude of the grid was from 90° south to 90° north and the longitude from
90° west to 180° east. The size of the grid was 10° x 10°.
In this testing we compared the coordinates of the second point which were given as an
input value with the computed coordinates of the same point. If one of the computed
coordinates was of by 0.00003° or 0.108’’ compared to the given coordinate this point
was taken into close inspection and marked red on the output.
30
Test 3: Testing the direct and indirect methods of the Vincenty’s formulas simultaneously;
indirect method first followed by the direct method
This testing has only been used to clarify the quality of the Vincenty’s formulas as we
later compared these formulas with the new ones.
Test 4: Comparing the direct formulas to Vincenty’s direct formulas
Using already mentioned input values calculated coordinates from both methods were
compared and presented. Depending on the difference between them they were marked
accordingly on the output.
Test 5: Comparing the indirect formulas to Vincenty’s indirect formulas
Using the grid of points similar to the ‘Test 2’, compared distances and azimuths were
compared and presented. Depending on the difference between them they were marked
accordingly on the output.
6.2 Area
There is an obvious way how to test the area under a geodesic. As we select two points we
compute the area under the geodesic between the two points. Now we compute a point (or
number of points) on the geodesic and compute several small areas between those points (see
Figure 5). The sum of these areas should be the same as the area from the initial two points.
There are several ways on how to split the complete area into the small ones. We can split the
longitude, latitude or distance between the two points. In our case we have decided to split the
distance between the two points since it is the easiest and the fastest way. One has to bear in
mind that these small areas are not in any case of the same size.
There is another method (Sjöberg, 2006a), where computation of small areas and ellipsoidal
blocks are described as well as the area of an arbitrary geodetic polygon. Since we already have
a method for which we believe is adequate the comparison of the two methods is not presented
here.
31
Figure 5: Computing the area T limited by the two meridians, the equator and a geodesic using several small areas Ti
6.3 Intersection
How to test the intersection method is not as trivial as it might look at a first glance. However
we tried to use the previous knowledge and methods used in this paper.
Since we obtain eight points with our computations it would seem logical to compare all those
points to see whether there is a pair of points that are the same. As seen from (Figure 22) this can be
done numerically or visually.
Once we have this one point of intersection, we can use new indirect method or Vincenty’s method
to compute the azimuths back to the original points.
32
7 Results
7.1 Direct and indirect methods
Test 1: Testing the direct and the indirect methods of the new solutions simultaneously; direct
method first followed by the indirect method
In this test results were good as long as the geodesic from the first point was rising, that is as
long as the computed latitude was becoming greater by every distance as it can clearly be seen
in Figure 6 below and as a close up in later figures. By good we mean when the computed
azimuth and distance were not different from the given ones by 0.108’’ and 1 mm.
Figure 6: The result of the Test 1, where direct and indirect geodetic problems have been compared using new solutions
33
We started at P1 with coordinates ϕ = 50° and λ = 0°, distances from 10 000 m to 1000 000 m
in 10 000 m steps and azimuths from 0° to 90° in 10° intervals. If the difference between the
computed distance and the given one was greater than 1 mm and the difference between the
computed azimuths and the given one was greater than 0.00003° or 0.108’’ the point was
plotted as a red dot, otherwise it was printed as a blue circle.
Figure 7 shows a close up of the previous image focusing only with azimuth at 80°. This figure
includes numbering of points.
Figure 7: Zoomed-in result of the Test 1, where direct and indirect geodetic problems have been compared using new solutions
Figure 7 and Table 1 show a detailed view of the results. It shows that problems start with the
point number 93.
34
Table 1: The direct and the indirect geodetic problems in numbers
id φ ° λ ° φNEW ° λNEW ° α° s m scompm ∆s m
| | | | | | | | | 84 50 0 50.722419 11.762798 80 840000.000 840000.000 0.000 85 50 0 50.723790 11.904387 80 850000.000 850000.000 0.000 86 50 0 50.724989 12.045980 80 860000.000 860000.000 0.000 87 50 0 50.726016 12.187576 80 870000.000 870000.000 0.000 88 50 0 50.726871 12.329201 80 880000.000 880000.000 0.000 89 50 0 50.727554 12.470816 80 890000.000 890000.000 0.000 90 50 0 50.728065 12.612433 80 900000.000 900000.000 0.000 91 50 0 50.728403 12.754047 80 910000.000 910000.000 0.000 92 50 0 50.728570 12.895675 80 920000.000 920000.000 0.000 93 50 0 50.728565 12.887357 80 930000.000 919412.649 10587.351
94 50 0 50.728389 12.746125 80 940000.000 909440.553 30559.447 95 50 0 50.728042 12.604906 80 950000.000 899468.457 50531.543 96 50 0 50.727523 12.463683 80 960000.000 889496.362 70503.638 97 50 0 50.726834 12.322464 80 970000.000 879524.268 90475.732 98 50 0 50.725974 12.181235 80 980000.000 869552.175 110447.825 99 50 0 50.724942 12.040034 80 990000.000 859580.082 130419.918 100 50 0 50.723740 11.898836 80 1000000.000 849607.991 150392.009
If we take a look at equations for computing the geodetic longitude (3.8-3.10)
2
2 12 1 1
0 0 01
arcsin arcsin arcsin
i
i
i
t t td d
t t tλ λ λ λ λ
=
=
= + + = + − +
, where
( )2
1
2
2 2 2 2 21 1 1
x
x
dxd e c
c x e e xλ = −
− − + − +∫ , tan ,i it β=
2
0
1 ct
c
−= ,
we can see that the computation of the geodetic latitude depends only on one non-constant
value (β1, e2 and c are all constants), β2. To put it short, for the same value of β2 we get the
same value of λ2.
This occurs because the Clairaut’s constant changes sign once geodesic has reached the
maximum (or minimum). Clairaut’s constant is computed with equation
maxcos sin cosc β α β= ⋅ = , which yields that for azimuths larger than 90° the constant is
negative. Equations above are therefore only suitable when the latitude of the geodesic is rising
and should be modified accordingly.
35
One thing interesting is also that in iteration to compute ds, we discover that after point 92 all
values for ds start to oscillate (Appendix E). Since ds does not contribute a lot to computation
of β2 (the (d-ds) part is relatively small) this does not affect the computation of the reduced
latitude after the maximum has been reached. But this fact should not be neglected when doing
further research on this topic.
Figure 8 shows points where the use of the direct method is without errors. We see that at
geodetic latitude of 50° problems start to appear only around azimuth of 85° for long distances
and become apparent for shorter distances as we are getting closer to azimuth of 90°.
Figure 8: Areas of safe use when using the new solutions to compute the direct problem
36
Furthermore we tested the method for azimuths between 100° and 180° (see Figure 9). In this
case the latitude was computed wrong. We can clearly see the pattern in Figure 9. All points
should be below the latitude of the original point, which was set to 50°. Again, the longitude for
the azimuth 100° was computed wrong, since the longitude there is suppose to increase after
some distance as can be seen from equations above.
Figure 9: The result of Test 1, where direct and indirect geodetic problems have been compared using new solutions (azimuths
ranging from 100° to 180° in 10° intervals)
If we take a closer look at equations for computing the geodetic longitude (3.8-3.10)
2
2 12 1 1
0 0 01
arcsin arcsin arcsin
i
i
i
t t td d
t t tλ λ λ λ λ
=
=
= + + = + − +
,
where
( )2
1
2
2 2 2 2 21 1 1
x
x
dxd e c
c x e e xλ = −
− − + − +∫ , tan ,i it β=
2
0
1 ct
c
−= , and
( )2 12 2
sin 1 arcsin1
s ds xc
a cβ
−= − +
−
where ( )
( )2
1
2
2
2 2 2 2 2
12
1 1 1
x
x
x dxds ae
c x e e x
−= −
− − + − +∫ ,
37
we see that putting azimuth larger than π/2 would not result in changing anything and no
changes would be made to ds and β2 compared to the α between 0 and π/2 (e.g. α = 100° would
give the same results as α = 80°, since sin(α) would be the same).
The only thing changing would be dλ which would become exactly of the opposite sign as in
the previous case. This case is shown in (Figure 10, right) where we can see that results for
α = 100° give the same results as α = 80°. If we change the sign of the c, again we get no
changes when computing ds or b2, but we get negative values for longitude, since there is only
c (not c2) in the equation for computing λ2. This can be clearly seen in (Figure 10, left).
Figure 10: The result of Test 1, where direct and indirect geodetic problems have been compared using new solutions with azimuth at
100°, negative (left) and positive (right) Clairaut’s constants, respectfully
In the next case we tested these methods from a point with geodetic latitude at 50° S. Again, the
results were fine until the azimuth of the calculated point was between 0 and π/2 and when the
geodesic reached the maximum latitude results became wrong again due to the incorrect sign of
the Clairaut’s constant.
Figure 11 shows this method of testing with latitude set to 50° S and azimuth of 50°. Red dots
show wrong results, that is calculated points at their locations. Blue circles are points at their
correct locations.
38
Figure 11: The result of Test 1, where direct geodetic problem has been computed using new solutions with negative latitude as a
starting point
Test 2: Testing the direct and the indirect methods of the new solutions simultaneously; indirect
method first followed by the direct method
In the second attempt to test both methods for direct and indirect geodetic problems we arrived
to the following conclusions:
§ in the first case (Figure 12) methods test positive when the first point is located at the
origin (0,0) and the second point is almost anywhere in the 1st or 3rd quadrant. Almost
because of the fact that the direct method does not hold for long distances.
§ We see that the results are symmetrical regarding to the origin
§ When azimuth is between π/2 and π or between 3π/2 and 2π, results are wrong since
they are on the wrong side of the x-axis (equator in this case). This is due to the
Clairaut’s constant and was already explained in the previous test.
39
Figure 12: The result of Test 2, where indirect and direct geodetic problems have been compared; starting point on the equator
§ In the second case (Figure 13) when the origin was moved to 45° N and longitude at 0°,
this method tests positive again almost anywhere in the 1st and 3rd quadrant. Again,
when the geodesic reaches the maximum latitude, method tests negative.
40
Figure 13: The result of Test 2, where indirect and direct geodetic problems have been compared; starting point north of the equator
§ In the third case (Figure 14) when the origin was moved to 45° S and longitude at 0°,
testing confirms previous conclusions.
Figure 14: The result of Test 2, where indirect and direct geodetic problems have been compared; starting point south of the equator
41
Test 3: Testing the direct and indirect methods of the Vincenty’s formulas simultaneously;
indirect method first followed by the direct method
This testing showed the quality of Vincenty’s method. Separate Matlab files were obtained
from Matlab Central File Exchange website (internet link [1] and [2]). These functions were
later modified to suit out needs, e.g. we change the value of semi-major axis.
In Figure 15 we see that all calculated values were of a good quality; not even one value was
off by more than 1’’. That confirmed that Vincenty’s methods are good enough and that we can
compare our results with this method.
Figure 15: The result of Test 3, where Vincenty’s formulas have been compared for both geodetic problems
Test 4: Comparing the direct formulas to Vincenty’s direct formulas
We have already discussed the direct geodetic problem being computed with the new solution.
What if we were wrong? To make things certain we compared our results with Vincenty’s
results for ϕ1 = 50°, λ1 = 0°, α from 0° to 90° in 10° steps and distance s from 100 kilometers to
1000 kilometers in 100 kilometers steps (Figure 16). Red dots show the location of a point
42
calculated with Vincent’s method and the blue circles show the location of the point calculated
with new methods using numerical integration. If calculated values were different from each
other by 1’’, the blue ‘X’ is posted instead of a blue circle. We can confirm that our assumption
is correct. When using new methods, one must be very careful.
Figure 16: The results of Test 4 where direct method of the new solutions have been compared to Vincenty’s direct method
We also tried using both methods on the southern part of the Earth. We get good results all the
way, until the maximum latitude has been reached (Figures 17 and 18, respectfully). We used
ϕ1 = 50° south and λ1 = 0° as a starting point, α = 50° and distance s from 100 kilometers to 15
000 and 20 000 kilometers in 100 kilometers steps, respectively.
43
Figure 17: The result of Test 4 for direct problem; new solution compared to Vincenty’s; maximum distance 15000 km
Figure 18: The result of Test 4 for direct problem; new solution compared to Vincenty’s; maximum distance 20000 km
44
Test 5: Comparing the indirect formulas to Vincenty’s indirect formulas
Here we used a grid between southwest corner of 0° W and 0° N, and northwest corner of 90° N
and 180° W, for latitude and longitude, respectively. The size of the grid was 10° x 10° in size
(Figure 19).
Figure 19: The result of Test 5 where two indirect methods have been compared
- Small red circles represent points where the difference between azimuths was less than 1’’,
and the difference between distances was less than 1mm,
- big red circles represent points where the difference between azimuths was less than 10’’,
and the difference between distances was less than 1m,
- small black circles represent points where the difference between azimuths was less than
30’’, and the difference between distances was less than 10 m,
- big black circles represent points where the difference between azimuths was more than
30’’, and the difference between distances was more than 10 m.
We see that differences are largest when the second point is at the longitude of 90° or more. There
are also some minor differences in other cases.
45
7.2 Area
We selected only points where ϕ2 > ϕ1 and λ2 > λ1 because of that particular request in the
article. Furthermore we tested points where geodesic would reach the maximum latitude and
start decreasing. The main principle can be seen in Figure 5 and the area computation function
is fully printed in Appendix C.
With starting points ϕ1 = 10°, λ1 =10°, ϕ2 = 50° and λ2 = 30° , and one mid-point at s/2 from P1
(Figure 20), we obtained the following result:
Total area [in km2]: 7572755.0429281034
Sum of areas in between [in km2]: 7572754.9417463578
Difference [in km2]: +0.1011817461
Difference [in %]: 0.0000013361
If we increased the number of mid-areas, we obtained the following results:
Number of mid-areas Difference [in km2]: Difference [in %]:
20 0.077690 0.0000010259
100 0.079444 0.0000010491
200 0.079871 0.0000010547
The final result at 200 mid-areas shows only approximately 0.08 km2 of total difference, which, in
other words is only 80000 m2 when total area is the size of 7572755042928 m2, which is a very
good result. With confidence we can say that this method can be used in area determination.
However, the optimum number of the mid-areas is hard to define as it can vary from 0 to 20, also
depending on the size of the total area. But even with random number of mid-areas we compute
very good results.
46
Figure 20: The position of the mid-points on the geodesic
But once we reach the maximum point of latitude of the geodesic, things go wrong (see Figure 21).
Now we know that this is due to the fact that we do not compute the correct Clairaut’s constant.
With starting points ϕ1 = 10°, λ1 =10°, ϕ2 = 10° and λ2 = 30° , and 20 mid-points, we get the
following:
Total area [in km2]: 2468400.0368263028
Sum of areas in between [in km2]: 173.0632191883
Difference [in km2]: 2468573.1000454910
Difference [in %]: 99.9929888504
We see that when dealing with ‘falling’ geodesics, this method is not reliable and further
investigation should be applied to this problem. Figure 21 shows this problem in detail.
47
Figure 21: The position of mid-points when the latitude of geodesic is first increasing and then decreasing
48
7.3 Intersection
Figure 22 shows the distribution of computed points when starting with initial points P1 with
coordinates ϕ1 = 10°, λ1 =10° and azimuth α1 = 45 and P2 with coordinates ϕ2 = 10°, λ2 = 30° and
azimuth α2 = 10°. We see that one point appears the same and when we check this, we come up
with the point of intersection (Table 2).
Figure 22: Distribution of computed points of the two geodesics
Table 2: All points calculated from the intersection method
Id φ ° λ ° Id φ ° λ °
P1’ 33.91444 29.80763 P11’ 33.91444 29.80763
P2’ -23.77626 -22.66909 P22’ 24.04955 -22.66909
P3’ -33.64115 -29.80763 P33’ 22.50012 -29.80763
P4’ 24.04955 22.66909 P44’ 32.36501 22.66909
49
We see that points P1’ and P11’ are the same. Now all we have to do is to compute azimuths back
to the original points. Unfortunately things do not go as wanted. Results were obtained using
indirect method, both Vincenty’s as well as the new solutions.
We get the following values for azimuths: α1 = 45° 10’ 2.480’’ and α2 = 9° 58’ 3.648’’.
Compared to the initial azimuth the first azimuth is more than 10’ off and the second azimuth more
than 1.5’. To conclude, we can use this method for rough estimates but it should not be used in
tasks, where greater precision is required.
50
8 Conclusion
As it has been shown, new methods show great potential and more research should be done to
increase their usability. Nevertheless we are allowed to use them as long as we know how far are
we allowed to go and where results will not be correct..
With the two basic geodetic problems we see that the main problem is the Clairaut’s constant c.
Since it changes the sign as it ‘travels’ on the ellipsoid this should be considered and further
research should be done. It has been shown that traveling only on the positive side of the constant;
we are safe to use these new methods, even if we start from the negative geodetic latitude. The same
goes for solutions for the indirect geodetic problem. Once the geodesic is ‘curved’ we must consider
two values for the same geodesic.
When using numerical integration with the area computation, we are safe as long we keep in mind
that the latitude of the geodesic should only rise. When the formulas for the indirect geodetic
problem are improved, we might improve the computation of the area as well.
With the intersection we should wait until improvements are going to be made in this field. If we
want approximate values we are allowed to use new solutions but for anything more than that we
would strongly advise against the use of the formulas. Again, improvements can be made by further
research on using the numerical integration for specific geodetic problems. It could also be wise to
approach the problem from the strictly mathematical point of view.
The use of numerical integration in geodesy is not new nor very old but should be handled with care
because even the smallest mistake or wrong sign is crucial for a good result.
To conclude we have to say that in general the formulas that had been tested are not bad at all.
Since the task of this paper was only to test them and not to correct them and make them work, we
are therefore unable to give some pointers on further research. But the effort should be put in further
research as it will lead to, in our opinion, to better results. The same goes for the possible misprints
in articles. There were some that had been eliminated during the research.
51
9 References
• Heck, B. (1987): Rechenverfahren und Auswertemodelle der Landvermessung. Herbert Wichmann Verlag, Karlsruhe.
• Hradilek, L. (1976): Closed Formulas for the Direct and Inverse Geodetic Problems. Bull. Geod. 50, pp.301-306.
• Fan, H. (2005): Theoretical Geodesy. Royal Institute of Geodesy. Stockholm, Sweden.
• Internet link [1]: http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=17493&objectType=file
• Internet link [2]: http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=10821&objectType=file
• Sjöberg, L.E. (2006a): Determination of areas on the plane, sphere and ellipsoid. Survey Review 38( 301): 583-593
• Sjöberg, L.E. (2006b): New Solutions to the Direct and Indirect Geodetic Problems on the Ellipsoid. ZfV 131, pp. 35-39.
• Sjöberg, L.E. (2007a): Geodetic intersection on the ellipsoid. J Geod DOI 10.1007/s00190-007-0204-7.
• Sjöberg, L.E. (2007b): Precise determination of the Clairaut constant in ellipsoidal geodesy. Surv. Rev. 39: 81-86.
• Sodano, E.M.: General Non-Iterative Solution of the Inverse and Direct Geodetic Problems. Fort Belvior, Virginia, USA.
• Thomas, C.M. et al. (2005): Validation of Vincenty’s Formulas for the Geodesic Using a Fourth-Order Extension of Kivioja’s Formula. Journal of Surveying Engineering.
• Vincenty, T. (1975): Direct and inverse solutions of geodesics on the ellipsoid with applications of nested equation, Survey Review, No.176.
• Weisstein, Eric W. "Lobatto Quadrature." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/LobattoQuadrature.html
• Weisstein, Eric W. "Gauss-Kronrod Quadrature." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/Gauss-KronrodQuadrature.html
52
Appendices
Appendix A: Direct geodetic problem function, source code for Matlab
% New solution for the direct geodetic problem % using numerical integration. % % Based on the article: % 'New Solutions to the Direct and Indirect Geodetic Problems on the % Ellipsoid' by L.E.Sjöberg, published in Zfv 131, pp. 35-39 in 2006, % Chapter 2 % % ///Usage/// % % Input: % fi1, la1 - Geodetic latitude and longitude of the first given point % [rad]. % s - Distance of the geodesic [metres] % e2 - First extecentricity squared [no units]. % a - Semi-major axis of the ellipsoid [metres]. % tol - Tolerance in the iteration process [no units]. % % Ouput: % az1, az2 - Azimuths of the two points, always forward [radians]. % s - Computed distance between the two points [metres]. % method - Method used. % :return 5: when reduced latitudes are different % :return 1: when reduced latitudes are same but different from 0 % :return 0: when reduced latitudes are same and equal to 0 % count - Number of counts in the itaration process [no units]. % c - Computed Clairaut's constant [no units]. % % ///Caution/// % % Only works for % la2 > la1 % % % Jure Kop (2008), KTH, Stockholm, Sweden function [fi2,la2,az2,method,c,test1,test2,test3,test4,test5,test6] = direct(fi1,la1,s,az1,e2,a) method = -1; b1 = atan(tan(fi1)*sqrt(1-e2)); c = cos(b1)*sin(az1); %Clairaut's constant [eq.2] %----------------- TEST DISTANCE METHOD ------------------------------ x1 = sin(b1); x2 = sqrt(1-c^2)-0.0001; test_f = @(x) (1-x.^2)*(-a)*e2./(sqrt(1-c^2-x.^2).*(1+sqrt(1-e2 + e2*x.^2))); ds_test = quadl(test_f, x1, x2); s_test = a*(pi()-2*asin(x1/sqrt(1-c^2))) + ds_test; if abs(s - s_test) < 1 b_equal = true; else b_equal = false; end %----------------- METHOD 0 ------------------------------------------- if(b_equal == true && b1 == 0) %b1 == b2 == 0 method = 0; dl = c*s/a+pi()*(1-c)-c*(1-c^2)*pi()*e2/4; %eq[10]
53
fi2=fi1; la2 = la1 + dl; b2 = b1; az2 = asin(c/cos(b2)); end %----------------- METHOD 1 ------------------------------- if (b_equal==true && b1 ~=0 ) %beta1 == beta2 ~= 0 method = 1; t0 = sqrt(1-c^2)/c; t1 = tan(b1); x1 = sin(b1); x2 = sqrt(1-c^2); met1= @(x) (-2*e2)*c./(sqrt(1-c^2-x.^2).*(1+sqrt(1-e2 + e2*x.^2))); dl_ = quadl(met1, x1, x2); la2 = la1 + 2*(pi()/2-asin(t1/t0)) + dl_; fi2 = fi1; b2 = b1; az2 = asin(c/cos(b2)); end %----------------- METHOD 5 ------------------------------- if(b_equal==false) % checks b1 ~= b2 method = 5; diff = 1; x1 = sin(b1); ds = 0; %starting value for ds b2 = asin(sqrt(1-c^2)*sin((s-ds)/a + asin(x1/sqrt(1-c^2)))); while (diff > 1.e-12) x2 = sin(b2); diff2 = b2; met5 = @(x) (-(1-x.^2)*a*e2)./(sqrt(1-c^2-x.^2).*(1+sqrt(1-e2 + e2*x.^2))); ds = quadl(met5, x1, x2); % if (ds > ds2) % disp(sprintf('A %.10f',ds)); % else % disp(sprintf('V %.10f',ds)); % end b2 = asin(sqrt(1-c^2)*sin((s-ds)/a + asin(x1/sqrt(1-c^2)))); diff = abs(diff2-b2); end t0 = sqrt(1-c^2)/c; t1 = tan(b1); t2 = tan(b2); x1 = sin(b1); x2 = sin(b2); met5la=@(x) ((-e2)*c./(sqrt(1-c^2-x.^2).*(1+sqrt(1-e2+e2*x.^2)))); dl = quadl(met5la, x1, x2); fi2 = atan(tan(b2)/sqrt(1-e2)); la2 = la1 + (asin(t2/t0) - asin(t1/t0)) + dl; %eq[7a] az2 = asin(c/cos(b2)); end %----------------- END OF METHOD 5 ------------------------------- test1 = dl; test2 = c; test3 = asin(t2/t0); test4 = asin(t1/t0); test5 = s-ds; test6 = b2; end
54
Appendix B: Indirect geodetic problem function, source code for Matlab
% New solution for the indirect geodetic problem % using numerical integration % % Based on the article: % 'New Solutions to the Direct and Indirect Geodetic Problems on the % Ellipsoid' by L.E.Sjöberg, published in Zfv 131, pp. 35-39 in 2006, % Chapter 3 % % ///Usage/// % % Input: % fi1, la1 - Geodetic latitude and longitude of the first given point % [rad]. % fi2, la2 - Geodetic latitude and longitude of the second given point % [rad]. % e2 - First extecentricity squared [no units]. % a - Semi-major axis of the ellipsoid [metres]. % tol - Tolerance in the iteration process [no units]. % % Ouput: % az1, az2 - azimuths of the two points, always forward [radians] % s - computed distance between the two points [metres] % method - which method has been used % :return 5: when reduced latitudes are different % :return 1: when reduced latitudes are same but different from 0 % :return 0: when reduced latitudes are same and equal to 0 % count - number of counts in the itaration process [no units] % c - computed Clairaut's constant [no units] % % ///Caution/// % % Only works for % la2 > la1 % % % Jure Kop (2008), KTH, Stockholm, Sweden function [az1,az2,s,method,count,c] = indirect(fi1,la1,fi2,la2,e2,a,tol) method = -1; % if none of the conditions apply count = 0; % set counter (no. of iterations) to 0 % convert geodetic latitude to reduced latitude beta1 = atan(tan(fi1) * sqrt(1-e2)); beta2 = atan(tan(fi2) * sqrt(1-e2)); %compute c and s (three separate cases) %--------------- METHOD 5 ------------------------------------------- if (beta1 ~= beta2) method = 5; % reduced latitudes are different t1 = tan(beta1); t2 = tan(beta2); x1 = sin(beta1); % lower integration limit x2 = sin(beta2); % upper integration limit c = 0; % starting value for Clairaut's constant diff = 1; % starting value for the difference in the iteration while (diff > tol) count = count + 1; diff2 = c; met5 = @(x)(-e2)*c./(sqrt(1-c^2-x.^2).*(1+sqrt(1-e2 + e2*x.^2))); dla_c = quadl(met5, x1, x2); % [eq. 11c] DL = la2 - la1 - dla_c; % [eq. 11b] t02 = (t1^2 + t2^2 - 2*t1*t2*cos(DL)) / (sin(DL))^2; % [eq. 11a] c = 1 /sqrt(1+t02); % [eq. 12]
55
diff = abs(diff2 - c); end fun_s = @(x) (1-x.^2)*(-a)*e2./(sqrt(1-c^2-x.^2).*(1+sqrt(1-e2 + e2*x.^2))); ds = quadl(fun_s, x1, x2); % [eq. 3c] s = a*(asin(x2/sqrt(1-c^2)) - asin(x1/sqrt(1-c^2))) + ds; % [eq. 3b] end %--------------- METHOD 1 ------------------------------------------- if (beta1 == beta2 && beta1 ~= 0) method = 1; % reduced latitudes are same but different from 0 x1 = sin(beta1); % lower integration limit t1 = tan(beta1); c = 0.5; % starting value for Clairaut's constant diff = 1; % starting value for the difference in the iteration while (diff > tol) diff2 = c; count = count + 1; x2 = sqrt(1-c^2)-0.001; % upper integration limit % reduced due to possible singularity problems fun2 = @(x) (e2*c)./(sqrt(1-c^2-x.^2).*(1+sqrt(1-e2+e2*x.^2))); Dla = (la2-la1) / 2 + quadl(fun2, x1, x2); c = cos(Dla) / sqrt(t1^2 + (cos(Dla))^2); diff = abs(diff2 - c); end t0 = sqrt(1-c^2)/c; I = pi*(1-c)+2*(c*asin(x1/sqrt(1-c^2))-asin(t1/t0)); fun_dla1 = @(x) (-2*e2*c*x.^2)./(sqrt(1-c^2-x.^2).*(1+sqrt(1-e2+e2*x.^2))); dla1 = quadl(fun_dla1, x1, sqrt(1-c^2)-0.001); s = a/c * ((la2-la1)-I-dla1); end %--------------- METHOD 0 ------------------------------------------- if (beta1 == beta2 && beta1 == 0) method = 0; c = 1; s = a*abs(la2-la1); end %compute az1, az2 az1 = asin(c/cos(beta1)); az2 = asin(c/cos(beta2)); end
56
Appendix C: Area computation function, source code
% Area computation using the numerical integration % % Based on the article: % 'New Solutions to the Direct and Indirect Geodetic Problems on the % Ellipsoid' by L.E.Sjöberg, published in Zfv 131, pp. 35-39 in 2006, % Chapter 3 % % ///Usage/// % % Input: % fi1, la1 - Geodetic latitude and longitude of the first given point % [rad]. % fi2, la2 - Geodetic latitude and longitude of the second given point % [rad]. % % Ouput: % T – size of the area [km2] % c - computed Clairaut's constant [no units] % % Jure Kop (2008), KTH, Stockholm, Sweden function[T,c] = area(fi1,la1,fi2,la2) a=6378000; e2=0.00694; e=sqrt(e2); b = a*sqrt(1-e2); fi1 = deg2rad(fi1); fi2 = deg2rad(fi2); la1 = deg2rad(la1); la2 = deg2rad(la2); beta1 = atan(tan(fi1) * sqrt(1-e2)); %rad beta2 = atan(tan(fi2) * sqrt(1-e2)); %rad [az1, az2, s, method, count, c] = indirect(fi1,la1,fi2,la2,e2,a); az1 = asin(c/cos(beta1)); %ok az2 = asin(c/cos(beta2)); %ok x1 = cos(fi1)-0.000001; %ok x2 = cos(fi2)-0.000001; %ok T1 = b*b*(az2-az1); %ok, 1part of eq.21a fun = @(x) (((1 ./ (2*(1-e2*x.^2)) + 1./(4*e*sqrt(1-x.^2)) * log( (1+e*sqrt(1-x.^2))/(1-e*sqrt(1-x.^2)))) - 1) ./ (x.*sqrt((1-e2*(1-x.^2)).*((1-c^2)-(1-e2*c^2).*(1-x.^2))))); T2 = quadl(fun, x2, x1); T2 = b*c*sqrt(1-e2) * T2; T = T1 + T2; end
57
Appendix D: Intersection computation, source code for Matlab
% Intersection of the geodesics % using the numerical integration % % Based on the article: % Sjöberg, L.E.: Geodetic Intersection in the Ellipsoid. % Royal Institute of Technology, Division of Geodesy, 2007. % % ///Usage/// % % Input: % No input. This is not a function. User should change the % initial values for longitudes, latitudes and azimuths. % % Ouput: % No output. Program only displays the computed points. % % Jure Kop (2008), KTH, Stockholm, Sweden clear, clc,clf, format long g; e2 = 0.00694; a = 6378000; fi1 = 0; la1 = 10; az1 = 70; fi2 = 0; la2 = 30; az2 = 10; %degrees to radians fi1 = deg2rad(fi1); fi2 = deg2rad(fi2); la1 = deg2rad(la1); la2 = deg2rad(la2); az1 = deg2rad(az1); az2 = deg2rad(az2); %compute beta beta1 = atan(tan(fi1) * sqrt(1-e2)); beta2 = atan(tan(fi2) * sqrt(1-e2)); %determine c if ((az1 >=0 && az1 <= pi/2) || (az1 >= pi && az1 <= 2*pi/2)) c1 = cos(beta1) * sin(az1); else c1 = -cos(beta1) * sin(az1); end if ((az2 >=0 && az2 <= pi/2) || (az2 >= pi && az2 <= 2*pi/2)) c2 = cos(beta2) * sin(az2); else c2 = -cos(beta2) * sin(az2); end %compute t1 and t2 t1 = tan(beta1); t2 = tan(beta2); %compute t01 and t02 t01 = sqrt(1-c1^2)/c1; t02 = sqrt(1-c2^2)/c2; x11 = sin(beta1); x12 = sin(beta2); t = [1,1,1,1]; for i=1:10 for j=1:4 beta(j) = atan(t(j)); x2 = sin(beta(j)); fun1 = @(x) (-e2)*c1./(sqrt(1-c1^2-x.^2).*(1+sqrt(1-e2 + e2*x.^2))); dla1 = quadl(fun1,x11,x2);
58
fun2 = @(x) (-e2)*c2./(sqrt(1-c2^2-x.^2).*(1+sqrt(1-e2 + e2*x.^2))); dla2 = quadl(fun1,x12,x2); %compute k k = la1-la2-dla1+dla2+asin(t2/t02)-asin(t1/t01); %compute K K = sin(k); %compute D D1 = sqrt(t01^2+t02^2-2*t01*t02*sqrt(1-K^2)); D2 = sqrt(t01^2+t02^2+2*t01*t02*sqrt(1-K^2)); %compute t t(1) = -K*t01*t02/D1; t(2) = K*t01*t02/D2; t(3) = K*t01*t02/D1; t(4) = -K*t01*t02/D2; end end beta = atan(t(1:4)); beta_deg = rad2deg(atan(t)); %lambda F1_beta = (asin(t/t01)-asin(t1/t01)) + dla1; F2_beta = (asin(t/t02)-asin(t2/t02)) + dla2; la_1 = (F1_beta + la1); la_2 = (F2_beta + la2); X = [la1,la2,la_1(1),la_1(2),la_1(3),la_1(4)]; X = rad2deg(X); X2 = [la1,la2,la_2(1),la_2(2),la_2(3),la_2(4)]; X2 = rad2deg(X2); Y = [beta1,beta2,beta(1),beta(2),beta(3),beta(4)]; Y = rad2deg(Y); %points for i=1:4 P1(i,1) = X(i+2); P1(i,2) = Y(i+2); P2(i,1) = X2(i+2); P2(i,2) = Y(i+2); end P1,P2 %plotting plot(X,Y,'x'); axis equal, hold on, plot(X2,Y,'o'); line(X(1:2),Y(1:2)); text(X(3)+0.3,Y(3)+0.3,'1'); text(X(4)+0.3,Y(4)+0.3,'2'); text(X(5)+0.3,Y(5)+0.3,'3'); text(X(6)+0.3,Y(6)+0.3,'4'); text(X2(3)+0.53,Y(3)+0.53,'11'); text(X2(4)+0.53,Y(4)+0.53,'22'); text(X2(5)+0.53,Y(5)+0.53,'33'); text(X2(6)+0.53,Y(6)+0.53,'44'); xmax = max(X); xmin = min(X); ymax = max(Y); ymin = min(Y);
59
xlabel 'long [deg]'; ylabel 'lat [deg]'; title 'intersection problem'; hold on; for i=1:4 for j=1:4 if P1(i,1) - P2(j,1) < 1 && P1(i,1) - P2(j,1) > -1 ... && (P1(i,2) - P2(j,2)) < 1 && (P1(i,2) - P2(j,2)) > -1 point(1,1)= P1(i,1); point(1,2)= P1(i,2); end end end point [az1,az2] = indirect(fi1,la1,deg2rad(point(1,2)),deg2rad(point(1,1)),e2,a,1e-12); az1 = rad2deg(az1); az2 = rad2deg(az2); az1 = degrees2dms(az1) az2 = degrees2dms(az2) [az1,az2] = indirect(fi2,la2,deg2rad(point(1,2)),deg2rad(point(1,1)),e2,a,1e-12); az1 = rad2deg(az1); az2 = rad2deg(az2); az1 = degrees2dms(az1) az2 = degrees2dms(az2)
60
Appendix E: Convergence of the ds*
89 V -1256.9187928282 V -1258.6749778285 V -1258.6774315913 V -1258.6774350199 90 V -1270.8907925731 V -1272.6664600112 V -1272.6689409411 V -1272.6689444076 91 V -1284.8625267894 V -1286.6576885642 V -1286.6601966949 V -1286.6602001988 92 V -1298.8340975787 V -1300.6487661598 V -1300.6513015263 93 V -1301.6455969198 A -1299.8270007193 V -1299.8295415752 94 V -1287.6740466763 A -1285.8749581833 V -1285.8774718022 A -1285.8774682905
95 V -1273.7023535522 A -1271.9227602542 V -1271.9252466716 A -1271.9252431978 96 V -1259.7304154455 A -1257.9703054003 V -1257.9727646506 A -1257.9727612144 97 V -1245.7581302568 A -1244.0174920927 V -1244.0199242080 A -1244.0199208098 98 V -1231.7853958903 A -1230.0642188067 V -1230.0666238181 A -1230.0666204574 99 V -1217.8121102548 A -1216.1103840214 V -1216.1127619585 A -1216.1127586356 100 V -1203.8381712645 A -1202.1558862218 V -1202.1582371128 A -1202.1582338276
*The initial value for ds is set to 0. If the next value is lower than the previous one, ‘V’ is displayed and if next value is larger than the previous one, ‘A’ is displayed. ‘V’ and ‘A’ are chosen because they look roughly like up and down arrows, respectively.
61
Appendix F: Direct vs. indirect geodetic problem; source code for Matlab
% Direct vs. indirect methods % % Jure Kop (2008), KTH, Stockholm, Sweden clear, clc, clf reset , format long g; e2 = 0.00694; a = 6378000; tol = 1e-12; fid = 50; fi = deg2rad(fid); lad = 0; la = deg2rad(lad); a1d = 80; a1 = deg2rad(a1d); s = 10000:10000:1000000; fi_s = size(fi,2); la_s = size(la,2); az_s = size(a1d,2); s_s = size(s,2); couint = 0; for i=1:fi_s for k=1:az_s for l=1:s_s for j=1:la_s disp(sprintf('%d', couint)); [fi2,la2,az2,mdir,cc,test1,test2,test3,test4,test5,test6] = direct(fi(i),la(j),s(l),a1(k),e2,a,tol); [az1,az2,s2,mindir,count,test1i,test2i,test3i,test4i,test5i,test6i] = indirect(fi(i),la(j),fi2,la2,e2,a,tol); couint = couint + 1; resultsD(couint,1) = couint; resultsD(couint,2) = fid(i); resultsD(couint,3) = lad(j); resultsD(couint,4) = 111111; resultsD(couint,5) = rad2deg(fi2); resultsD(couint,6) = rad2deg(la2); resultsD(couint,7) = 111111; resultsD(couint,8) = rad2deg(a1(k)); resultsD(couint,9) = rad2deg(az1); resultsD(couint,10) = rad2deg(a1(k))-rad2deg(az1); resultsD(couint,11) = 111111; resultsD(couint,12) = s(l); resultsD(couint,13) = s2; resultsD(couint,14) = s(l) - s2; resultsD(couint,15) = 111111; resultsD(couint,16) = mdir; resultsD(couint,17) = mindir; test1p(couint,1) = test1; test2p(couint,1) = test2; test3p(couint,1) = test3; test4p(couint,1) = test4; test5p(couint,1) = test5; test6p(couint,1) = test6; test1ip(couint,1) = test1i; test2ip(couint,1) = test2i; test3ip(couint,1) = test3i; test4ip(couint,1) = test4i; test5ip(couint,1) = test5i; test6ip(couint,1) = test6i; ss(couint,1) = s(l); ccc(couint,1) = cc; msg = int2str(couint); xlabel 'long [deg]'; ylabel 'lat [deg]';
62
title 'Direct vs. indirect geodetic problem'; hold on; if (abs(s(l) - s2) > 0.001) || (rad2deg(a1(k))-rad2deg(az1)) > 0.00003 figure(1), plot(rad2deg(la2),rad2deg(fi2),'o','MarkerSize',3,'MarkerFaceColor','r'); hold on; % text(rad2deg(la2),rad2deg(fi2)-0.05,msg); else figure(1), plot(rad2deg(la2),rad2deg(fi2),'o','MarkerSize',10); hold on; % text(rad2deg(la2),rad2deg(fi2)+0.05,msg); end end end end end figure(2), subplot(3,2,1), plot(test1p); figure(gcf), title 'test1' figure(2), subplot(3,2,2), plot(test2p); figure(gcf), title 'test2' figure(2), subplot(3,2,3), plot(test3p); figure(gcf), title 'test3' figure(2), subplot(3,2,4), plot(test4p); figure(gcf), title 'test4' figure(2), subplot(3,2,5), plot(test5p); figure(gcf), title 'test5' figure(2), subplot(3,2,6), plot(test6p); figure(gcf), title 'test6' figure(3), subplot(3,2,1), plot(test1ip); figure(gcf), title 'test1ip' figure(3), subplot(3,2,2), plot(test2ip); figure(gcf), title 'test2ip' figure(3), subplot(3,2,3), plot(test3ip); figure(gcf), title 'test3ip' figure(3), subplot(3,2,4), plot(test4ip); figure(gcf), title 'test4ip' figure(3), subplot(3,2,5), plot(test5ip); figure(gcf), title 'test5ip' figure(3), subplot(3,2,6), plot(test6ip); figure(gcf), title 'test6ip'
63
Appendix G: Indirect vs. direct geodetic problem, source code for Matlab
% Indirect vs. direct methods % % Jure Kop (2008), KTH, Stockholm, Sweden clear, clc, clf, format long g; e2 = 0.00694; a = 6378000; fi1d=0; fi1=deg2rad(fi1d); la1d=0; la1=deg2rad(la1d); fi2d = -90:10:+90; fi2=deg2rad(fi2d); la2d = -90:10:+180; la2=deg2rad(la2d); xE = [max(la2d),min(la2d)]; yE = [0,0]; xlabel 'long [deg]'; ylabel 'lat [deg]'; title 'indirect vs. direct geodetic problem'; hold on; plot(la1d(1), fi1d(1), 'o','MarkerSize',5,'MarkerFaceColor','k'); hold on; line(xE,yE, 'LineWidth',2), hold on; cou = 0; for i=1:size(fi2d,2) for j=1:size(la2d,2) cou = cou + 1; [az1, az2, s, mindir] = indirect(fi1,la1,fi2(i),la2(j),e2,a,1.e-12); [fi2c, la2c, az2, mdir] = direct(fi1,la1,s,az1,e2,a); test2(cou,1) = cou; test2(cou,2) = rad2deg(fi2(i)); test2(cou,3) = rad2deg(fi2c); test2(cou,4) = abs(fi2(i)-fi2c)*3600; %dfi in sec test2(cou,5) = rad2deg(la2(j)); test2(cou,6) = rad2deg(la2c); test2(cou,7) = abs(la2(j)-la2c)*3600; %dla in sec test2(cou,8) = real(111111); test2(cou,9) = real(mdir); test2(cou,10) = real(mindir); test2(cou,11) = rad2deg(az1); plot(la2d(j),fi2d(i),'o','MarkerSize',7); hold on; if abs(la2(j)-la2c)*3600 > 1*0.000277778 || abs(fi2(i)-fi2c)*3600 > 1*0.000277778 plot(rad2deg(la2c),rad2deg(fi2c),'o','MarkerSize',7,'MarkerFaceColor','r'); hold on; else plot(rad2deg(la2c),rad2deg(fi2c),'v','MarkerSize',15,'MarkerFaceColor','g'); hold on; end end end
64
Appendix H: Direct vs. Vincenty’s direct geodetic problem, source code for Matlab
% Direct vs. Vincenty's direct methods % % Jure Kop (2008), KTH, Stockholm, Sweden clear, clc, clf, format long g; e2 = 0.00694; a = 6378000; tol = 1e-12; fid = -50; fi = deg2rad(fid); lad = 0; la = deg2rad(lad); a1d = 50 ; a1 = deg2rad(a1d); s = 100000:100000:1000000; fi_s = size(fi,2); la_s = size(la,2); az_s = size(a1d,2); s_s = size(s,2); xlabel 'long [deg]'; ylabel 'lat [deg]'; title 'Direct vs. Vincenty''s direct geodetic problem'; hold on; couint = 0; for i=1:fi_s for k=1:az_s for l=1:s_s for j=1:la_s disp(sprintf('%d', couint)); [fi2, la2, az2, mdir] = direct(fi(i),la(j),s(l),a1(k),e2,a,tol); [lat2,lon2,derr,aerr] = vinc_dir(fid(i),lad(j),s(l),a1d(k)); couint = couint + 1; test8(couint,1) = couint; test8(couint,2) = fid(i); test8(couint,3) = lad(j); test8(couint,5) = rad2deg(fi2); test8(couint,6) = lat2; test8(couint,7) = abs(rad2deg(fi2) - lat2); test8(couint,9) = rad2deg(la2); test8(couint,10) = lon2; test8(couint,11) = abs(rad2deg(la2) - lon2); test8(couint,13) = s(l); test8(couint,14) = a1d(k); plot(lon2,lat2,'o','MarkerSize',5,'MarkerFaceColor','r'); hold on;axis 'equal', plot(rad2deg(la2),rad2deg(fi2),'o','MarkerSize',10); hold on; if ((abs(rad2deg(fi2) - lat2)> 0.000277778 || abs(rad2deg(la2) - lon2) > 0.000277778 )) plot(rad2deg(la2),rad2deg(fi2),'x','MarkerSize',15); hold on; end end end end end
65
Appendix I: Indirect vs. Vincenty’s indirect geodetic problem, source code for Matlab
% Indirect vs. Vincenty's indirect methods % % Jure Kop (2008), KTH, Stockholm, Sweden clear, clc, clf, format long g; e2 = 0.00694; a = 6378000; tol = 1e-12; fi1 = 0; fi1 = deg2rad(fi1); la1 = 0; la1 = deg2rad(la1); fi2 = 0:10:90; fi2 = deg2rad(fi2); la2 = 0:10:180; la2 = deg2rad(la2); xlabel 'long [deg]'; ylabel 'lat [deg]'; title 'Indirect vs. Vincenty''s indirect geodetic problem'; hold on; cou = 0; for i=1:size(fi2,2) for j=1:size(la2,2) cou = cou + 1; disp(sprintf('%d', cou)); [az1,az2,s] = indirect(fi1,la1,fi2(i),la2(j),e2,a,tol); [sV,az1V,az2V] = vinc_inv(rad2deg(fi1),rad2deg(la1),rad2deg(fi2(i)),rad2deg(la2(j))); az1 = rad2deg(az1); az2 = rad2deg(az2); testVvV(cou,1) = az1; testVvV(cou,2) = az1V; testVvV(cou,3) = abs(az1-az1V); testVvV(cou,5) = s; testVvV(cou,6) = sV; testVvV(cou,7) = abs(s-sV); testVvV(cou,8) = cou; %plot all plot(rad2deg(la2(j)),rad2deg(fi2(i)),'o','MarkerSize',5,'MarkerFaceColor','r'); hold on; msg = int2str(cou); if abs(az1 - az1V) > 1*0.000277778 || abs(s-sV) > 0.001 plot(rad2deg(la2(j)),rad2deg(fi2(i)),'o','MarkerSize',10,'MarkerFaceColor','r'); hold on; end if abs(az1 - az1V) > 10*0.000277778 || abs(s-sV) > 1 plot(rad2deg(la2(j)),rad2deg(fi2(i)),'o','MarkerSize',10,'MarkerFaceColor','k'); hold on; end if abs(az1 - az1V) > 30*0.000277778 || abs(s-sV) > 10 plot(rad2deg(la2(j)),rad2deg(fi2(i)),'o','MarkerSize',15,'MarkerFaceColor','k'); hold on; end % text(rad2deg(la2(j)),rad2deg(fi2(i)),msg); end end
66
Reports in Geographic Information Technology 2006-2008
The TRITA-GIT Series - ISSN 1653-5227
2006 06-001 Uliana Danila. Corrective surface for GPS-levelling in Moldova. Master of Science thesis in
geodesy No. 3089. Supervisor: Lars Sjöberg. TRITA-GIT EX 06-001. January 2006. 06-002 Ingemar Lewén. Use of gyrotheodolite in underground control network. Master of Science thesis in
geodesy No. 3090. Supervisor: Erick Asenjo. TRITA-GIT EX 06-002. January 2006. 06-003 Johan Tornberg. Felfortplantningsanalys i GIS-projekt genom Monte Carlo-simulering. Master of
Science thesis in geoinformatics. Supervisor: Mats Dunkars. TRITA-GIT EX 06-003. February 2006.
06-004 Constantin-Octavian Andrei. 3D affine coordinate transformations. Master of Science thesis in
geodesy No. 3091. Supervisor: Huaan Fan. TRITA-GIT EX 06-004. March 2006. 06-005 Helena von Malmborg. Jämförelse av Epos och nätverks-DGPS. Master of Science thesis in
geodesy No. 3092. Supervisor: Milan Horemuz. TRITA-GIT EX 06-005. March 2006. 06-006 Lina Ståhl. Uppskattning av kloridhalt i brunnar - modellering och visualisering med hjälp av SAS-
Bridge. Master of Science thesis in geoinformatics. Supervisor: Hans Hauska. TRITA-GIT EX 06-006. May 2006.
06-007 Dimitrios Chrysafinos. VRS network design considerations applicable to the topology of the
Hellenic Positioning System (HEPOS) stations. Master of Science thesis in geodesy No.3093. Supervisor: Lars Sjöberg. TRITA-GIT EX 06-007. May 2006.
06-008 Tao Zhang. Application of GIS and CARE-W systems on water distribution networks. Master of
Science thesis in geoinformatics. Supervisor: Mats Dunkars. TRITA-GIT EX 06-008. May 2006. 06-009 Krishnasamy Satish Kumar. Usability engineering for Utö tourism information system. Master of
Science thesis in geoinformatics. Supervisor: Mats Dunkars. TRITA-GIT EX 06-009. May 2006. 06-010 Irene Rangle. High resolution satellite data for mapping Landuse/land-cover in the rural-urban
fringe of the Greater Toronto area. Supervisor: Yifang Ban. TRITA-GIT EX 06-010. May 2006. 06-011 Kazi Ishtiak Ahmed. ENVISAT ASAR for land-cover mapping and change detection. Supervisor:
Yifang Ban. TRITA-GIT EX 06-011. May 2006. 06-012 Jian Liang. Synergy of ENVISAT ASAR and MERIS data for landuse/land-cover classification.
Supervisor: Yifang Ban. TRITA-GIT EX 06-012. May 2006. 06-013 Assad Shah. Systematiska effecter inom Riksavvägningen. Master of Science thesis in geodesy
No.3094. Supervisor: Tomas Egeltoft. TRITA-GIT EX 06-013. August 2006. 06-014 Erik Trehn. GPS Precise Point Positioning – An Investigation In Reachable Accuracy. Master of
Science thesis in geodesy No.3095. Supervisor: Milan Horemuz. TRITA-GIT EX 06-014. August 2006.
67
2007
07-001 Carl Schedlich. Turn at the roundabout: A practical assessment of spatial representations in two
different GPS interfaces from a pedestrian’s perspective. Bachelor of Science thesis in geoinformatics.
Supervisor: Michael Le Duc. January 2007. 07-002 Staffan Bengtsson. Förändringsanalys i ortofoton. Master of Science thesis in geoinformatics.
Supervisor: Jonas Nelson and Patric Jansson. TRITA-GIT EX 07-002. March 2007. 07-003 Joseph Addai. Qantification of temporal changes in metal loads – Moss data over 20 years. Master
of Science thesis in geoinformatics. Supervisor: Katrin Grunfeld. March 2007. 07-004 Stephen Rosewarne. Deformation study of the Vasa Ship. Bachelor of Science thesis in geodesy
No.3097. Suppervisor: Milan Horemuz. March 2007. 07-005 Naeim Dastgir. Processing SAR Data Using Range Doppler and Chirp Scaling Algorithms. Master
of Science thesis in geodesy No.3096. Supervisor: Lars Sjöberg. April 2007. 07-006 Torgny Israelsson and Youssef Shoumar. Motion Detection with GPS. Master of Science thesis in
geodesy No.3098. Supervisor: Milan Horemuz. April 2007. 07-007 Akjol Djenaliev. Multicriteria decision making and GIS for railroad planning in Kyrgyzstan. Master
of Science thesis in geoinformatics. Supervisor: Hans Hauska. May 2007. 07-008 Anna Hammar. Quality comparison of automatic 3D city house modelling methods from laser data.
Master of Science thesis in geodesy No.3099. Supervisor: Milan Horemuz. May 2007. 07-009 Md Ubydul Haque. Mapping malaria vector habitats in the dry season in Bangladesh using Spot
imagery. Master of Science thesis in geoinformatics. Supervisor: Hans Hauska. May 2007. 07-010 Jing Jiang. Analysis of the Suitable and Low-Cost Sites for Industrial Land Using Multi Criteria
Evaluation: A Case of Panzhihua, China. Master of Science thesis in geoinformatics. Supervisor: Yifang Ban. June 2007.
07-011 Raghavendra Jayamangal. Quantification of coastal erosion along Spey Bay and the Spey River
using photogrammetry and LiDAR imagery-derived DTMs. Master of Science thesis in geoinformatics. Supervisor: Yifang Ban and Jim Hansom. June 2007.
07-012 Alicia E. Porcar Lahoz. An analysis of how geographical factors affect real estate prices. Master of
Science thesis in geoinformatics. Supervisor: Yifang Ban. October 2007. 07-013 Ebenezer Kwakye Bentum. Detection of land use change in the Accra Metropolitan Area from
1990 to 2000. Master of Science thesis in geoinformatics. Supervisor: Hans Hauska. November 2007.
07-014 Jesper Gradin. Aided inertial navigation field tests using an RLG IMU. Master of Science thesis in geodesy No.3100. Supervisor: Milan Horemuz. December 2007.
2008 08-001 Wan Wen. Road Roughness Detection by analyzing IMU Data. Master of Science thesis in
geodesy No.3101. Supervisor: Milan Horemuz. Janaury 2008.
08-002 Ilias Daras. Determination of a gravimetric geoid model of Greece using the method of KTH. Master of Science thesis in geodesy No.3102. Supervisor: Huaan Fan and Kalliopi Papazissi. Janaury 2008.
08-003 Anwar Negash Surur. Surveying, modelling and visualisation of geological structures in the
Tunberget tunnel. Master of Science thesis in geoinformatics. Supervisor: Hans Hauska. February 2008.
08-004 Helena Swanh. Noggrannhetskontroll av data 3D-modell från pulsskanner och fasmätningsskanner. Master of Science thesis in geodesy No.3103. Supervisor: Milan Horemuz. March 2008.
08-005 Henrik Löfqvist. Inpassning av mätdata i inhomogena nät. Master of Science thesis in geodesy
No.3104. Supervisor: Milan Horemuz and Anders Viden. April 2008. 08-006 Cement Takyi. Lineament study in the Björkö area using satellite radar and airborne VLF data -
possible tools for groundwater prospecting. Master of Science thesis in geoinformatics. Supervisor: Herbert Henkel. June 2008.
08-007 Qarin Bånkestad. 3D data: Faktisk hantering för att kunna lagra, återfå och visualisera tredimensionell
information. Master of Science thesis in geoinformatics. Supervisor: Hans Hauska. June 2008. 08-008 Tadesse Tafesse Kebede. Development and implementation of filter algorithms and controllers to a
construction machine simulator. Master of Science thesis in geodesy No.3105. Supervisor: Lars Sjöberg. September 2008.
08-009 Gulilat Tegane Alemu. Assessments of effects on mixing different types of GPS antennas and
receivers. Master of Science thesis in geodesy No.3106. Supervisor: Lars Sjöberg. September 2008. 08-010 Jure Kop. Tests of New Solutions to the Direct and Indirect Geodetic Problems on the Ellipsoid.
Master of Science thesis in geodesy No.3107. Supervisor: Lars Sjöberg. September 2008.