KDIS  2-8-x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
KConversions.h
Go to the documentation of this file.
1 /*********************************************************************
2 Copyright 2013 Karl Jones
3 All rights reserved.
4 
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are met:
7 
8 1. Redistributions of source code must retain the above copyright notice, this
9  list of conditions and the following disclaimer.
10 2. Redistributions in binary form must reproduce the above copyright notice,
11  this list of conditions and the following disclaimer in the documentation
12  and/or other materials provided with the distribution.
13 
14 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
15 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
18 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
21 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 
25 For Further Information Please Contact me at
26 Karljj1@yahoo.com
27 http://p.sf.net/kdis/UserGuide
28 *********************************************************************/
29 
30 /********************************************************************
31  KConversions
32  created: 18/12/2008
33  author: Karl Jones
34 
35  purpose: Holds all common conversions, Datum conversion,
36  unit conversion etc
37 *********************************************************************/
38 
39 #pragma once
40 
41 #include "./../KDefines.h"
42 
43 #ifndef _USE_MATH_DEFINES
44  #define _USE_MATH_DEFINES
45 #endif
46 
47 #include <math.h>
48 
49 namespace KDIS {
50 namespace UTILS {
51 
52 /************************************************************************/
53 /* Conversions to and from radians / degrees */
54 /************************************************************************/
55 
56 template<class Type>
57 inline Type RadToDeg( Type Rad )
58 {
59  return Rad * ( 180.0 / M_PI );
60 };
61 
62 template<class Type>
63 inline Type DegToRad( Type Deg )
64 {
65  return Deg * ( M_PI / 180.0 );
66 };
67 
68 /************************************************************************/
69 /* Conversions to and from feet / meters */
70 /************************************************************************/
71 
72 template<class Type>
73 inline Type FeetToMeters( Type Feet )
74 {
75  return Feet / 3.2808;
76 };
77 
78 //////////////////////////////////////////////////////////////////////////
79 
80 template<class Type>
81 inline Type MetersToFeet( Type Meters )
82 {
83  return Meters * 3.2808;
84 };
85 
86 /************************************************************************/
87 /* Conversions to and from Geocentric / Geodetic - ECEF / LLA */
88 /************************************************************************/
89 
90 // Refrence Ellipsoids, data taken from Wikipedia and DoD, WGS84, DMA TR 8350.2-B,1 Sept. 1991
91 
93 {
121 };
122 
123 //////////////////////////////////////////////////////////////////////////
124 
125 template<class Type>
126 inline void GetEllipsoidAxis( RefEllipsoid R, Type & MajorAxis, Type & MinorAxis )
127 {
128  switch( R )
129  {
130  case Airy:
131  MajorAxis = 6377563.396;
132  MinorAxis = 6356256.909;
133  // 1/F 299.324965
134  break;
135 
136  case Airy_Modified:
137  MajorAxis = 6377340.189;
138  MinorAxis = 6356034.448;
139  // 1/F 299.324965
140  break;
141 
142  case Australian_National:
143  MajorAxis = 6378160.000;
144  MinorAxis = 6356774.719;
145  // 1/F 298.250000
146  break;
147 
148  case Bessel_1841:
149  MajorAxis = 6377397.155;
150  MinorAxis = 6356078.963;
151  // 1/F 299.152813
152  break;
153 
154  case Bessel_1841_Namibia:
155  MajorAxis = 6377483.865;
156  MinorAxis = 6356078.963;
157  // 1/F 299.152813
158  break;
159 
160  case Clarke_1866:
161  MajorAxis = 6378206.400;
162  MinorAxis = 6356583.800;
163  // 1/F 294.978698
164  break;
165 
166  case Clarke_1880:
167  MajorAxis = 6378249.145;
168  MinorAxis = 6356514.870;
169  // 1/F 293.465000
170  break;
171 
173  MajorAxis = 6377298.556;
174  MinorAxis = 6356097.550;
175  // 1/F 300.801700
176  break;
177 
178  case Everest_1830:
179  MajorAxis = 6377276.345;
180  MinorAxis = 6356075.413;
181  // 1/F 300.801700
182  break;
183 
184  case Everest_1948:
185  MajorAxis = 6377304.063;
186  MinorAxis = 6356103.039;
187  // 1/F 300.801700
188  break;
189 
190  case Everest_1956:
191  MajorAxis = 6377301.243;
192  MinorAxis = 6356100.228;
193  // 1/F 300.801700
194  break;
195 
196  case Everest_1969:
197  MajorAxis = 6377295.664;
198  MinorAxis = 6356094.668;
199  // 1/F 300.801700
200  break;
201 
202  case Fischer_1960:
203  MajorAxis = 6378166.000;
204  MinorAxis = 6356784.284;
205  // 1/F 298.300000
206  break;
207 
209  MajorAxis = 6378155.000;
210  MinorAxis = 6356773.320;
211  // 1/F 298.300000
212  break;
213 
214  case Fischer_1968:
215  MajorAxis = 6378150.000;
216  MinorAxis = 6356768.337;
217  // 1/F 298.300000
218  break;
219 
220  case GRS_1980:
221  MajorAxis = 6378137.000;
222  MinorAxis = 6356752.314;
223  // 1/F 298.257222
224  break;
225 
226  case Helmert_1906:
227  MajorAxis = 6378200.000;
228  MinorAxis = 6356818.170;
229  // 1/F 298.300000
230  break;
231 
232  case Hough:
233  MajorAxis = 6378270.000;
234  MinorAxis = 6356794.343;
235  // 1/F 297.000000
236  break;
237 
238  case International_1924:
239  MajorAxis = 6378388.000;
240  MinorAxis = 6356911.946;
241  // 1/F 297.000000
242  break;
243 
244  case Karsovsky_1940:
245  MajorAxis = 6378245.000;
246  MinorAxis = 6356863.019;
247  // 1/F 298.300000
248  break;
249 
250  case SGS_1985:
251  MajorAxis = 6378136.000;
252  MinorAxis = 6356751.302;
253  // 1/F 298.257000
254  break;
255 
256  case South_American_1969:
257  MajorAxis = 6378160.000;
258  MinorAxis = 6356774.719;
259  // 1/F 298.250000
260  break;
261 
262  case Sphere_6371km:
263  MajorAxis = 6371000;
264  MinorAxis = 6371000;
265  break;
266 
267  case WGS_1960:
268  MajorAxis = 6378165.000;
269  MinorAxis = 6356783.287;
270  // 1/F 298.300000
271  break;
272 
273  case WGS_1966:
274  MajorAxis = 6378145.000;
275  MinorAxis = 6356759.769;
276  // 1/F 298.250000
277  break;
278 
279  case WGS_1972:
280  MajorAxis = 6378135.000;
281  MinorAxis = 6356750.520;
282  // 1/F 298.260000
283  break;
284 
285  case WGS_1984:
286  MajorAxis = 6378137.000;
287  MinorAxis = 6356752.314245;
288  // 1/F 298.257224
289  break;
290  }
291 };
292 
293 //////////////////////////////////////////////////////////////////////////
294 
295 template<class Type>
296 inline void DecimalToDMS( Type Decimal, Type & DegOUT, Type & MinOUT, Type & SecOUT )
297 {
298  Decimal = abs( Decimal ); // Make sure the value is not negative
299  DegOUT = ( KUINT32 )Decimal;
300  Decimal -= DegOUT; // Degrees
301 
302  MinOUT = Decimal * 60.0;
303 
304  Decimal = MinOUT - ( KUINT32 )MinOUT;
305 
306  MinOUT = ( KUINT32 )MinOUT; // Minutes
307  SecOUT = Decimal * 60.0; // Seconds
308 };
309 
310 //////////////////////////////////////////////////////////////////////////
311 
312 template<class Type>
313 inline Type DMSToDecimal( Type Deg, Type Min, Type Sec )
314 {
315  return Deg + ( Min / 60.0 ) + ( Sec / 3600.0 );
316 };
317 
318 //////////////////////////////////////////////////////////////////////////
319 
320 //************************************
321 // FullName: KDIS::UTILS<Type>::GeodeticToGeocentric
322 //!Description: Converts Geodetic coords to Geocentric Cartesian.
323 // Parameter: Type GeodeticLat - in degrees
324 // Parameter: Type GeodeticLon - in degrees
325 // Parameter: Type GeodeticHeight - in meters
326 // Parameter: Type & GeocentricX
327 // Parameter: Type & GeocentricY
328 // Parameter: Type & GeocentricZ
329 // Parameter: RefEllipsoid R
330 //************************************
331 
332 template<class Type>
333 inline void GeodeticToGeocentric( Type GeodeticLat, Type GeodeticLon, Type GeodeticHeight,
334  Type & GeocentricX, Type & GeocentricY, Type & GeocentricZ,
335  RefEllipsoid R )
336 {
337  GeodeticLat = DegToRad( GeodeticLat );
338  GeodeticLon = DegToRad( GeodeticLon );
339 
340  Type MajorAxis, MinorAxis;
341  GetEllipsoidAxis( R, MajorAxis, MinorAxis );
342 
343  Type Esq = ( pow( MajorAxis, 2 ) - pow( MinorAxis, 2 ) ) / pow( MajorAxis, 2 );
344  Type V = MajorAxis / sqrt( 1 - ( Esq * pow( sin( GeodeticLat ), 2 ) ) );
345 
346  GeocentricX = ( V + GeodeticHeight ) * cos( GeodeticLat ) * cos( GeodeticLon );
347  GeocentricY = ( V + GeodeticHeight ) * cos( GeodeticLat ) * sin( GeodeticLon );
348  GeocentricZ = ( ( 1 - Esq ) * V + GeodeticHeight ) * sin( GeodeticLat );
349 };
350 
351 //////////////////////////////////////////////////////////////////////////
352 // Author: Tim Jones
353 
354 //************************************
355 // FullName: KDIS::UTILS<Type>::GeocentricToGeodetic
356 //!Description: Converts Geocentric Cartesian coords to Geodetic.
357 // Parameter: Type x - in radians
358 // Parameter: Type y - in radians
359 // Parameter: Type z - in radians
360 // Parameter: Type & lat
361 // Parameter: Type & lon
362 // Parameter: Type & alt
363 // Parameter: RefEllipsoid R
364 //************************************
365 
366 template<class Type>
367 inline void GeocentricToGeodetic( Type x, Type y, Type z,Type & lat, Type & lon, Type & alt, RefEllipsoid R )
368 {
369  Type a, b, t;
370 
371  GetEllipsoidAxis( R, a, b );
372 
373  Type const e2 = 1.0 - ( b * b ) / ( a * a ) ; // 1st eccentricity sqrd
374  Type const ed2 = ( a * a ) / ( b * b ) - 1.0 ; // 2nd eccentricity sqrd
375  Type const a2 = a * a ;
376  Type const b2 = b * b ;
377  Type const z2 = z * z ;
378  Type const e4 = e2 * e2 ;
379  Type const r2 = x * x + y * y ;
380  Type const r = sqrt( r2 );
381 
382  Type E2 = a2 - b2 ;
383 
384  Type F = 54.0 * b2 * z2 ;
385 
386  Type G = r2 + ( 1.0 - e2 ) * z2 - e2 * E2 ;
387 
388  Type C = e4 * F * r2 / ( G * G * G );
389 
390  Type S = pow( 1.0 + C + sqrt( C * C + 2.0 * C ) , 1.0 / 3.0 );
391 
392  t = S + 1.0 / S + 1.0 ;
393 
394  Type P = F / ( 3.0 * t * t * G * G );
395 
396  Type Q = sqrt( 1.0 + 2.0 * e4 * P );
397 
398  Type r0 = -( P * e2 * r ) / ( 1.0 + Q ) + sqrt( 0.5 * a2 * ( 1.0 + 1.0 / Q ) - ( P * ( 1 - e2 ) * z2 ) / ( Q * ( 1.0 + Q ) ) - 0.5 * P * r2 );
399 
400  t = r - e2 * r0;
401  Type U = sqrt( t * t + z2 );
402  Type V = sqrt( t * t + ( 1.0 - e2 ) * z2 );
403 
404  t = b2 / ( a * V );
405 
406  alt = U * ( 1.0 - t );
407  lat = atan2( z + ed2 * t * z , r );
408  lon = atan2( y, x );
409 
410  // convert to degrees
411  lat = RadToDeg( lat );
412  lon = RadToDeg( lon );
413 };
414 
415 //////////////////////////////////////////////////////////////////////////
416 
417 template<class Type>
418 inline void RotateAboutAxis( Type d[3] ,Type const s[3] ,Type const n[3] ,Type t )
419 {
420  double st = sin( t );
421  double ct = cos( t );
422 
423  d[0] = (1.0-ct)*(n[0]*n[0]*s[0] + n[0]*n[1]*s[1] + n[0]*n[2]*s[2]) + ct*s[0] + st*(n[1]*s[2]-n[2]*s[1]);
424  d[1] = (1.0-ct)*(n[0]*n[1]*s[0] + n[1]*n[1]*s[1] + n[1]*n[2]*s[2]) + ct*s[1] + st*(n[2]*s[0]-n[0]*s[2]);
425  d[2] = (1.0-ct)*(n[0]*n[2]*s[0] + n[1]*n[2]*s[1] + n[2]*n[2]*s[2]) + ct*s[2] + st*(n[0]*s[1]-n[1]*s[0]);
426 };
427 
428 template<class Type>
429 inline void Cross( Type d[3] ,Type const a[3] ,Type const b[3] )
430 {
431  d[0] = a[1] * b[2] - b[1] * a[2] ;
432  d[1] = b[0] * a[2] - a[0] * b[2] ;
433  d[2] = a[0] * b[1] - b[0] * a[1] ;
434 };
435 
436 template<class Type>
437 inline double Dot( Type const a[3] ,Type const b[3] )
438 {
439  return a[0]*b[0] + a[1]*b[1] + a[2]*b[2];
440 };
441 
442 //************************************
443 // FullName: KDIS::UTILS<Type>::HeadingPitchRollToEuler
444 //!Description: Converts Heading, Pitch and Roll to Euler for DIS.
445 // Parameter: Type H - Heading in radians
446 // Parameter: Type P - Pitch in radians
447 // Parameter: Type R - Roll in radians
448 // Parameter: Type Lat - Geodetic Latitude in radians
449 // Parameter: Type Lon - Geodetic Longitude in radians
450 // Parameter: Type & Psi - Euler angle out
451 // Parameter: Type & Theta - Euler angle out
452 // Parameter: Type & Phi - Euler angle out
453 //************************************
454 
455 template<class Type>
456 inline void HeadingPitchRollToEuler( Type H, Type P, Type R, Type Lat, Type Lon, Type & Psi, Type & Theta,
457  Type & Phi )
458 {
459  // local NED
460  Type const D0[3] = { 1.0 , 0.0 , 0.0 };
461  Type const E0[3] = { 0.0 , 1.0 , 0.0 };
462  Type const N0[3] = { 0.0 , 0.0 , 1.0 };
463  Type me[3];
464  Type N[3];
465  Type E[3];
466  Type D[3];
467  // 'E'
468  RotateAboutAxis( E , E0 , N0 , Lon );
469  me[0] = -E[0] ;
470  me[1] = -E[1] ;
471  me[2] = -E[2] ;
472  // 'N'
473  RotateAboutAxis( N , N0 , me , Lat );
474  // 'D'
475  Cross( D , N , E );
476  /*
477  * Orientation
478  */
479  // rotate about D by heading
480  Type N1[3] , E1[3] , D1[3] ;
481  RotateAboutAxis( N1 , N , D , H );
482  RotateAboutAxis( E1 , E , D , H );
483  memcpy( D1 , D , sizeof( Type[3] ) );
484  // rotate about E1 vector by pitch
485  Type N2[3] , E2[3] , D2[3] ;
486  RotateAboutAxis( N2 , N1 , E1 , P );
487  memcpy( E2 , E1 , sizeof( Type[3] ) );
488  RotateAboutAxis( D2 , D1 , E1 , P );
489  // rotate about N2 by roll
490  Type N3[3] , E3[3] , D3[3] ;
491  memcpy( N3 , N2 , sizeof( Type[3] ) );
492  RotateAboutAxis( E3 , E2 , N2 , R );
493  RotateAboutAxis( D3 , D2 , N2 , R );
494 
495  // calculate angles from vectors
496  Type x0[3] = { 1.0 , 0.0 , 0.0 }; // == D0
497  Type y0[3] = { 0.0 , 1.0 , 0.0 }; // == E0
498  Type z0[3] = { 0.0 , 0.0 , 1.0 }; // == Z0
499  Type y2[3] ;
500  Type z2[3] ;
501  Psi = atan2( Dot( N3 , y0 ) , Dot( N3 , x0 ) );
502  Theta = atan2( -Dot( N3 , z0 ) , sqrt( pow(Dot( N3 , x0 ), 2) + pow(Dot( N3 , y0 ), 2) ) );
503  RotateAboutAxis( y2 , y0 , z0 , Psi );
504  RotateAboutAxis( z2 , z0 , y2 , Theta );
505  Phi = atan2( Dot( E3 , z2 ) , Dot( E3 , y2 ) );
506 };
507 
508 //////////////////////////////////////////////////////////////////////////
509 
510 //************************************
511 // FullName: KDIS::UTILS<Type>::EulerToHeadingPitchRoll
512 //!Description: Converts Euler to Heading, Pitch and Roll.
513 // Parameter: Type Lat - Geodetic Latitude in radians
514 // Parameter: Type Lon - Geodetic Longitude in radians
515 // Parameter: Type Psi - Euler angle
516 // Parameter: Type Theta - Euler angle
517 // Parameter: Type Phi - Euler angle
518 // Parameter: Type & H - Heading in radians out
519 // Parameter: Type & P - Pitch in radians out
520 // Parameter: Type & R - Roll in radians out
521 //************************************
522 
523 template<class Type>
524 void EulerToHeadingPitchRoll( Type Lat, Type Lon, Type Psi, Type Theta, Type Phi, Type & H, Type & P, Type & R )
525 {
526  // local NED vectors in ECEF coordinate frame
527  Type N[3] ;
528  Type E[3] ;
529  Type D[3] ;
530 
531  // Calculate NED from lat and lon
532  // local NED
533  Type const D0[3] = { 1. , 0. , 0. };
534  Type const E0[3] = { 0. , 1. , 0. };
535  Type const N0[3] = { 0. , 0. , 1. };
536  Type me[3] ;
537  // 'E'
538  RotateAboutAxis( E , E0 , N0 , Lon );
539  me[0] = -E[0] ;
540  me[1] = -E[1] ;
541  me[2] = -E[2] ;
542  // 'N'
543  RotateAboutAxis( N , N0 , me , Lat );
544  // 'D'
545  Cross( D , N , E );
546  /*
547  * Orientation:
548  * input : (x0,y0,z0)=(N,E,D) and (Psi,Theta,Phi Euler angles)
549  * output: (x3,y3,z3)=body vectors in local frame
550  */
551  // rotate about Z by Psi
552  Type X[]= {1.,0.,0.};
553  Type Y[]= {0.,1.,0.};
554  Type Z[]= {0.,0.,1.};
555  Type X1[3] , Y1[3] , Z1[3] ;
556  RotateAboutAxis( X1 , X , Z , Psi );
557  RotateAboutAxis( Y1 , Y , Z , Psi );
558  memcpy( Z1 , Z , sizeof( Type[3] ) );
559  // rotate about Y1 vector by Theta
560  Type X2[3] , Y2[3] , Z2[3] ;
561  RotateAboutAxis( X2 , X1 , Y1 , Theta );
562  memcpy( Y2 , Y1 , sizeof( Type[3] ) );
563  RotateAboutAxis( Z2 , Z1 , Y1 , Theta );
564  // rotate about X2 by Phi
565  Type X3[3] , Y3[3] , Z3[3] ;
566  memcpy( X3 , X2 , sizeof( Type[3] ) );
567  RotateAboutAxis( Y3 , Y2 , X2 , Phi );
568  RotateAboutAxis( Z3 , Z2 , X2 , Phi );
569  // calculate angles from vectors
570  Type x0[3];
571  memcpy( x0 , N , sizeof( Type[3] ) );
572  Type y0[3];
573  memcpy( y0 , E , sizeof( Type[3] ) );
574  Type z0[3];
575  memcpy( z0 , D , sizeof( Type[3] ) );
576  Type y2[3] ;
577  Type z2[3] ;
578  H = atan2( Dot( X3 , y0 ) , Dot( X3 , x0 ) );
579  P = atan2( -Dot( X3 , z0 ) , sqrt( pow(Dot( X3 , x0 ), 2) + pow(Dot( X3 , y0 ), 2) ) );
580  RotateAboutAxis( y2 , y0 , z0 , H );
581  RotateAboutAxis( z2 , z0 , y2 , P );
582  R = atan2( Dot( Y3 , z2 ) , Dot( Y3 , y2 ) );
583 }
584 
585 } // END namespace UTILS
586 } // END namespace KDIS
void GetEllipsoidAxis(RefEllipsoid R, Type &MajorAxis, Type &MinorAxis)
Definition: KConversions.h:126
unsigned int KUINT32
Definition: KDefines.h:103
Definition: KConversions.h:100
Definition: KConversions.h:95
Type DegToRad(Type Deg)
Definition: KConversions.h:63
Definition: KConversions.h:94
Definition: KConversions.h:110
Definition: KConversions.h:119
void Cross(Type d[3], Type const a[3], Type const b[3])
Definition: KConversions.h:429
void GeocentricToGeodetic(Type x, Type y, Type z, Type &lat, Type &lon, Type &alt, RefEllipsoid R)
Description: Converts Geocentric Cartesian coords to Geodetic.
Definition: KConversions.h:367
Definition: KConversions.h:109
Definition: KConversions.h:106
void DecimalToDMS(Type Decimal, Type &DegOUT, Type &MinOUT, Type &SecOUT)
Definition: KConversions.h:296
Definition: KConversions.h:102
RefEllipsoid
Definition: KConversions.h:92
Definition: KConversions.h:101
Definition: KConversions.h:108
Type DMSToDecimal(Type Deg, Type Min, Type Sec)
Definition: KConversions.h:313
Definition: KConversions.h:107
Definition: KConversions.h:104
double Dot(Type const a[3], Type const b[3])
Definition: KConversions.h:437
Definition: KConversions.h:116
Definition: KConversions.h:115
Type FeetToMeters(Type Feet)
Definition: KConversions.h:73
void HeadingPitchRollToEuler(Type H, Type P, Type R, Type Lat, Type Lon, Type &Psi, Type &Theta, Type &Phi)
Description: Converts Heading, Pitch and Roll to Euler for DIS.
Definition: KConversions.h:456
void EulerToHeadingPitchRoll(Type Lat, Type Lon, Type Psi, Type Theta, Type Phi, Type &H, Type &P, Type &R)
Description: Converts Euler to Heading, Pitch and Roll.
Definition: KConversions.h:524
Definition: KConversions.h:118
Definition: KConversions.h:117
Definition: KConversions.h:99
Definition: KConversions.h:105
Definition: KConversions.h:113
Type RadToDeg(Type Rad)
Definition: KConversions.h:57
void RotateAboutAxis(Type d[3], Type const s[3], Type const n[3], Type t)
Definition: KConversions.h:418
Definition: KConversions.h:111
Type MetersToFeet(Type Meters)
Definition: KConversions.h:81
Definition: KConversions.h:120
Definition: KConversions.h:96
Definition: KConversions.h:114
Definition: KConversions.h:98
void GeodeticToGeocentric(Type GeodeticLat, Type GeodeticLon, Type GeodeticHeight, Type &GeocentricX, Type &GeocentricY, Type &GeocentricZ, RefEllipsoid R)
Description: Converts Geodetic coords to Geocentric Cartesian.
Definition: KConversions.h:333
Definition: KConversions.h:112
Definition: KConversions.h:103
Definition: KConversions.h:97