Class YawRateHistory
java.lang.Object
frc.spectrumLib.localization.YawRateHistory
Ring buffer of chassis yaw-rate samples, for the lookback spin gate.
From the 2026 offseason Vision.peakYawRateRadPerSec(): frames that reach the robot now
were captured up to a few tenths of a second ago, so the gate has to ask whether the robot was
spinning then, not whether it is spinning now. A frame arriving just after a spin stops
was captured during it.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
YawRateHistory
public YawRateHistory(int capacity) - Parameters:
capacity- samples kept; at 50 Hz, 64 covers well over a second
-
-
Method Details
-
record
public void record(double timeSeconds, double yawRateRadPerSec) Records |yaw rate| at a time. -
peak
public double peak(double nowSeconds, double lookbackSeconds) Largest |yaw rate| recorded withinlookbackSecondsofnowSeconds.
-