Esempio n. 1
0
    def __calc_equatorialCoordinates(self): 
        ''' calculates position in equatorial coords from ecliptic '''
        
        import math
        Jcty = self._TSMgr.time_get_julianCenturiesJ2000()
        
        Lam_deg = self._moonCoordinates["ecl_Lon"] # Lambda
        Bet_deg = self._moonCoordinates["ecl_Lat"] # Beta
        Eps_deg = MH.eps_deg(Jcty)                 # Epsilon
        
        sinLam = MH.sin_deg(Lam_deg)
        cosLam = MH.cos_deg(Lam_deg)        
        sinBet = MH.sin_deg(Bet_deg)
        cosBet = MH.cos_deg(Bet_deg)
        sinEps = MH.sin_deg(Eps_deg)
        cosEps = MH.cos_deg(Eps_deg)
        
        # [o. Montenbruck] "Grundlagen der Ephemeridenrechnung" S.14
#        cos(del)*cos(alp) = cos(bet)*cos(lam)
#        cos(del)*sin(alp) = cos(eps)*cos(bet)*sin(lam) - sin(eps)*sin(bet)
#        sin(del)          = sin(eps)*cos(bet)*sin(lam) + cos(eps)*sin(bet)
        
        Del_rad = math.asin( sinEps*cosBet*sinLam + cosEps*sinBet )
        Del_deg = math.degrees(Del_rad)
        cosDel = math.cos(Del_rad)
        
        cosAlp = (cosBet*cosLam) / cosDel
        sinAlp = (cosEps*cosBet*sinLam - sinEps*sinBet) / cosDel
        
        Alp_deg = MH.atan2_deg(sinAlp,cosAlp)%360
        
        self._moonCoordinates["equa_Lon"] = Alp_deg # Alpha / RA
        self._moonCoordinates["equa_Lat"] = Del_deg # Delta / DE
Esempio n. 2
0
    def _calc_ECI(self):
        ''' calc position in ECI reference from time:LMST and pos:LLA'''

        self._df_clear("time")  # clear dirty flags
        self._df_clear("pos")

        a = wgs72_complete["radiusearthkm"]
        e2 = wgs72_complete["e^2"]

        phi = self._geo_lat
        lambd = self.sidereal_get_LMST()
        h = self._geo_alti / 1000  # m to km

        sin_phi = math_helper.sin_deg(phi)
        cos_phi = math_helper.cos_deg(phi)
        sin_lambd = math_helper.sin_deg(lambd)
        cos_lambd = math_helper.cos_deg(lambd)

        # [Günter Seeber, "Satellite Geodesy", 2nd edition] page 24

        # N is the radius of curvature in the prime vertical:
        # N = a / sqrt( 1 - (e^2)*(sin(lat)^2) )
        # EQUATION (2.36)
        N = a / math.sqrt(1 - e2 * (sin_phi**2))

        # EQUATION (2.35)
        self._eci_x = (N + h) * cos_phi * cos_lambd
        self._eci_y = (N + h) * cos_phi * sin_lambd
        self._eci_z = ((1 - e2) * N + h) * sin_phi
Esempio n. 3
0
    def calcMoonCoords_1stSolution(self):
        # self.__meanArgs_checkDF()
        self.calcMoonMeanArgumentsFromDate()
        
        L0 = self._moonMeanArguments['L0']
        l  = self._moonMeanArguments['l']
        l_ = self._moonMeanArguments['l_']
        F  = self._moonMeanArguments['F']
        D  = self._moonMeanArguments['D']
#        print('L0   ',L0)
#        print('l    ',l)
#        print('l_   ',l_)
#        print('F    ',F)
#        print('D    ',D)
        
        term = [None]*13
        
        term[0] = (
                22640 * MH.sin_deg(l) + 
                769   * MH.sin_deg(2*l) + 
                36    * MH.sin_deg(3*l) )       #grosse ungleicheit
        
        term[1] = -4586  * MH.sin_deg(l-2*D)    #evektion
        term[2] = 2370   * MH.sin_deg(2*D)      #variation
        term[3] = -668   * MH.sin_deg(l_)       #jaehrliche ungleichheit
        term[4] = -412   * MH.sin_deg(2*F)      #differenz in bahnlaenge und ekliptikaler laenge
        term[5] = -212   * MH.sin_deg(2*l-2*D)
        term[6] = -206   * MH.sin_deg(l+l_-2*D)
        term[7] = 192    * MH.sin_deg(l+2*D)
        term[8] = -165   * MH.sin_deg(l_-2*D)
        term[9] = 148    * MH.sin_deg(l-l_)
        term[10] = -125  * MH.sin_deg(D)        #paralaktiche gleichung
        term[11] = -110  * MH.sin_deg(l+l_)
        term[12] = -55   * MH.sin_deg(2*F-2*D)
            
        ecl_Laenge = L0 + sum(term)/3600
        self._moonCoordinates["ecl_Lon"] = ecl_Laenge %360


        # Reset des "term" Arrays
        term = [None]*8
        
        term[0] = 18520* MH.sin_deg( F + ecl_Laenge - L0 + 
            0.114*MH.sin_deg(2*F) +0.15*MH.sin_deg(l_) )    
        
        term[1] = -526 * MH.sin_deg(    F - 2*D       )
        term[2] =   44 * MH.sin_deg(    l +   F - 2*D )
        term[3] =  -31 * MH.sin_deg(   -l +   F - 2*D )
        term[4] =  -25 * MH.sin_deg( -2*l +   F       )
        term[5] =  -23 * MH.sin_deg(   l_ +   F - 2*D )
        term[6] =   21 * MH.sin_deg(   -l +   F       )
        term[7] =   11 * MH.sin_deg(  -l_ +   F - 2*D )
            
        self._moonCoordinates["ecl_Lat"] = sum(term)/3600
        
        # ergebnis ist im ekliptischen koordsys
        # wird benötigt im äquatorialen koordsys
        self.__calc_equatorialCoordinates()