Beispiel #1
0
    def test_checksum_passes(self):
        p = GPGSA()
        p.checksum = '39'
        p.nmea_sentence = "$GPGSA,A,3,04,05,,09,12,,,24,,,,,2.5,1.3,2.1*39"

        result = p.check_chksum()

        self.assertTrue(result)
Beispiel #2
0
    def test_checksum_fails(self):
        p = GPGSA()
        p.checksum = '38'
        p.nmea_sentence = "$GPGSA,A,3,04,05,,09,12,,,24,,,,,2.5,1.3,2.1*38"

        result = p.check_chksum()

        self.assertFalse(result)
Beispiel #3
0
    def test_parses_map(self):
        p = GPGSA()
        p.parse("$GPGSA,A,3,04,05,,09,12,,,24,,,,,2.5,1.3,2.1*39")

        self.assertEquals("GPGSA", p.sen_type)
        self.assertEquals("A", p.mode)
        self.assertEquals("3", p.mode_fix_type)
        self.assertEquals("04", p.sv_id01)
        self.assertEquals("05", p.sv_id02)
        self.assertEquals("", p.sv_id03)
        self.assertEquals("09", p.sv_id04)
        self.assertEquals("12", p.sv_id05)
        self.assertEquals("", p.sv_id06)
        self.assertEquals("", p.sv_id07)
        self.assertEquals("24", p.sv_id08)
        self.assertEquals("", p.sv_id09)
        self.assertEquals("", p.sv_id10)
        self.assertEquals("", p.sv_id11)
        self.assertEquals("", p.sv_id12)
        self.assertEquals("2.5", p.pdop)
        self.assertEquals("1.3", p.hdop)
        self.assertEquals("2.1", p.vdop)
        self.assertEquals("39", p.checksum)