determining when a rope with bodyhas moved specific distance

Using Box2d and Cocos2d I have made a rope of revolute joint segments with a body attached to the lowest segment (weldJoint) which I move using a mouse joint. The rope is hanging downward. How can I set conditions to tell when the attached body has covered double the distance it is swiped (mouseJoint) in the opposite direction. For example, if I swipe the body (attached to the rope) 45 degrees to the left I should know (maybe by some message or something) when it swings back 45 degrees to the right. Please help.

Original thread: https://box2d.org/forum/viewtopic.php?t=8720