[Python] The GPS data contains a sentence with an incorrect format [closed]

Discussão em 'Python' iniciado por Stack, Maio 9, 2025.

  1. Stack

    Stack Membro Participativo

    I am using L76X GPS hat on raspberry pi 4 model B to retrieve GPS packets. I am using python code to retrieve the data. But some times the received packet structure is in incorrect format which cause my program to crash.. Is this the issue with the module....How to solve this? I am attaching the received packet sentence from the GPS(GNGGA PACKET)which caused my program to crash. This is the correct format of the sentence as i given below Received packet: $GNRMC,081421.000,A,0830.6090,N,07657.6980,E,0.00,220.74,080525,,,A77 Received packet: $GNVTG,220.74,T,,M,0.00,N,0.00,K,A20 Received packet: $GNGGA,081421.000,0830.6090,N,07657.6980,E,1,5,1.92,90.9,M,-94.2,M,,*51

    After receiving like this sometimes incorrect sentence format is comming......In my case it occured in the GNGGA packet I am attaching the snipped of it ...Go through the GNGGA packet in this

    Continue reading...

Compartilhe esta Página