Convert ECEF System To Geographic Coordinate System: Experiment No.
Convert ECEF System To Geographic Coordinate System: Experiment No.
Convert ECEF System To Geographic Coordinate System: Experiment No.
NavigationTheorem Laboratory
Electromechanical Engineering Department
3rd year
)Navigation and GuidanceEngineering Branch (
1.)Object:
The object of this experiment is to Convert Earth Center Earth Fixed (ECEF)
coordinate system given in (X, Y, Z), to Geographic Coordinate System given in
latitude, longitude, and altitude (I, L, H).
1) Thory:
The geographical latitude and longitude of a point on the earth’s surface,
determined by means of geodetic measurement of the distance (mainly by the
method of triangulation) and the bearing (azimuth) from several other points
whose geographic coordinates are known. Geodetic coordinates are calculated on
the surface of a reference ellipsoid, which is a characterization of the shape and
dimensions of the earth. Along with the geodetic coordinates of a point, its
altitude is also considered. It is calculated from the surface of the adopted
reference ellipsoid and differs from its altitude above sea level by the size of its
geoidal deviation from this ellipsoid.
1
There are many frames needed in navigation according to the requirements of the
approach problem. These frames are orthogonal (right-handed coordinate frames).
A brief description of these frames and there transformations is given below.
2
Inertial and ECEF frame
3.) Generalized spherical coordinates:
These coordinates are the nine direction cosines (Cij) of a locally level set 𝑧i(with
arbitrary azimuth) relative to the yi. They are convenient for world _wide
navigation because they exhibit no singularities physically understandable
coordinates such as latitude _ longitude must be derived from the Cij. Many
problems require transformations between two sets or orthogonal there
dimensional coordinate systems. The mathematics of the coordinate's
transformation is illustrated by the relationships between the generalized direction
cosines Cij and the latitude Φ, longitude λ, and wander angle. This transformation
is illustrated in Fig.2.
The rectangular coordinates (y1, y2,y3) are rotated through an angle λ in the
y 1' y 2' y 3' .Are rotated by an angle Φ in the y 1 y3plane and the result is the
coordinates y 1'' y 2' ' y 3'' new one are also rotated by an angle α (The wander angle) in
3
the y1y2plane. The result is the z coordinates (z1, z2,z3). The mathematics of the
coordinates transformation is illustrated by the relationship between the
generalized direction cosines Cij and the latitude Φ, longitude λ, and the wander
angle α, any vector V can be resolve into the y or z coordinates frame. The y and
z component of V are related by the equation.
4.)Procedure:
1-The mathematical equation for Converting ECEF coordinates (X, Y, Z), "given
in meters", into latitude, longitude, and altitude(height) coordinates (I, L, H),
"given in radians and meters", are illustrated in Table (1).
For a given position of Baghdad Airports coordinate in components (X, Y, Z)
which means the CEFC of the Airport:
X= 3813200 Y= 2508700 Z= 4440100
Write MATLAB program to determine latitude, longitude, and altitude(height)
(the geodetic location of the Airport)using these mathematical model:
4
Table (1): Equations of converting ECEF frame to Geodetic frame.
.No Function .No Function
a = 6378137.0(semimajor of earth
N 1(− e 2 )z 2
-1
radius axis (Equatorial radius))
)c-2(b =…6356752.3142(semiminor of earth
radius axis (Polars radius))
a− b
-12 r=
0
eN 2
1+Q
p
√ ( )
2 1
+ 0 .5 a 1+ −
Q Q 1( +Q )
e
− 0 .5pN
2
2
-2 f
=
a
-13 U= √ (p− e r )+ z 2
0 2
e
2
-3 e= √ f (2− f ) -14 V= √ (p− e r )+ (1− e
2
0
2
)z 2
e
2
p= x 2+ y b ze
-4 √ e e2
-15 z=
0
Va
2 2 a
-5 E=
2 a− b
-16 e =' e
b
b2
-6 F=45 b 2 z
e
2 -17 H=U 1− 242
Va
/( )
z e+ (e ')2 z 0
2
(− e 2 )z −
-7 G= p + 1
2
2 e E
e
2 -18 L=nat −1
( p
0∗81 ) i/p
4 2
epF
-8 c= -19 l naat 2 ( y e ,x e0∗
= )81 /ip
G3
1 /3
-9 s= (1+ c+ √ c 2+ 2 c )
F
N= 2
-10 1
(
3 s+ + 1 G
s ) 2
-11 Q= √ 1+ 2 e 4N
5
4- Discussion:
1- Compare between the two results of conversions, mathematical model (1),
and the MATLAB function (2), discuss if there are deference in the results?
Sol:
Matlab Code
clc
clear all
;x = ecef(1)
;y = ecef(2)
;z = ecef(3)
;a = 6378137.0 %
;b = 6335439.3273 %
;f = (a - b) / a %
;e = sqrt(f * (2 - f)) %
;p = sqrt(x^2 + y^2) %
;F = 54 * b^2 * z^2 %
;s = (1 + c + sqrt(c^2 + 2 * c))^(1/3) %
;Q = sqrt(1 + 2 * e^4 * P) %
6
ro = P * e^2 * p / (1 + Q) + sqrt(0.5 * a^2 * (1 + 1/Q) - P * (1 - e^2) * z^2 / (Q * (Q +1)) - 0.5 * P * %
;p^2)
;z0 = b^2 * z / (a * V) %
;e_ = a / b * e %
Simulation Results
= ecef
= lla
44.5931
33.3409
41.4022
2- Discussthe mean differences between the ECEF frame and geodetic frame?
7
different types of conversion: format change of geographic coordinates,
conversion of coordinate systems, or transformation to different geodetic
datums. Geographic coordinate conversion has applications in cartography,
surveying, navigation and geographic information systems.