Download MASTER`S THESIS
Transcript
Example for an application specific function may be seen in Listing F.4. This function transforms geodetic
coordinates into Cartesian coordinates.
Listing F.4: Function for the change of geodetic coordinates into cartesian coordinates.
{
−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
−−−−−−−Change g e o d e t i c t o c a r t e s i a n c o o r d i n a t e s −−−−−−−−−
−−P. 2 7 9 from B. Hofmann−Wellenhof , H. L i c h t e n e g g e r , and−
−−J . C o l l i n s : GPS, Theory and P r a c t i c e . F i f t h e d i t i o n −−−
−−−−−−−−−−−−−−−SpringerWienNewYork , 2001−−−−−−−−−−−−−−−−
−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
}
function TPTU46TrackerF . T o C a r t e s i a n ( i n p u t : G e o d e t i c ) : C a r t e s i a n ;
var
a , b : r e a l ; {Semi−major and semi−minor a x i s o f e l l i p s o i d }
N: r e a l ; { Radius o f c u r v a t u r e }
begin
{WGS 84 p a r a m e t e r s }
a := 6 3 7 8 1 3 7 . 0 ;
b := 6 3 5 6 7 5 2 . 3 ;
{ Calculate radius of curvature }
N := a * a / ( s q r t ( a * a * c o s ( i n p u t . l a t ) * c o s ( i n p u t . l a t ) +
b*b * s i n ( i n p u t . l a t ) * s i n ( i n p u t . l a t ) ) ) ;
{ Calculate Cartesian coordinates }
T o C a r t e s i a n .X := (N+i n p u t . a l t ) * c o s ( i n p u t . l a t ) * c o s ( i n p u t . l o n ) ;
T o C a r t e s i a n .Y := (N+i n p u t . a l t ) * c o s ( i n p u t . l a t ) * s i n ( i n p u t . l o n ) ;
T o C a r t e s i a n . Z := ( ( ( b * b ) / ( a * a ) ) * N + i n p u t . a l t ) * s i n ( i n p u t . l a t ) ;
end ;
65