Using an Arduino for a Project

We are actually looking to use the law of cosines to calculate the angle of the elbow joint. I need something to allow for the measurement of the distance between the patients upper arm directly to the forearm. Would a potentiometer be better for measuring distances?

Thanks