# How to read the real-time electrical angle or mechanical angle?

**URL:** <https://forum.zubax.com/t/how-to-read-the-real-time-electrical-angle-or-mechanical-angle/1499>\
**Category:** Electric drives\
**Created:** [December 1, 2019, 3:35pm UTC](https://forum.zubax.com/t/how-to-read-the-real-time-electrical-angle-or-mechanical-angle/1499 "2019-12-01T15:35:44Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![pavel-kirienko](https://forum.zubax.com/user_avatar/forum.zubax.com/pavel-kirienko/32/180_2.png) [@pavel-kirienko](https://forum.zubax.com/u/pavel-kirienko)\
**Post date:** [December 6, 2019, 6:47pm UTC](https://forum.zubax.com/t/how-to-read-the-real-time-electrical-angle-or-mechanical-angle/1499/2 "2019-12-06T18:47:12Z")

</div>

What you are looking for is possible to some extent, but it is not yet part of the stable interface. It will be supported better via the new Register API when UAVCAN v1 is available.

> [@jiamufight](#):
>
> As far as I know, to achieve field-oriented control of the motors, the Sapog/Télega has a good estimation of the shaft position.

Correct. Generally, under steady state operation, the accuracy is better than 30^{\circ} electrical.

At the moment, it is not possible to obtain this information via CAN, but you can read it via either USB or UART (you can access UART using DroneCode Probe or any other UART-capable hardware at 115200-8N1). In order to obtain this value, just read the value of the register `observer.x` (it has the type `float32[4]`) and take the last element, which contains the current electrical angle in radians. It is not possible to resolve the integer ambiguity that arises when you map the electrical angle onto the mechanical angle in multi-pole-pair motors.

I recommend you to follow the approach outlined here to find out how to read the register: [Short coding example for serial interrogation of Myxa - #10 by pavel-kirienko](https://forum.zubax.com/t/short-coding-example-for-serial-interrogation-of-myxa/1413/10). You can use Kucher either via UART or USB.

---

_[View the full topic](https://forum.zubax.com/t/how-to-read-the-real-time-electrical-angle-or-mechanical-angle/1499)._
