Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why has to be the user motion sample rate at 10 Hz? #380

Open
mecheverriaALOR opened this issue Jul 10, 2023 · 1 comment
Open

Why has to be the user motion sample rate at 10 Hz? #380

mecheverriaALOR opened this issue Jul 10, 2023 · 1 comment

Comments

@mecheverriaALOR
Copy link

Hi,

I have a doubt about the user motion sample rate, why has it to be at 10Hz. I have done a little modification in order to get the timestamp from the same CSV file (it is going to have another column with the time value) as the user motion, so that instead of using the incremental time, "grx = incGpsTime(grx, 0.1);" to use the read timestamp value. The idea is to have timestamps that change with sample rate distinct to 10 Hz, is it possible?

Thank you in advance.

Mikel

@KingofTown
Copy link

It's simply because the motion is stored in a C Array with the index == 1/10 seconds. At any given time T, the position at time T is just a lookup at that index.

To do it in C, I'd just modify the readMotionFile function to do a time difference between each point and if the deltaT is >0.1, just repeat the previous position entry for that time. If deltaT is < 0.1, skip the input and read the next one. The positions are used at the fixed 0.1 second interval anyway so you aren't going to get any advantage with steps between those times. This way you can input any size motion file and it will be decimated to match the 0.1 second interval.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants