Beispiel #1
0
    def test_constellation_from_valid_prn(self):
        data = [
            ['G01', 'GPS'],
            ['G10', 'GPS'],
            ['G32', 'GPS'],
            ['R01', 'GLONASS'],
            ['R10', 'GLONASS'],
            ['R23', 'GLONASS'],
            ['R24', 'GLONASS'],
            ['R25', 'GLONASS'],
            ['R32', 'GLONASS'],
            ['E01', 'GALILEO'],
            ['E02', 'GALILEO'],
            ['E36', 'GALILEO'],
            ['C01', 'BEIDOU'],
            ['C02', 'BEIDOU'],
            ['C29', 'BEIDOU'],
            ['J01', 'QZNSS'],
            ['J04', 'QZNSS'],
            ['S01', 'SBAS'],
            ['I01', 'IRNSS']
        ]

        for prn, expected_constellation in data:
            constellation = get_constellation(prn)
            self.assertEqual(expected_constellation, constellation)
Beispiel #2
0
 def test_constellation_from_prn_outside_range(self):
     prn = 'G99'
     constellation = get_constellation(prn)
     self.assertEqual('GPS', constellation)
Beispiel #3
0
    def test_constellation_from_prn_with_invalid_identifier(self):
        prn = '?01'

        self.assertWarns(UserWarning, get_constellation, prn)
        self.assertIsNone(get_constellation(prn))