52 #ifndef __PCL_Position_h
53 #define __PCL_Position_h
104 , muAlpha( x.muAlpha )
105 , muDelta( x.muDelta )
160 double properMotionRA = 0,
double properMotionDec = 0,
162 double radialVelocity = 0,
164 : alpha( ((ra =
Mod( ra, 360.0 )) < 0) ? ra + 360 : ra )
165 , delta(
Range( dec, -90.0, +90.0 ) )
166 , muAlpha( properMotionRA )
167 , muDelta( properMotionDec )
169 , v( radialVelocity )
176 uint64 m_uniqueId = UniqueId();
199 double a = ea_eq_radius_IAU2009;
200 double f = ea_flattening_IERS2010;
202 bool cioBased =
false;
207 constexpr
static double ea_eq_radius_IAU2009 = 6378136.6;
212 constexpr
static double ea_flattening_IERS2010 = 1/298.25642;
282 double equatorialRadius = ea_eq_radius_IAU2009,
283 double flattening = ea_flattening_IERS2010,
285 bool useCIO =
false )
286 : lambda( ((longitude =
Mod( longitude, 360.0 )) < 0) ? longitude + 360 : longitude )
287 , phi(
Range( latitude, -90.0, +90.0 ) )
288 , h(
Max( 0.0, height ) )
289 , a(
Max( 0.0, equatorialRadius ) )
290 , f(
Max( 0.0, flattening ) )
291 , r0( regionalCenter )
417 (void)Geometric( H );
431 (void)Geometric( S );
444 return True( H ).L2Norm();
462 return True( S ).L2Norm();
474 (void)Geometric( H );
779 void SetGeocentric();
819 return m_usePolarMotion;
828 m_usePolarMotion = enable;
837 EnablePolarMotion( !disable );
982 void InitEquinoxBasedParameters();
1001 void InitCIOBasedParameters();
1011 InitEquinoxBasedParameters();
1024 InitEquinoxBasedParameters();
1037 InitCIOBasedParameters();
1051 InitCIOBasedParameters();
1064 InitEquinoxBasedParameters();
1065 return Vector( m_X, m_Y );
1096 InitEquinoxBasedParameters();
1108 InitEquinoxBasedParameters();
1120 InitEquinoxBasedParameters();
1132 InitEquinoxBasedParameters();
1142 if ( m_M.IsEmpty() )
1143 return AsRad(
Poly( m_TT, { 84381.406, -46.836769, -0.0001831, 0.00200340, -0.000000576, -0.0000000434 } ) );
1156 InitEquinoxBasedParameters();
1157 return DPoint( m_dpsi, m_deps );
1238 return Vector( q[0], q[1]*ce + q[2]*se, q[2]*ce - q[1]*se );
1255 double se, ce;
SinCos( eps, se, ce );
1256 return EquatorialToEcliptic( q, se, ce );
1294 double se, ce;
SinCos( eps, se, ce );
1295 return EquatorialToEcliptic( q, se, ce );
1315 return Vector( q[0], q[1]*ce - q[2]*se, q[2]*ce + q[1]*se );
1332 double se, ce;
SinCos( eps, se, ce );
1333 return EclipticToEquatorial( q, se, ce );
1371 double se, ce;
SinCos( eps, se, ce );
1372 return EclipticToEquatorial( q, se, ce );
1410 return Matrix( +0.494055821648, -0.054657353964, -0.445679169947,
1411 -0.872844082054, -0.484928636070, +0.746511167077,
1412 -0.867710446378, -0.198779490637, +0.455593344276 )*q;
1463 double m_gamb, m_phib, m_psib, m_epsa;
1465 double m_dpsi, m_deps;
1504 bool m_isMoon =
false, m_isSun =
false, m_isStar =
false;
1508 bool m_usePolarMotion =
true;
1511 uint64 m_uniqueObjectId = 0;
1514 bool Validate(
const T& obj )
1516 if ( obj.m_uniqueId != m_uniqueObjectId )
1518 m_U0 = m_U = m_ub = m_u1 = m_u2 = m_u3e = m_u3i =
Vector();
1520 m_isMoon = m_isSun = m_isStar =
false;
1521 m_uniqueObjectId = obj.m_uniqueId;
1530 static double CIOLocator(
double T,
double X,
double Y );
1535 constexpr
static double au_km = 149597870.7;
1536 constexpr
static double c_km_s = 299792.458;
1537 constexpr
static double c_km_day = c_km_s*86400;
1538 constexpr
static double c_au_day = (c_km_s/au_km)*86400;
1539 constexpr
static double earth_omega = 7.292115e-5;
1546 #endif // __PCL_Position_h