Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By rudy
#73301
I saw how massive is the GPS sentences. Some of them have from 50 up to 75 bytes per second, and the sentence of interest sometimes comes 1 at each 4. This implies on a buffer of at least let's say ~240 bytes, not mentioning that once I would get the raw data asynchronously, I would have to allocate much more ram to seek the information of interest (at least more 75 bytes...).

This looks like a meniscal amount of data to me. I would be really surprised if it can't be processed in a timely manor with normal methods.
User avatar
By btidey
#73310 Yes. This is not an onerous task for the ESP8266

The Arduino RX FIFO is intended to provide a buffer between the raw characters arriving and the foreground processing, so that characters are not lost if the foreground spends some time on other stuff (such as parsing previous data). It does not have to hold a complete message. With the 128 byte FIFO here at 9600 baud the it would be over 100msec before any overrun occurred so you just have to ensure that availability is checked faster than that.

The strategy would be to have the foreground periodically move RX data into application level buffers which can be as large as storage permits. E.g. you could have a parse routine which is called periodically in the foreground. The first part of parse is to check and retrieve any new characters into its own buffers. When it has determined there is a complete message then it parses it and returns the result. If it has not got enough data to work with when called then it just returns a 'no message result' and the partial data gets added to on the next call.
User avatar
By andre_teprom
#73312
rudy wrote:This looks like a meniscal amount of data to me. I would be really surprised if it can't be processed in a timely manor with normal methods.


Frankly, I was not able to understand the meaning of the "meniscal" qualification you have used for the quantities presented above. You continue with the same skeptical attitude, and it seems that I will have to go deeper into more details to illustrate what were stated. Below is what my project partner in the field extracted from an oscilloscope with a data interpreter, this GPS module being from a different brand than I had used previously (which I used for the previous calculation), in which, for the actual case the scenario is even worse.

Notice that the sentence that contains the vectorial speed ($GPVTG) occurs between each 557 bytes, which means that in order to store a whole sentence randomly sampled, I would have to allocate a RAM buffer with almost twice that size (> 1KByte) .

I refuse to decode a buffer that big as you are suggesting, it do not seem reasonable:

