feat!: update angle to steps conversion factors
This commit is contained in:
parent
1831dfe0ab
commit
3e745059a2
|
|
@ -6,11 +6,11 @@ double radToDeg(double rad) { return rad * 180.0 / M_PI; }
|
||||||
|
|
||||||
void angleToStep(long &stepX, long &stepY, double angleX, double angleY) {
|
void angleToStep(long &stepX, long &stepY, double angleX, double angleY) {
|
||||||
// TODO remove magic numbers
|
// TODO remove magic numbers
|
||||||
double stepRatioX = M_PI / ((51.2 / 15.0) * (100.0 * 64.0));
|
double stepRatioX = 6000 / M_PI;
|
||||||
double stepRatioY = M_PI / ((48.0 / 15.0) * (100.0 * 64.0));
|
double stepRatioY = 6500 / M_PI;
|
||||||
|
|
||||||
stepX = angleX / stepRatioX;
|
stepX = angleX * stepRatioX;
|
||||||
stepY = angleY / stepRatioY;
|
stepY = angleY * stepRatioY;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cartesianToPolar(long &stepX, long &stepY, double zeroX, double zeroY,
|
void cartesianToPolar(long &stepX, long &stepY, double zeroX, double zeroY,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue