Package com.marslib.swerve
Class PhoenixOdometryThread.SyncData
java.lang.Object
com.marslib.swerve.PhoenixOdometryThread.SyncData
- Enclosing class:
- PhoenixOdometryThread
Container for a batch of synchronized odometry samples from a single module.
Arrays are pre-allocated at fixed capacity (PhoenixOdometryThread.MAX_SAMPLES). Use validCount
to determine how many entries are populated. Do not read beyond validCount - 1.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal double[]Accumulated drive encoder positions (motor rotations) since the last drain.final double[]FPGA timestamps corresponding to each position sample.final double[]Accumulated turn encoder positions (motor rotations) since the last drain.intNumber of valid samples in this batch. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
drivePositions
public final double[] drivePositionsAccumulated drive encoder positions (motor rotations) since the last drain. -
turnPositions
public final double[] turnPositionsAccumulated turn encoder positions (motor rotations) since the last drain. -
timestamps
public final double[] timestampsFPGA timestamps corresponding to each position sample. -
validCount
public int validCountNumber of valid samples in this batch. Only indices[0, validCount)are valid.
-
-
Constructor Details
-
SyncData
public SyncData()
-