本文整理汇总了C++中SkyPoint::ra0方法的典型用法代码示例。如果您正苦于以下问题:C++ SkyPoint::ra0方法的具体用法?C++ SkyPoint::ra0怎么用?C++ SkyPoint::ra0使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SkyPoint
的用法示例。
在下文中一共展示了SkyPoint::ra0方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: riseSetTimeAz
dms SkyObject::riseSetTimeAz( const KStarsDateTime &dt, const GeoLocation *geo, bool riseT ) {
dms Azimuth;
double AltRad, AzRad;
double sindec, cosdec, sinlat, coslat, sinHA, cosHA;
double sinAlt, cosAlt;
QTime UT = riseSetTimeUT( dt, geo, riseT );
KStarsDateTime dt0 = dt;
dt0.setTime( UT );
SkyPoint sp = recomputeCoords( dt0, geo );
const dms *ram = sp.ra0();
const dms *decm = sp.dec0();
dms LST = auxRiseSetTimeLST( geo->lat(), ram, decm, riseT );
dms HourAngle = dms( LST.Degrees() - ram->Degrees() );
geo->lat()->SinCos( sinlat, coslat );
dec()->SinCos( sindec, cosdec );
HourAngle.SinCos( sinHA, cosHA );
sinAlt = sindec*sinlat + cosdec*coslat*cosHA;
AltRad = asin( sinAlt );
cosAlt = cos( AltRad );
AzRad = acos( ( sindec - sinlat*sinAlt )/( coslat*cosAlt ) );
if ( sinHA > 0.0 ) AzRad = 2.0*dms::PI - AzRad; // resolve acos() ambiguity
Azimuth.setRadians( AzRad );
return Azimuth;
}
示例2: starsInAperture
bool DeepStarComponent::starsInAperture( QList<StarObject *> &list, const SkyPoint ¢er, float radius, float maglim )
{
if( maglim < triggerMag )
return false;
// For DeepStarComponents, whether we use ra0() and dec0(), or
// ra() and dec(), should not matter, because the stars are
// repeated in all trixels that they will pass through, although
// the factuality of this statement needs to be verified
// Ensure that we have deprecessed the (RA, Dec) to (RA0, Dec0)
Q_ASSERT( center.ra0().Degrees() >= 0.0 );
Q_ASSERT( center.dec0().Degrees() <= 90.0 );
m_skyMesh->intersect( center.ra0().Degrees(), center.dec0().Degrees(), radius, (BufNum) OBJ_NEAREST_BUF );
MeshIterator region( m_skyMesh, OBJ_NEAREST_BUF );
if( maglim < -28 )
maglim = m_FaintMagnitude;
while ( region.hasNext() ) {
Trixel currentRegion = region.next();
// FIXME: Build a better way to iterate over all stars.
// Ideally, StarBlockList should have such a facility.
StarBlockList *sbl = m_starBlockList[ currentRegion ];
sbl->fillToMag( maglim );
for( int i = 0; i < sbl->getBlockCount(); ++i ) {
StarBlock *block = sbl->block( i );
for( int j = 0; j < block->getStarCount(); ++j ) {
#ifdef KSTARS_LITE
StarObject *star = &(block->star( j )->star);
#else
StarObject *star = block->star( j );
#endif
if( star->mag() > maglim )
break; // Stars are organized by magnitude, so this should work
if( star->angularDistanceTo( ¢er ).Degrees() <= radius )
list.append( star );
}
}
}
return true;
}
示例3: transitTimeUT
QTime SkyObject::transitTimeUT( const KStarsDateTime &dt, const GeoLocation *geo ) {
dms LST = geo->GSTtoLST( dt.gst() );
//dSec is the number of seconds until the object transits.
dms HourAngle = dms( LST.Degrees() - ra()->Degrees() );
int dSec = int( -3600.*HourAngle.Hours() );
//dt0 is the first guess at the transit time.
KStarsDateTime dt0 = dt.addSecs( dSec );
//recompute object's position at UT0 and then find
//transit time of this refined position
SkyPoint sp = recomputeCoords( dt0, geo );
const dms *ram = sp.ra0();
HourAngle = dms ( LST.Degrees() - ram->Degrees() );
dSec = int( -3600.*HourAngle.Hours() );
return dt.addSecs( dSec ).time();
}