コード例 #1
0
    def SetFromJulian(self, jd):
        z = math.floor(jd + 0.5)
        f = (jd + 0.5) - z
        if z < 2299161.0:
            A = z
        else:
            alpha = math.floor((z - 1867216.25) / 36524.25)
            A = z + 1.0 + alpha - math.floor(alpha / 4.0)

        B = A + 1524
        C = math.floor((B - 122.1) / 365.25)
        D = math.floor(365.25 * C)
        E = math.floor((B - D) / 30.6001)
        self.day = int(math.floor(B - D - floor(30.6001 * E) + f))
        if E < 14:
            self.month = int(E - 1)
        else:
            self.month = int(E - 13)
        if self.month > 2:
            self.year = int(C - 4716)
        else:
            self.year = int(C - 4715)
        self.tzone = 0.0
        self.shour = GCMath.getFraction(jd + 0.5)
コード例 #2
0
 def GetSecond(self):
     return int(math.floor(GCMath.getFraction(self.shour * 1440) * 60))
コード例 #3
0
 def GetMinuteRound(self):
     return int(math.floor(GCMath.getFraction(self.shour * 24) * 60 + 0.5))
コード例 #4
0
 def GetMinute(self):
     return int(math.floor(GCMath.getFraction(self.shour * 24) * 60))