示例#1
0
    def ha_alt_az(self, loc):
        """Solar hour angle, altitude and azimuth angle for `loc`.

           Azimuth is measured eastward from the North.
        """
        from _SKY.Earth import altitude, azimuth, hour_angle
        ra = self.ra
        decl = self.decl
        ha = hour_angle(self.time.sidereal_deg, loc, ra)
        alt = altitude(decl, ha, loc)
        az = azimuth(decl, ha, loc)
        return ha, alt, az
示例#2
0
文件: Sun.py 项目: Tapyr/tapyr
    def ha_alt_az (self, loc) :
        """Solar hour angle, altitude and azimuth angle for `loc`.

           Azimuth is measured eastward from the North.
        """
        from _SKY.Earth import altitude, azimuth, hour_angle
        ra   = self.ra
        decl = self.decl
        ha   = hour_angle (self.time.sidereal_deg, loc, ra)
        alt  = altitude   (decl, ha, loc)
        az   = azimuth    (decl, ha, loc)
        return ha, alt, az
示例#3
0
 def _at_time(self, m):
     ### J. Meeus, p. 103
     loc = self.loc
     rts = self.rts
     ### sid: sidereal time at Greenwich, in degrees,
     ###      at time `m` (expressed as fraction of a day)
     self.sid      = sid      = Angle_D.normalized \
         (rts.sid.degrees + 360.985647 * m)
     ### n: `m` corrected by difference in
     ###    Terrestrial Dynamical Time and UT
     self.n = n = m + self.day.delta_T / 86400.0
     self.alpha = alpha = Angle_R(rts.interpolator_a(n))
     self.delta = delta = Angle_R(rts.interpolator_d(n))
     self.ha = ha = hour_angle(sid, loc, alpha)
     self.altitude = alt = altitude(delta, ha, loc)
     return ha, delta, alt
示例#4
0
文件: RTS.py 项目: Tapyr/tapyr
 def _at_time (self, m) :
     ### J. Meeus, p. 103
     loc           = self.loc
     rts           = self.rts
     ### sid: sidereal time at Greenwich, in degrees,
     ###      at time `m` (expressed as fraction of a day)
     self.sid      = sid      = Angle_D.normalized \
         (rts.sid.degrees + 360.985647 * m)
     ### n: `m` corrected by difference in
     ###    Terrestrial Dynamical Time and UT
     self.n        = n        = m + self.day.delta_T / 86400.0
     self.alpha    = alpha    = Angle_R (rts.interpolator_a (n))
     self.delta    = delta    = Angle_R (rts.interpolator_d (n))
     self.ha       = ha       = hour_angle (sid,   loc, alpha)
     self.altitude = alt      = altitude   (delta, ha,  loc)
     return ha, delta, alt