Panda and RVC

Yes Panda RVC will have to continuously read the BNO. And what you describe is essentially what’s happening. But it’s far simpler and easier to go back in time than to read for a future gga. All you have to do is continuously keep the past dozen readings or so in a circular buffer. Then when GGA comes in you just grab the 9th past reading (or whatever you need). And with a circular buffer, going back in time is a simple matter of adding to the current buffer index, and using modulus to wrap around. The demo code above shows how this is done.

Also the circular buffer makes it easy to take an average window of several readings, rather than just a single value. Just to even out any spikes as the tractor bounces. I’m not sure if that is required or helps, though.

No matter how you cut it you have to continuously read the BNO, unlike the I2C panda code, which is why the circular buffer is a good solution, since it’s nearly free. What I mean by that is you have to read the BNO values into a buffer every 10 ms regardless, so if you just move a buffer index along each time you read, you can keep the older readings at no cost.