New sensor could help doctors monitor patient rehabilitation after joint surgery