def get_beta(self, when_utc=None): """Gets angle between orbital plane and Sun direction (beta) at given time, in degrees.""" if when_utc is None: when_utc = dt.datetime.utcnow() # Here we calculate the complementary angle of beta, # because we use the normal vector of the orbital plane beta_comp = angle_between(get_sun(when_utc), self.get_normal_vector(when_utc)) # We subtract from 90 degrees to return the real beta angle return 90 - beta_comp
def test_get_sun_matches_expected_result_within_precision( when_utc, expected_eci): eci = get_sun(when_utc) assert angle_between(eci, expected_eci) < 1.0 # Claimed precision assert angle_between(eci, expected_eci) < 0.5 # Actual precision