This forum uses cookies This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

 Calculate the traveled angle from the gyro p.saal Junior Member Posts: 3 Threads: 1 Joined: Oct 2023 10-06-2023, 11:34 AM Hello Everyone, i'd like to set up a custom experiment to improve the workflow. But I don't fully understand the complex editor and need some help to make the right connections. My Experiment: My phone lies on the axis of a motor. With the Gyroscope Experiment I get the rate of rotation. Now I would like to expand this experiment to plot the traveled angle. In formulas it looks like this: 1. w [rad/s] -> p [°/s] ->DONE p = w/(2*PI)*360 2. p [°/s] -> a [°] (absolute angle) -> IN PROGRESS a = p * (actual time - last time) + last a actual time is the time of the latest measurement last time is the time of the last measurement last a is the last calculated a Where I need help: - How to calculate (get) the timestamp of the last measurement (last time)? - How to feed the second formula with the last calculated angle (last a)? In the graph it would display the traveled angle (y-axis) and the time (x-axis) I.e. "The motor reached 90° after 10s" In Excel the formulas work fine and it seems to be very precise. Thank you for all the help! ntesla Junior Member Posts: 1 Threads: 0 Joined: Oct 2023 10-09-2023, 03:28 PM Hello, you may try to use already built in function "integrate" to get the angle by integrating gyro output. The sampling rate is constant (given by the phone you use) and you can scale the final integration with the period used. Hope this is helpful. Jens Noriʇzsɔɥ Senior Member Posts: 498 Threads: 22 Joined: Apr 2020 Institution: RWTH Aachen University 10-09-2023, 08:50 PM You could find an example on counting “turns” that you could adapt: https://phyphox.org/forums/showthread.php?tid=1334 (or copy the required bits – best with a text editor)… p.saal Junior Member Posts: 3 Threads: 1 Joined: Oct 2023 10-10-2023, 07:57 AM (10-09-2023, 08:50 PM)Jens Noritzsch Wrote: You could find an example on counting “turns” that you could adapt: https://phyphox.org/forums/showthread.php?tid=1334 (or copy the required bits – best with a text editor)… Thank you for your reply! This is a very nice example for what I want to do. It should be easy to modify the formulas. p.saal Junior Member Posts: 3 Threads: 1 Joined: Oct 2023 10-10-2023, 10:38 AM (This post was last modified: 10-11-2023, 08:11 AM by p.saal.) It works for my purpose now. I only modified the formulas to get the angle instead of turns. Attached Files   gyroscope_angle.phyphox (Size: 28.27 KB / Downloads: 151) « Next Oldest | Next Newest »

Forum Jump: