Esempio n. 1
0
 def test_compressed_position_live(self):
     self.__check_parsed(
         'W6KWF-1>APOT30,WIDE2-1,qAR,W6YX-5:!/;ZI^/]m/k7UG 13.8V W6KWF',
         facts=[
             Messaging(supported=False),
             Position(37.316371158702744, -121.96361498033738),
             Symbol(id=u'/k'),
             Velocity(speed_knots=53.70604083543306, course_degrees=88)
         ],
         errors=[],
         comment=' 13.8V W6KWF')
Esempio n. 2
0
 def test_position_with_timestamp_zero_error(self):
     # TODO this message looks to have other stuff we should parse
     self.__check_parsed(
         'N6TVE-11>APTW01,TCPIP*,qAC,T2BWI:@000000z3429.95N/11949.07W_087/004g006t068r000p000XTvEJeeWx',
         facts=[
             Messaging(True),
             Position((34 + 29.95 / 60), -(119 + 49.07 / 60)),
             Symbol(u'/_'),
             Velocity(speed_knots=4, course_degrees=87),
         ],
         errors=['DHM/HMS timestamp invalid: day is out of range for month'],
         comment='g006t068r000p000XTvEJeeWx')
Esempio n. 3
0
 def test_mic_e(self):
     self.__check_parsed(
         'KQ1N-7>SV2RYV,W6BXN-3*,N6ZX-3*,WIDE2*:`00krA4[/`"5U}_',
         facts=[
             # TODO: Check pos and vel against results from some other parser, in more cases
             Position(latitude=36.382666666666665, longitude=-120.3465),
             Velocity(speed_knots=63, course_degrees=31),
             Symbol('/['),
         ],
         errors=[],
         # TODO: The _ is actually a manufacturer/version code or something but we don't support that yet
         comment='_')
Esempio n. 4
0
 def test_compressed_position_example_1(self):
     """example from APRS 1.0.1 page 40"""
     # due to exponentiation being involved there is some FP error. TODO: Arrange to be able to assert the range, or duplicate the computation, instead of using exact constants
     self.__check_parsed('FOO>BAR:!/5L!!<*e7>7P[',
                         facts=[
                             Messaging(supported=False),
                             Position((49 + 30 / 60), -72.75000393777269),
                             Symbol(id=u'/>'),
                             Velocity(speed_knots=36.23201216883807,
                                      course_degrees=88)
                         ],
                         errors=[],
                         comment='')
Esempio n. 5
0
 def test_position_with_timestamp_without_messaging(self):
     self.__check_parsed(
         'KMEP1>APT311,N6ZX-3*,WIDE1*,WIDE2-1:/160257z3726.79N\\12220.18Wv077/000/A=001955/N6ZX, Kings Mt. Eme',
         facts=[
             Messaging(False),
             Timestamp(_dummy_receive_datetime.replace(day=16, hour=2, minute=57, second=0, microsecond=0)),
             Position((37 + 26.79 / 60), -(122 + 20.18 / 60)),
             Symbol(u'\\v'),
             Velocity(speed_knots=0, course_degrees=77),
             Altitude(1955, True),
         ],
         errors=[],
         comment='/N6ZX, Kings Mt. Eme')
Esempio n. 6
0
 def test_position_with_timestamp_with_messaging(self):
     # TODO this message looks to have other stuff we should parse
     self.__check_parsed(
         'KA6UPU-1>APRS,N6ZX-3*,WIDE1*:@160256z3755.50N/12205.43W_204/003g012t059r000p000P000h74b10084.DsVP',
         facts=[
             Messaging(True),
             Timestamp(_dummy_receive_datetime.replace(day=16, hour=2, minute=56, second=0, microsecond=0)),
             Position((37 + 55.50 / 60), -(122 + 05.43 / 60)),
             Symbol('/_'),
             Velocity(speed_knots=3, course_degrees=204),
         ],
         errors=[],
         comment='g012t059r000p000P000h74b10084.DsVP')