trying to make accel curves for our robot. im trying to implement:
I have implemented this using:
double position = 10;
double expon = -0.075;
int32_t input = 20;
double output;
double topExpon = expon * abs(double(input) - position);
double botExpon = double(127) * expon;
double top = 16129*(exp(topExpon) - (double)1);
double bottom = 127*(exp(botExpon) - (double)1);
output = (top / bottom);
when i run this standalone on my computer it outputs the proper expected value. however when I run the code on the vex v5 brain, it ouputs incorrectly.
I can not seem to figure out why this is happening other than the vex brain cannot do the calculations for some reason.
I have tried 127*(exp(botExpon) - (double)1)
pre-calculated and used that. same result.
im honestly at a loss right now as what to do.