I’m currently attempting to write a script in Python that will enable me to fetch IMU data (currently streaming at a rate of 2 outputs per second-- or 1 output each 0.5 seconds) from the BlueROV, and I would like to take the double integral to (albeit roughly) calculate the position, in the given discrete time interval, of the ROV. I plan on storing these values of position in a .csv file to analyze at a later time. I’m wondering what would be the most efficient method to continually retrieve IMU data and then perform the integration, and finally write this new position data to the file. I’m not quite sure as to how I should go about retrieving the data at each given time interval, and then performing the integration (over the same discrete time interval?) continuously for the duration of the ROV’s motion.
For reference, I am trying to track the position (from the on-board IMU) with the ultimate goal of identifying an error estimate (from a given command to the actual distance moved) to be later implemented in a Kalman Filter.
My apologies for any poor phrasing or description, I’m an undergrad and still pretty new to all of this, any help would be appreciated!