Code: Select all$GPGGA,193413.00,2150.70401,S,04635.57023,W,1,08,1.21,1239.3,M,-6.4,M,,*72
$GPGSA,A,3,01,22,31,23,03,14,08,32,,,,,2.56,1.21,2.26*0A
$GPGSV,4,1,16,01,62,227,13,03,31,219,17,04,06,065,31,08,18,334,34*77
$GPGSV,4,2,16,09,04,297,,10,05,082,28,11,59,285,22,14,25,143,28*70
$GPGSV,4,3,16,16,03,029,,17,01,226,,22,50,192,25,23,33,280,26*70
$GPGSV,4,4,16,26,09,055,20,27,03,004,,31,45,116,20,32,07,133,07*74
$GPGLL,2150.70401,S,04635.57023,W,193413.00,A,A*68
$GPRMC,193414.00,A,2150.70377,S,04635.56988,W,0.149,,170417,,,A*71
$GPVTG,,T,,M,0.149,N,0.275,K,A*2F
$GPGGA,193414.00,2150.70377,S,04635.56988,W,1,08,1.21,1240.4,M,-6.4,M,,*73
$GPGSA,A,3,01,22,31,23,03,14,08,32,,,,,2.56,1.21,2.26*0A
$GPGSV,4,1,16,01,62,227,14,03,31,219,18,04,06,065,31,08,18,334,34*7F
$GPGSV,4,2,16,09,04,297,,10,05,082,28,11,59,285,22,14,25,143,27*7F
$GPGSV,4,3,16,16,03,029,,17,01,226,,22,50,192,25,23,33,280,27*71
$GPGSV,4,4,16,26,09,055,20,27,03,004,,31,45,116,21,32,07,133,09*7B
$GPGLL,2150.70377,S,04635.56988,W,193414.00,A,A*60
$GPRMC,193415.00,A,2150.70347,S,04635.56960,W,0.007,,170417,,,A*7E
$GPVTG,,T,,M,0.007,N,0.013,K,A*26
$GPGGA,193415.00,2150.70347,S,04635.56960,W,1,08,1.16,1242.3,M,-6.4,M,,*76
$GPGSA,A,3,01,22,31,23,03,14,08,32,,,,,2.02,1.16,1.66*08
$GPGSV,4,1,16,01,63,227,14,03,31,219,18,04,06,065,31,08,18,334,33*79
$GPGSV,4,2,16,09,04,297,,10,05,082,28,11,59,285,23,14,25,143,27*7E
$GPGSV,4,3,16,16,03,029,,17,01,226,,22,50,192,25,23,33,280,27*71
$GPGSV,4,4,16,26,09,055,20,27,03,004,,31,45,116,20,32,07,133,09*7A
$GPGLL,2150.70347,S,04635.56960,W,193415.00,A,A*64
$GPRMC,193416.00,A,2150.70318,S,04635.56936,W,0.104,,170417,,,A*76
$GPVTG,,T,,M,0.104,N,0.192,K,A*2C
$GPGGA,193416.00,2150.70318,S,04635.56936,W,1,08,1.16,1244.1,M,-6.4,M,,*78
$GPGSA,A,3,01,22,31,23,03,14,08,32,,,,,2.02,1.16,1.66*08
$GPGSV,4,1,16,01,63,227,14,03,31,219,18,04,06,065,31,08,18,334,33*79
$GPGSV,4,2,16,09,04,297,,10,05,082,28,11,59,285,22,14,25,143,27*7F
$GPGSV,4,3,16,16,03,029,,17,01,226,,22,50,192,25,23,33,280,27*71
$GPGSV,4,4,16,26,09,055,21,27,03,004,,31,45,116,19,32,07,133,09*71
$GPGLL,2150.70318,S,04635.56936,W,193416.00,A,A*6E
$GPRMC,193417.00,A,2150.70294,S,04635.56915,W,0.147,,170417,,,A*74
$GPVTG,,T,,M,0.147,N,0.271,K,A*25
$GPGGA,193417.00,2150.70294,S,04635.56915,W,1,08,1.16,1245.7,M,-6.4,M,,*7A
$GPGSA,A,3,01,22,31,23,03,14,08,32,,,,,2.02,1.16,1.66*08
$GPGSV,4,1,16,01,63,227,14,03,31,219,19,04,06,065,31,08,18,334,34*7F
$GPGSV,4,2,16,09,04,297,,10,05,082,27,11,59,285,22,14,25,143,27*70
$GPGSV,4,3,16,16,03,029,,17,01,226,,22,50,192,25,23,33,280,27*71
$GPGSV,4,4,16,26,09,055,21,27,03,004,,31,45,116,21,32,07,133,09*7A
$GPGLL,2150.70294,S,04635.56915,W,193417.00,A,A*6B
$GPRMC,193418.00,A,2150.70270,S,04635.56898,W,0.066,,170417,,,A*77
$GPVTG,,T,,M,0.066,N,0.122,K,A*22
$GPGGA,193418.00,2150.70270,S,04635.56898,W,1,08,1.16,1247.3,M,-6.4,M,,*7D
$GPGSA,A,3,01,22,31,23,03,14,08,32,,,,,2.02,1.16,1.66*08
$GPGSV,4,1,16,01,63,227,14,03,31,219,19,04,06,065,31,08,18,334,33*78
$GPGSV,4,2,16,09,04,297,,10,05,082,27,11,59,285,22,14,25,143,27*70
$GPGSV,4,3,16,16,03,029,,17,01,226,,22,50,192,25,23,33,280,27*71
$GPGSV,4,4,16,26,09,055,22,27,03,004,,31,45,116,21,32,07,133,09*79
$GPGLL,2150.70270,S,04635.56898,W,193418.00,A,A*6A
$GPRMC,193419.00,A,2150.70248,S,04635.56881,W,0.033,,170417,,,A*75
$GPVTG,,T,,M,0.033,N,0.062,K,A*27
$GPGGA,193419.00,2150.70248,S,04635.56881,W,1,08,1.16,1248.8,M,-6.4,M,,*7B
$GPGSA,A,3,01,22,31,23,03,14,08,32,,,,,2.02,1.16,1.66*08
$GPGSV,4,1,16,01,63,227,14,03,31,219,19,04,06,065,31,08,18,334,33*78
$GPGSV,4,2,16,09,04,297,,10,05,082,27,11,59,285,22,14,25,143,27*70
$GPGSV,4,3,16,16,03,029,,17,01,226,,22,50,192,25,23,33,280,26*70
$GPGSV,4,4,16,26,09,055,22,27,03,004,,31,45,116,21,32,07,133,09*79
$GPGLL,2150.70248,S,04635.56881,W,193419.00,A,A*68
$GPRMC,193420.00,A,2150.70236,S,04635.56862,W,0.050,,170417,,,A*7E
$GPVTG,,T,,M,0.050,N,0.092,K,A*2D
$GPGGA,193420.00,2150.70236,S,04635.56862,W,1,08,1.21,1249.3,M,-6.4,M,,*7B
$GPGSA,A,3,01,22,31,23,03,14,08,32,,,,,2.56,1.21,2.25*09
$GPGSV,4,1,16,01,63,227,12,03,31,219,19,04,06,065,31,08,18,334,33*7E
$GPGSV,4,2,16,09,04,297,,10,05,082,27,11,59,285,22,14,25,143,27*70
$GPGSV,4,3,16,16,03,029,,17,01,226,,22,50,192,25,23,33,280,25*73
$GPGSV,4,4,16,26,09,055,22,27,03,004,,31,45,116,21,32,07,133,07*77
$GPGLL,2150.70236,S,04635.56862,W,193420.00,A,A*66
$GPRMC,193421.00,A,2150.70224,S,04635.56843,W,0.090,,170417,,,A*73
$GPVTG,,T,,M,0.090,N,0.166,K,A*2B
$GPGGA,193421.00,2150.70224,S,04635.56843,W,1,08,1.21,1249.8,M,-6.4,M,,*71
$GPGSA,A,3,01,22,31,23,03,14,08,32,,,,,2.56,1.21,2.25*09
$GPGSV,4,1,16,01,63,227,12,03,31,219,19,04,06,065,31,08,18,334,34*79
$GPGSV,4,2,16,09,04,297,,10,05,082,27,11,59,285,21,14,25,143,27*73
$GPGSV,4,3,16,16,03,029,,17,01,226,,22,50,192,26,23,33,280,25*70
$GPGSV,4,4,16,26,09,055,22,27,03,004,,31,45,116,21,32,07,133,07*77
$GPGLL,2150.70224,S,04635.56843,W,193421.00,A,A*67
$GPRMC,193422.00,A,2150.70213,S,04635.56830,W,0.152,,170417,,,A*7F
$GPVTG,,T,,M,0.152,N,0.281,K,A*2E
$GPGGA,193422.00,2150.70213,S,04635.56830,W,1,07,1.21,1250.3,M,-6.4,M,,*7E
$GPGSA,A,3,01,22,31,23,03,14,08,,,,,,2.56,1.21,2.25*08
$GPGSV,4,1,16,01,63,227,12,03,31,219,19,04,06,065,31,08,18,334,33*7E
$GPGSV,4,2,16,09,04,297,,10,05,082,27,11,59,285,21,14,25,143,27*73
$GPGSV,4,3,16,16,03,029,,17,01,226,,22,50,192,26,23,33,280,24*71
$GPGSV,4,4,16,26,09,055,22,27,03,004,,31,45,116,21,32,07,133,07*77
$GPGLL,2150.70213,S,04635.56830,W,193422.00,A,A*64
$GPRMC,193423.00,A,2150.70195,S,04635.56803,W,0.053,,170417,,,A*73
$GPVTG,,T,,M,0.053,N,0.099,K,A*25
$GPGGA,193423.00,2150.70195,S,04635.56803,W,1,07,1.21,1251.1,M,-6.4,M,,*71
$GPGSA,A,3,01,22,31,23,03,14,08,,,,,,2.56,1.21,2.25*08
$GPGSV,4,1,16,01,63,227,12,03,31,219,20,04,06,065,31,08,18,334,34*73
$GPGSV,4,2,16,09,04,296,,10,05,082,26,11,59,285,20,14,25,143,26*73
$GPGSV,4,3,16,16,03,029,,17,01,226,,22,50,192,25,23,33,280,24*72
$GPGSV,4,4,16,26,09,055,23,27,03,004,,31,45,116,20,32,07,133,07*77
$GPGLL,2150.70195,S,04635.56803,W,193423.00,A,A*68
$GPRMC,193424.00,A,2150.70180,S,04635.56777,W,0.182,,170417,,,A*71
$GPVTG,,T,,M,0.182,N,0.337,K,A*2F
$GPGGA,193424.00,2150.70180,S,04635.56777,W,1,07,1.21,1251.6,M,-6.4,M,,*79
$GPGSA,A,3,01,22,31,23,03,14,08,,,,,,2.56,1.21,2.25*08
$GPGSV,4,1,16,01,63,227,12,03,31,219,19,04,06,065,30,08,18,334,34*78
$GPGSV,4,2,16,09,04,296,,10,05,082,27,11,59,285,19,14,25,143,27*79
$GPGSV,4,3,16,16,03,029,,17,01,226,,22,50,192,25,23,33,280,22*74
$GPGSV,4,4,16,26,09,055,26,27,03,004,,31,45,116,19,32,07,133,07*78
$GPGLL,2150.70180,S,04635.56777,W,193424.00,A,A*67
$GPRMC,193425.00,A,2150.70168,S,04635.56759,W,0.090,,170417,,,A*78
$GPVTG,,T,,M,0.090,N,0.167,K,A*2A
$GPGGA,193425.00,2150.70168,S,04635.56759,W,1,07,1.21,1252.0,M,-6.4,M,,*77
$GPGSA,A,3,01,22,31,23,03,14,08,,,,,,2.56,1.21,2.25*08
$GPGSV,4,1,16,01,63,227,12,03,31,219,19,04,06,065,30,08,18,334,34*78
$GPGSV,4,2,16,09,04,296,,10,05,082,27,11,59,286,18,14,25,143,27*7B
$GPGSV,4,3,16,16,03,029,,17,01,226,,22,50,192,25,23,33,280,21*77
$GPGSV,4,4,16,26,09,055,27,27,03,004,,31,45,116,18,32,07,1