This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"editor.tabSize": 4, | |
"editor.insertSpaces": true, | |
"editor.rulers": [100], | |
"editor.renderIndentGuides": true, | |
"window.openFilesInNewWindow": false | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from binascii import hexlify,unhexlify | |
from struct import unpack, pack | |
from array import array | |
# Byte Constants | |
some_bytes = b'\x12\x34\x56\x78\x9A\xBC\xDE\xF0' | |
some_string_bytes = b'Hello!' | |
some_ascii_hex_bytes = b'\x33\x46\x44\x65\x32\x33\x43\x41\x31' | |
some_other_bytes = b'\x99\xEF\x31\xC4\x25\xD8\x46\x3A' | |
some_little_packed_bytes = b'\x00\x00\x16\x3e' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pyb import UART | |
from micropyGPS import MicropyGPS | |
import mtk | |
# Instatntiate the micropyGPS object | |
my_gps = MicropyGPS() | |
print('Setting Up UART to 9600bps') | |
baud = 9600 | |
uart = UART(3, baud) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Get Average Time in micros for the final Sentence Parsing | |
from micropyGPS import MicropyGPS | |
sentence1 = '$GPRMC,181714.898,A,3748.8617,N,08338.9530,W,000.0,237.0,240911,,,A*79' | |
sentence2 = '$GPGGA,181715.898,3748.8604,N,08338.9539,W,1,09,0.9,371.4,M,-32.5,M,,0000*60' | |
sentence3 = '$GPGSA,A,3,07,11,28,24,26,08,04,17,20,,,,1.7,0.9,1.4*3F' | |
sentence4 = '$GPGSV,3,1,12,28,76,017,38,17,56,282,38,01,46,055,40,08,38,183,47*75' | |
my_gps = MicropyGPS() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Get parse time in microseconds on pyboard | |
from micropyGPS import MicropyGPS | |
sentence1 = '$GPRMC,181714.898,A,3748.8617,N,08338.9530,W,000.0,237.0,240911,,,A*79' | |
sentence2 = '$GPGGA,181715.898,3748.8604,N,08338.9539,W,1,09,0.9,371.4,M,-32.5,M,,0000*60' | |
sentence3 = '$GPGSA,A,3,07,11,28,24,26,08,04,17,20,,,,1.7,0.9,1.4*3F' | |
sentence4 = '$GPGSV,3,1,12,28,76,017,38,17,56,282,38,01,46,055,40,08,38,183,47*75' | |
my_gps = MicropyGPS() |