def test_kf_becomes_valid(self): laikad = Laikad(auto_update=False) m = self.logs[0] self.assertFalse(all(laikad.kf_valid(m.logMonoTime * 1e-9))) kf_valid = False for m in self.logs: laikad.process_gnss_msg(m.ubloxGnss, m.logMonoTime, block=True) kf_valid = all(laikad.kf_valid(m.logMonoTime * 1e-9)) if kf_valid: break self.assertTrue(kf_valid)
def test_get_orbits_in_process(self): laikad = Laikad(auto_update=False) has_orbits = False for m in self.logs: laikad.process_gnss_msg(m.ubloxGnss, m.logMonoTime, block=False) if laikad.orbit_fetch_future is not None: laikad.orbit_fetch_future.result() vals = laikad.astro_dog.orbits.values() has_orbits = len(vals) > 0 and max([len(v) for v in vals]) > 0 if has_orbits: break self.assertTrue(has_orbits) self.assertGreater(len(laikad.astro_dog.orbit_fetched_times._ranges), 0) self.assertEqual(None, laikad.orbit_fetch_future)