double inner = 45 ; // Inner angle of the turn double outer = 0.000 ; // Outer angle of the turn to calculate float speedRatio = 0.000; // Ratio of speed of outer wheel to speed of inner wheel float angleRatio =0; float pi = 3.141592; float a =0; float aa=0; float b =0; float c =0; float d =0; float e =0; float f =0; void setup() { Serial.begin(9600); Serial.print("Inner angle of the turn = "); Serial.println (inner,5); Serial.print("Outer angle / Inner angle ratio = "); a = inner*pi/180*1.1; b = sin(a); c = (b+1.65)/1.67; angleRatio =c; //angleRatio = (sin(inner*pi/180)+1.65)/1.65; Serial.println (angleRatio,6); Serial.print("Outer angle of the turn = "); outer = inner/c; Serial.println (outer,5); Serial.print("Ratio of speed of outer wheel to inner wheel = "); d = inner*1.65*pi/180; e = sin(d); f = (e+2.7)/2.7; speedRatio= f; //speedRatio= (sin(inner*1.65*pi/180)+2.7)/2.7; Serial.println (speedRatio,6); } void loop() { // nothing }