def set_longitude(self, longitude=0.0): """ Set the longitude to be used in date calculations. :param longitude: the longitude to set (- for west, + for east)(-180..180) """ l = mathutils.to_float(longitude, 0.0) if l is not None: l = mathutils.normalize_degrees(l, -180.0, 180.0) self.longitude = l
def normalize_dd2(dd): dd = mathutils.normalize_degrees(dd, -180.0, 180.0) return dd
def normalize_dd1(dd, hrs): if hrs: dd = mathutils.normalize_hours(dd, 0.0, 24.0) else: dd = mathutils.normalize_degrees(dd, 0.0, 360.0) return dd
def set_latitude(self, latitude): l = mathutils.to_float(latitude, 0.0) if l is not None: l = mathutils.normalize_degrees(l, -90, 90.0) self.latitude = l
def __calculate_L(self, terms): tL = self.__calculate_series(terms) tL *= 180.0 / math.pi self.L = mathutils.normalize_degrees(tL)
def __calculate_B(self, terms): tB = self.__calculate_series(terms) tB *= 180.0 / math.pi self.B = mathutils.normalize_degrees(tB, -360.0, 360.0)