本文整理汇总了C++中SkyPoint::Equatorial1950ToGalactic方法的典型用法代码示例。如果您正苦于以下问题:C++ SkyPoint::Equatorial1950ToGalactic方法的具体用法?C++ SkyPoint::Equatorial1950ToGalactic怎么用?C++ SkyPoint::Equatorial1950ToGalactic使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SkyPoint
的用法示例。
在下文中一共展示了SkyPoint::Equatorial1950ToGalactic方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: processLines
//.........这里部分代码省略.........
//Go through the line, looking for parameters
QStringList fields = line.split( ' ' );
i = 0;
// Input coords are galactic coordinates:
if (galInputCoords) {
// Read Galactic Longitude and write in ostream if corresponds
if(galLongCheckBatch->isChecked() ) {
galLongB = dms::fromString( fields[i], true);
i++;
} else
galLongB = galLongBoxBatch->createDms(true);
if ( allRadioBatch->isChecked() )
ostream << galLongB.toDMSString() << space;
else
if(galLongCheckBatch->isChecked() )
ostream << galLongB.toDMSString() << space;
// Read Galactic Latitude and write in ostream if corresponds
if(galLatCheckBatch->isChecked() ) {
galLatB = dms::fromString( fields[i], true);
i++;
} else
galLatB = galLatBoxBatch->createDms(true);
if ( allRadioBatch->isChecked() )
ostream << galLatB.toDMSString() << space;
else
if(galLatCheckBatch->isChecked() )
ostream << galLatB.toDMSString() << space;
sp = SkyPoint ();
sp.GalacticToEquatorial1950(&galLongB, &galLatB);
ostream << sp.ra().toHMSString() << space << sp.dec().toDMSString() << epoch0B << endl;
// Input coords. are equatorial coordinates:
} else {
// 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;
// Read Epoch and write in ostream if corresponds
if(epochCheckBatch->isChecked() ) {
epoch0B = fields[i];
i++;
} else
epoch0B = epochBoxBatch->text();
if ( allRadioBatch->isChecked() )
ostream << epoch0B << space;
else
if(epochCheckBatch->isChecked() )
ostream << epoch0B << space;
sp = SkyPoint (raB, decB);
sp.J2000ToB1950();
sp.Equatorial1950ToGalactic(galLongB, galLatB);
ostream << galLongB.toDMSString() << space << galLatB.toDMSString() << endl;
}
}
fOut.close();
}