Class DTS
java.lang.Object
org.firstinspires.ftc.teamcode.fy23.units.DTS
An immutable vector represented as Drive, Turn, and Strafe axes.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionnegate()
Refactor the DTS to be within a normal range, keeping the sum of the axes between -1 and 1 in this case, while maintaining the proportions between the axes.rotate
(double radians) Rotate the drive and strafe axes by a value in Radians.scale
(double factor) also known as multiplicationwithDrive
(double newDrive) withStrafe
(double newStrafe) withTurn
(double newTurn)
-
Field Details
-
drive
public final double drive -
turn
public final double turn -
strafe
public final double strafe
-
-
Constructor Details
-
DTS
public DTS(double argDrive, double argTurn, double argStrafe) -
DTS
public DTS()
-
-
Method Details
-
negate
-
add
-
scale
also known as multiplication -
normalize
Refactor the DTS to be within a normal range, keeping the sum of the axes between -1 and 1 in this case, while maintaining the proportions between the axes. In other words, scales everything down so that the sum of the axes is between -1 and 1. -
withDrive
-
withTurn
-
withStrafe
-
rotate
Rotate the drive and strafe axes by a value in Radians. Leaves the turn axis unmodified. Perhaps most useful for field-oriented driving, or perhaps driving with independent axes on an "XDrive" base.
-