I’m trying to implement a “rewind” function for our robot state. Essentially, what I want is something like this:
-Periodically (say, every 50ms) a gyro angle is written into this data structure
-At any time, I would like to be to request the “historical” value of the gyro from somewhere between 0 and 3 seconds ago.
What sort of data structure should I be using?