Exemplo n.º 1
0
void KSPlanetBase::findPosition( const KSNumbers *num, const dms *lat, const dms *LST, const KSPlanetBase *Earth ) {
    // DEBUG edit
    findGeocentricPosition( num, Earth );  //private function, reimplemented in each subclass
    findPhase();
    setAngularSize( asin(physicalSize()/Rearth/AU_KM)*60.*180./dms::PI ); //angular size in arcmin

    if ( lat && LST )
        localizeCoords( num, lat, LST ); //correct for figure-of-the-Earth

    if ( hasTrail() ) {
        addToTrail( KStarsDateTime( num->getJD() ).toString( "yyyy.MM.dd hh:mm" ) + i18nc("Universal time", "UT") ); // TODO: Localize date/time format?
        if ( Trail.size() > TrailObject::MaxTrail )
            clipTrail();
    }

    findMagnitude(num);

    if ( type() == SkyObject::COMET ) {
        // Compute tail size
        KSComet *me = (KSComet *)this;
        double TailAngSize;
        // Convert the tail size in km to angular tail size (degrees)
        TailAngSize = asin(physicalSize()/Rearth/AU_KM)*60.0*180.0/dms::PI;
        // Find the apparent length as projected on the celestial sphere (the comet's tail points away from the sun)
        me->setTailAngSize( TailAngSize * fabs(sin( phase().radians() )));
    }

}
Exemplo n.º 2
0
void KSPlanetBase::findPosition( const KSNumbers *num, const dms *lat, const dms *LST, const KSPlanetBase *Earth ) {
	findGeocentricPosition( num, Earth );  //private function, reimplemented in each subclass

	if ( Earth ) setRearth( Earth );

	if ( lat && LST )
		localizeCoords( num, lat, LST ); //correct for figure-of-the-Earth

	if ( hasTrail() ) {
		Trail.append( new SkyPoint( ra(), dec() ) );
		if ( Trail.count() > MAXTRAIL ) Trail.removeFirst();
	}

	if ( isMajorPlanet() )
		findMagnitude(num);
}