feat!: update angle to steps conversion factors

This commit is contained in:
Julien Oculi 2025-06-05 15:59:14 +02:00
parent 1831dfe0ab
commit 3e745059a2

View file

@ -6,11 +6,11 @@ double radToDeg(double rad) { return rad * 180.0 / M_PI; }
void angleToStep(long &stepX, long &stepY, double angleX, double angleY) {
// TODO remove magic numbers
double stepRatioX = M_PI / ((51.2 / 15.0) * (100.0 * 64.0));
double stepRatioY = M_PI / ((48.0 / 15.0) * (100.0 * 64.0));
double stepRatioX = 6000 / M_PI;
double stepRatioY = 6500 / M_PI;
stepX = angleX / stepRatioX;
stepY = angleY / stepRatioY;
stepX = angleX * stepRatioX;
stepY = angleY * stepRatioY;
}
void cartesianToPolar(long &stepX, long &stepY, double zeroX, double zeroY,