本文整理汇总了C++中SkyPoint::apparentCoord方法的典型用法代码示例。如果您正苦于以下问题:C++ SkyPoint::apparentCoord方法的具体用法?C++ SkyPoint::apparentCoord怎么用?C++ SkyPoint::apparentCoord使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SkyPoint
的用法示例。
在下文中一共展示了SkyPoint::apparentCoord方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: slotComputeCoords
void modCalcAzel::slotComputeCoords()
{
SkyPoint sp;
double epoch0 = getEpoch( epochName->text() );
KStarsDateTime dt;
dt.setFromEpoch( epoch0 );
long double jd = getDateTime().djd();
long double jd0 = dt.djd();
dms LST( getDateTime().gst().Degrees() + getLongitude().Degrees() );
if(radioApCoords->isChecked()) {
sp = getEquCoords();
sp.apparentCoord(jd0, jd);
dms lat(getLatitude());
sp.EquatorialToHorizontal( &LST, &lat );
showHorCoords( sp );
} else {
sp = getHorCoords();
dms lat(getLatitude());
sp.HorizontalToEquatorial( &LST, &lat );
showEquCoords( sp );
}
}
示例2: processLines
//.........这里部分代码省略.........
if (latCheckBatch->isChecked() )
ostream << latB.toDMSString() << space;
// Read Epoch and write in ostream if corresponds
if(epochCheckBatch->isChecked() ) {
epoch0B = fields[i].toDouble();
i++;
} else
epoch0B = getEpoch( epochBoxBatch->text() );
if ( allRadioBatch->isChecked() )
ostream << epoch0B << space;
else
if(epochCheckBatch->isChecked() )
ostream << epoch0B << space;
// We make the first calculations
KStarsDateTime dt;
dt.setFromEpoch( epoch0B );
jdf = KStarsDateTime(dtB,utB).djd();
jd0 = dt.djd();
LST = KStarsDateTime(dtB,utB).gst().Degrees() + longB.Degrees();
// Equatorial coordinates are the input coords.
if (!horInputCoords) {
// Read RA and write in ostream if corresponds
if(raCheckBatch->isChecked() ) {
raB = dms::fromString( fields[i],FALSE);
i++;
} else
raB = raBoxBatch->createDms(FALSE);
if ( allRadioBatch->isChecked() )
ostream << raB.toHMSString() << space;
else
if(raCheckBatch->isChecked() )
ostream << raB.toHMSString() << space;
// Read DEC and write in ostream if corresponds
if(decCheckBatch->isChecked() ) {
decB = dms::fromString( fields[i], TRUE);
i++;
} else
decB = decBoxBatch->createDms();
if ( allRadioBatch->isChecked() )
ostream << decB.toDMSString() << space;
else
if(decCheckBatch->isChecked() )
ostream << decB.toDMSString() << space;
sp = SkyPoint (raB, decB);
sp.apparentCoord(jd0, jdf);
sp.EquatorialToHorizontal( &LST, &latB );
ostream << sp.az()->toDMSString() << space << sp.alt()->toDMSString() << endl;
// Input coords are horizontal coordinates
} else {
if(azCheckBatch->isChecked() ) {
azB = dms::fromString( fields[i],FALSE);
i++;
} else
azB = azBoxBatch->createDms();
if ( allRadioBatch->isChecked() )
ostream << azB.toHMSString() << space;
else
if(raCheckBatch->isChecked() )
ostream << azB.toHMSString() << space;
// Read DEC and write in ostream if corresponds
if(elCheckBatch->isChecked() ) {
elB = dms::fromString( fields[i], TRUE);
i++;
} else
elB = decBoxBatch->createDms();
if ( allRadioBatch->isChecked() )
ostream << elB.toDMSString() << space;
else
if(elCheckBatch->isChecked() )
ostream << elB.toDMSString() << space;
sp.setAz(azB);
sp.setAlt(elB);
sp.HorizontalToEquatorial( &LST, &latB );
ostream << sp.ra()->toHMSString() << space << sp.dec()->toDMSString() << endl;
}
}
fOut.close();
}