Fix typos with cspell (#6972)

This commit is contained in:
Gold856
2024-08-17 10:44:34 -04:00
committed by GitHub
parent 780b1e0391
commit b12b83aa89
83 changed files with 151 additions and 152 deletions

View File

@@ -19,7 +19,7 @@ import org.ejml.simple.SimpleMatrix;
*
* <p>States is the dimensionality of the state. 2*States+1 weights will be generated.
*
* <p>[1] R. Van der Merwe "Sigma-Point Kalman Filters for Probabilitic Inference in Dynamic
* <p>[1] R. Van der Merwe "Sigma-Point Kalman Filters for Probabilistic Inference in Dynamic
* State-Space Models" (Doctoral dissertation)
*
* @param <S> The dimensionality of the state. 2 * States + 1 weights will be generated.

View File

@@ -22,7 +22,7 @@ public final class DAREJNI extends WPIMathJNI {
* </ul>
*
* <p>Only use this function if you're sure the preconditions are met. Solves the discrete
* alegebraic Riccati equation.
* algebraic Riccati equation.
*
* @param A Array containing elements of A in row-major order.
* @param B Array containing elements of B in row-major order.

View File

@@ -159,7 +159,7 @@ public class ChassisSpeeds implements ProtobufSerializable, StructSerializable {
/**
* Discretizes a continuous-time chassis speed.
*
* <p>This function converts a continous-time chassis speed into a discrete-time one such that
* <p>This function converts a continuous-time chassis speed into a discrete-time one such that
* when the discrete-time chassis speed is applied for one timestep, the robot moves as if the
* velocity components are independent (i.e., the robot moves v_x * dt along the x-axis, v_y * dt
* along the y-axis, and omega * dt around the z-axis).

View File

@@ -23,11 +23,11 @@ public class DifferentialDriveWheelPositions
/** Distance measured by the right side. */
public double rightMeters;
/** DifferentialDriveWheelPostions struct for serialization. */
/** DifferentialDriveWheelPositions struct for serialization. */
public static final DifferentialDriveWheelPositionsStruct struct =
new DifferentialDriveWheelPositionsStruct();
/** DifferentialDriveWheelPostions struct for serialization. */
/** DifferentialDriveWheelPositions struct for serialization. */
public static final DifferentialDriveWheelPositionsProto proto =
new DifferentialDriveWheelPositionsProto();

View File

@@ -88,7 +88,7 @@ public final class NumericalIntegration {
/**
* Performs 4th order Runge-Kutta integration of dx/dt = f(x) for dt.
*
* @param <States> A Num prepresenting the states of the system.
* @param <States> A Num representing the states of the system.
* @param f The function to integrate. It must take one argument x.
* @param x The initial value of x.
* @param dtSeconds The time over which to integrate.

View File

@@ -96,7 +96,7 @@ public class ExponentialProfile {
/**
* Computes the max achievable velocity for an Exponential Profile.
*
* @return The seady-state velocity achieved by this profile.
* @return The steady-state velocity achieved by this profile.
*/
public double maxVelocity() {
return -maxInput * B / A;

View File

@@ -50,7 +50,7 @@ public class TrapezoidProfile {
private double m_endAccel;
private double m_endFullSpeed;
private double m_endDeccel;
private double m_endDecel;
/** Profile constraints. */
public static class Constraints {
@@ -185,7 +185,7 @@ public class TrapezoidProfile {
m_endAccel = accelerationTime - cutoffBegin;
m_endFullSpeed = m_endAccel + fullSpeedDist / m_constraints.maxVelocity;
m_endDeccel = m_endFullSpeed + accelerationTime - cutoffEnd;
m_endDecel = m_endFullSpeed + accelerationTime - cutoffEnd;
State result = new State(m_current.position, m_current.velocity);
if (t < m_endAccel) {
@@ -196,9 +196,9 @@ public class TrapezoidProfile {
result.position +=
(m_current.velocity + m_endAccel * m_constraints.maxAcceleration / 2.0) * m_endAccel
+ m_constraints.maxVelocity * (t - m_endAccel);
} else if (t <= m_endDeccel) {
result.velocity = goal.velocity + (m_endDeccel - t) * m_constraints.maxAcceleration;
double timeLeft = m_endDeccel - t;
} else if (t <= m_endDecel) {
result.velocity = goal.velocity + (m_endDecel - t) * m_constraints.maxAcceleration;
double timeLeft = m_endDecel - t;
result.position =
goal.position
- (goal.velocity + timeLeft * m_constraints.maxAcceleration / 2.0) * timeLeft;
@@ -232,7 +232,7 @@ public class TrapezoidProfile {
endFullSpeed = Math.max(endFullSpeed, 0);
final double acceleration = m_constraints.maxAcceleration;
final double decceleration = -m_constraints.maxAcceleration;
final double deceleration = -m_constraints.maxAcceleration;
double distToTarget = Math.abs(target - position);
if (distToTarget < 1e-6) {
@@ -241,40 +241,39 @@ public class TrapezoidProfile {
double accelDist = velocity * endAccel + 0.5 * acceleration * endAccel * endAccel;
double deccelVelocity;
double decelVelocity;
if (endAccel > 0) {
deccelVelocity = Math.sqrt(Math.abs(velocity * velocity + 2 * acceleration * accelDist));
decelVelocity = Math.sqrt(Math.abs(velocity * velocity + 2 * acceleration * accelDist));
} else {
deccelVelocity = velocity;
decelVelocity = velocity;
}
double fullSpeedDist = m_constraints.maxVelocity * endFullSpeed;
double deccelDist;
double decelDist;
if (accelDist > distToTarget) {
accelDist = distToTarget;
fullSpeedDist = 0;
deccelDist = 0;
decelDist = 0;
} else if (accelDist + fullSpeedDist > distToTarget) {
fullSpeedDist = distToTarget - accelDist;
deccelDist = 0;
decelDist = 0;
} else {
deccelDist = distToTarget - fullSpeedDist - accelDist;
decelDist = distToTarget - fullSpeedDist - accelDist;
}
double accelTime =
(-velocity + Math.sqrt(Math.abs(velocity * velocity + 2 * acceleration * accelDist)))
/ acceleration;
double deccelTime =
(-deccelVelocity
+ Math.sqrt(
Math.abs(deccelVelocity * deccelVelocity + 2 * decceleration * deccelDist)))
/ decceleration;
double decelTime =
(-decelVelocity
+ Math.sqrt(Math.abs(decelVelocity * decelVelocity + 2 * deceleration * decelDist)))
/ deceleration;
double fullSpeedTime = fullSpeedDist / m_constraints.maxVelocity;
return accelTime + fullSpeedTime + deccelTime;
return accelTime + fullSpeedTime + decelTime;
}
/**
@@ -283,7 +282,7 @@ public class TrapezoidProfile {
* @return The total time the profile takes to reach the goal.
*/
public double totalTime() {
return m_endDeccel;
return m_endDecel;
}
/**