Calculating the Length from the Swing Period

The period of a pendulum is calculated using the following formula:

images/_pragprog/svg-block-001.png

We can rearrange the formula to calculate the length like this:

images/_pragprog/svg-block-002.png

Note that the units in these formulas are meter and second, which is usually the case in physics. The constant g in this formula stands for the gravitational acceleration, and its value is 9.81 meters per square second. T stands for the period of the swing in seconds. This means the user needs to move the markers to two adjacent maximums and we need to calculate the ...

Get Build Location-Based Projects for iOS now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.