Open cbitterfield opened 3 years ago
@cbitterfield I am not sure if you are still having issues with this dataset and the parsing of the information but I looked into this for you. I ran the following:
with open("nema_data.txt", "rb") as data_file:
data = data_file.read()
data = data.split(b'\r\n')
data = [x.decode() for x in data if x]
for i, dp in enumerate(data):
try:
parsed = pynmea2.parse(dp)
except ValueError as error:
print(f"Index - {i}, {dp}")```
I was able to see the following output:
```Index - 202, $APVTG,,T,,M,0.0,N,,K,D* E
Index - 210, $APVT,,M,0.0,N,,K,D*0E
Index - 305, $PHM,0 8. ,M*3E
Index - 383, $APVTG,,T,,M,0.0,N,,K,D* E
Index - 1082, $APVT,T,,M,0.N,,K,D*0E
Index - 1460, $PRA,-7.6,A* 2
Index - 2290, $IIRMC,231300,A,2904.000,N,00056.213,W,0.0,,131121,,,D*5
Index - 2982, $IIRMC,231300,A,2904.000,N,00056.213,W,0.0,,131121,,,D*5
Index - 3497, $APVTG,,T,,M,0.0,N,,K,D* E
Index - 5466, $I RM,231300,A,2904.000,N,00056.213,W,0.0,,131121,,,D*50
This is pulled directly from the file you linked in this issue. Note sure if there was an update or not but things appear to be fixed from your original issue.
Sentence: ['$IIMWV', '343.0,R,8.4,N,A35\r\n$IIVWR,343.0,R,8.4,N,4.3,M,15.6,K74\r\n']
Among other sentences that don't decode. ['$IIMWV', '$IIHDM', '$IIVHW', '$APVTG', '$APVTG\x08', '$APHDM', '$\x00PH\x00M', '$STALK', '$HCHDG', '$IIDBT', '$APRSA', '$IIRMC', '$\x00PR\x02A', '$APHDG', '$ECGLL', '$IIMTW', '$I\tRM\x03']
The equipment onboard is Raymarine (AP400), Garmin Chartplotters and Class "A" AIS (A100).
Attaching a text file of raw data for use as well.
nema_data.txt
EM Trak: A-100 sentences: ABM, ACA, ACK, AIR, BBM, DTM, EPV, GBS, GGA, GLL, GNS, HDT, LRF, LRI, RMC, ROT, SSD, VBW, VSD, VTG, SPW, THS