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() ))); } }
void addSymbol(S_symbol *pp, S_symTab *tab) { /* a bug can produce, if you add a symbol into old table, and the same symbol exists in a newer one. Then it will be deleted from the newer one. All this story is about storing information in trail. It should containt, both table and pointer !!!! */ DPRINTF4("adding symbol %s: %s %s\n",pp->name, typesName[pp->b.symType], storagesName[pp->b.storage]); assert(pp->b.npointers==0); AddSymbolNoTrail(pp,tab); addToTrail(deleteSymDef, pp /* AND ALSO!!! , tab */ ); //if (WORK_NEST_LEVEL0()) {static int c=0;fprintf(dumpOut,"addsym0#%d\n",c++);} }