mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-08-21 16:23:50 +08:00
@@ -2,7 +2,7 @@
|
||||
import unittest
|
||||
from datetime import datetime
|
||||
|
||||
from laika.helpers import UbloxGnssId
|
||||
from laika.helpers import ConstellationId
|
||||
|
||||
from laika.gps_time import GPSTime
|
||||
from laika.raw_gnss import GNSSMeasurement
|
||||
@@ -13,7 +13,7 @@ class TestLaikad(unittest.TestCase):
|
||||
|
||||
def test_create_msg_without_errors(self):
|
||||
gpstime = GPSTime.from_datetime(datetime.now())
|
||||
meas = GNSSMeasurement('G01', gpstime.week, gpstime.tow, {'C1C': 0., 'D1C': 0.}, {'C1C': 0., 'D1C': 0.}, ublox_gnss_id=UbloxGnssId.GPS)
|
||||
meas = GNSSMeasurement(ConstellationId.GPS, 1, gpstime.week, gpstime.tow, {'C1C': 0., 'D1C': 0.}, {'C1C': 0., 'D1C': 0.})
|
||||
msg = create_measurement_msg(meas)
|
||||
|
||||
self.assertEqual(msg.constellationId, 'gps')
|
||||
|
||||
@@ -3,7 +3,7 @@ import unittest
|
||||
import numpy as np
|
||||
|
||||
from laika import AstroDog
|
||||
from laika.helpers import UbloxGnssId
|
||||
from laika.helpers import ConstellationId
|
||||
from laika.raw_gnss import calc_pos_fix, correct_measurements, process_measurements, read_raw_ublox
|
||||
from selfdrive.test.openpilotci import get_url
|
||||
from tools.lib.logreader import LogReader
|
||||
@@ -34,9 +34,9 @@ class TestUbloxProcessing(unittest.TestCase):
|
||||
count_glonass = 0
|
||||
for measurements in self.gnss_measurements:
|
||||
for m in measurements:
|
||||
if m.ublox_gnss_id == UbloxGnssId.GPS:
|
||||
if m.constellation_id == ConstellationId.GPS:
|
||||
count_gps += 1
|
||||
elif m.ublox_gnss_id == UbloxGnssId.GLONASS:
|
||||
elif m.constellation_id == ConstellationId.GLONASS:
|
||||
count_glonass += 1
|
||||
|
||||
self.assertEqual(count_gps, 5036)
|
||||
|
||||
Reference in New Issue
Block a user