Go to the source code of this file.
|
| float * | s = a * a |
| |
| float float * | c |
| |
| float | x |
| |
| float | abs_x = fabsf(x) |
| |
| float | a = min(abs_x, abs_y) / (max(abs_x, abs_y)) |
| |
| float | r |
| |
◆ __attribute__()
◆ _electricalAngle()
| float _electricalAngle |
( |
float |
shaft_angle, |
|
|
int |
pole_pairs |
|
) |
| |
Electrical angle calculation
- Parameters
-
| shaft_angle | - shaft angle of the motor |
| pole_pairs | - number of pole pairs |
Definition at line 83 of file foc_utils.cpp.
◆ if() [1/2]
◆ if() [2/2]
◆ abs_x
Initial value:=
((-0.0464964749f *
s + 0.15931422f) *
s - 0.327622764f) *
s *
a +
a
Definition at line 63 of file foc_utils.cpp.