These equations are for Left Drive is normal and Right Drive is reversed
mVSpeed is the vertial vector component due to left joy y-axis Speed
mHSpeed is the horizontal vector component due to left joy x-axis Speed
mYaw is the Left (and -Right) forward vector component due to right joy x-axis Yaw
Where Range=127 is the input (joy) range magnitude and the motor range magnitude
Successive Component Scaling Equations Extrapolated from Arcade function |
Direct Output Scaling Equations Sourced from this VEX thread |
---|---|
m1VSpeed = VSpeed - (VSpeed*ABS(HSpeed)/Range)/2 mVSpeed = m1VSpeed - (m1VSpeed*ABS(Yaw)/Range)/2 |
LFus = VSpeed + HSpeed + Yaw (where us means unscaled) LRus = VSpeed - HSpeed + Yaw |
m1HSpeed = HSpeed - (HSpeed*ABS(VSpeed)/Range)/2 mHSpeed = m1HSpeed - (m1HSpeed*ABS(Yaw)/Range)/2 |
RFus = VSpeed - HSpeed - Yaw RRus = VSpeed + HSpeed - Yaw |
m1Yaw = Yaw - (Yaw*ABS(VSpeed)/Range)/2 mYaw = m1Yaw - (m1Yaw*ABS(HSpeed)/Range)/2 |
arr = {ABS(LFus), ABS(LRus), ABS(RFus), ABS(RRus), Range} max = MAX_ELEMENT(begin(arr),end(arr)) |
LF = mVSpeed + mHSpeed + mYaw | LF = Range * LFus / max |
LR = mVSpeed - mHSpeed + mYaw | LR = Range * LRus / max |
RF = mVSpeed - mHspeed - mYaw | RF = Range * RFus / max |
RR = mVSpeed + mHSpeed - mYaw | RR = Range * RRus / max |
Drag the slider set the current value of Yaw.
Drag the slider set the current value of Yaw.