Capacitor sensor to measure angle