本文整理汇总了C++中SkyPoint::precessFromAnyEpoch方法的典型用法代码示例。如果您正苦于以下问题:C++ SkyPoint::precessFromAnyEpoch方法的具体用法?C++ SkyPoint::precessFromAnyEpoch怎么用?C++ SkyPoint::precessFromAnyEpoch使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SkyPoint
的用法示例。
在下文中一共展示了SkyPoint::precessFromAnyEpoch方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: vRSun
double SkyPoint::vRSun(long double jd0) {
double ca, sa, cd, sd, vsun;
double cosRA, sinRA, cosDec, sinDec;
/* Sun apex (where the sun goes) coordinates */
dms asun(270.9592); // Right ascention: 18h 3m 50.2s [J2000]
dms dsun(30.00467); // Declination: 30^o 0' 16.8'' [J2000]
vsun=20.; // [km/s]
asun.SinCos(sa,ca);
dsun.SinCos(sd,cd);
/* We need an auxiliary SkyPoint since we need the
* source referred to the J2000 equinox and we do not want to ovewrite
* the current values
*/
SkyPoint aux;
aux.set(RA0,Dec0);
aux.precessFromAnyEpoch(jd0, J2000);
aux.ra().SinCos( sinRA, cosRA );
aux.dec().SinCos( sinDec, cosDec );
/* Computation is done performing the scalar product of a unitary vector
in the direction of the source with the vector velocity of Sun, both being in the
LSR reference system:
Vlsr = Vhel + Vsun.u_radial =>
Vlsr = Vhel + vsun(cos D cos A,cos D sen A,sen D).(cos d cos a,cos d sen a,sen d)
Vhel = Vlsr - Vsun.u_radial
*/
return vsun *(cd*cosDec*(cosRA*ca + sa*sinRA) + sd*sinDec);
}