Пример #1
0
    def test_parses_map_2(self):
        """ No FAA mode indicator
        """
        p = GPBEC()
        p.parse("GPBEC,220516,5130.02,N,00046.34,W,213.8,T,218.0,M,0004.6,N,EGLM*11")

        self.assertEqual("GPBEC", p.sen_type)
        self.assertEqual("220516", p.timestamp)
        self.assertEqual("5130.02", p.waypoint_lat)
        self.assertEqual("N", p.waypoint_lat_dir)
        self.assertEqual("00046.34", p.waypoint_lon)
        self.assertEqual("W", p.waypoint_lon_dir)
        self.assertEqual("213.8", p.bearing_true)
        self.assertEqual("T", p.bearing_true_sym)
        self.assertEqual("218.0", p.bearing_mag)
        self.assertEqual("M", p.bearing_mag_sym)
        self.assertEqual("0004.6", p.nautical_miles)
        self.assertEqual("N", p.nautical_miles_sym)
        self.assertEqual("EGLM", p.waypoint_id)
        self.assertEqual("11", p.checksum)
Пример #2
0
    def test_parses_map_1(self):
        """ No FAA mode indicator
        """
        p = GPBEC()
        p.parse("$GPBEC,081837,,,,,,T,,M,,N,*13")

        self.assertEqual("GPBEC", p.sen_type)
        self.assertEqual("081837", p.timestamp)
        self.assertEqual("", p.waypoint_lat)
        self.assertEqual("", p.waypoint_lat_dir)
        self.assertEqual("", p.waypoint_lon)
        self.assertEqual("", p.waypoint_lon_dir)
        self.assertEqual("", p.bearing_true)
        self.assertEqual("T", p.bearing_true_sym)
        self.assertEqual("", p.bearing_mag)
        self.assertEqual("M", p.bearing_mag_sym)
        self.assertEqual("", p.nautical_miles)
        self.assertEqual("N", p.nautical_miles_sym)
        self.assertEqual("", p.waypoint_id)
        self.assertEqual("13", p.checksum)
Пример #3
0
    def test_parses_map_1(self):
        """ No FAA mode indicator
        """
        p = GPBEC()
        p.parse("$GPBEC,081837,,,,,,T,,M,,N,*13")

        self.assertEquals("GPBEC", p.sen_type)
        self.assertEquals("081837", p.timestamp)
        self.assertEquals("", p.waypoint_lat)
        self.assertEquals("", p.waypoint_lat_dir)
        self.assertEquals("", p.waypoint_lon)
        self.assertEquals("", p.waypoint_lon_dir)
        self.assertEquals("", p.bearing_true)
        self.assertEquals("T", p.bearing_true_sym)
        self.assertEquals("", p.bearing_mag)
        self.assertEquals("M", p.bearing_mag_sym)
        self.assertEquals("", p.nautical_miles)
        self.assertEquals("N", p.nautical_miles_sym)
        self.assertEquals("", p.waypoint_id)
        self.assertEquals("13", p.checksum)
Пример #4
0
    def test_parses_map_2(self):
        """ No FAA mode indicator
        """
        p = GPBEC()
        p.parse(
            "GPBEC,220516,5130.02,N,00046.34,W,213.8,T,218.0,M,0004.6,N,EGLM*11"
        )

        self.assertEquals("GPBEC", p.sen_type)
        self.assertEquals("220516", p.timestamp)
        self.assertEquals("5130.02", p.waypoint_lat)
        self.assertEquals("N", p.waypoint_lat_dir)
        self.assertEquals("00046.34", p.waypoint_lon)
        self.assertEquals("W", p.waypoint_lon_dir)
        self.assertEquals("213.8", p.bearing_true)
        self.assertEquals("T", p.bearing_true_sym)
        self.assertEquals("218.0", p.bearing_mag)
        self.assertEquals("M", p.bearing_mag_sym)
        self.assertEquals("0004.6", p.nautical_miles)
        self.assertEquals("N", p.nautical_miles_sym)
        self.assertEquals("EGLM", p.waypoint_id)
        self.assertEquals("11", p.checksum)