@@ -316,7 +316,7 @@ public void setLastPose(Pose2d lastPose) {
316316 * Add robot heading data to buffer. Must be called periodically for the
317317 * <b>PNP_DISTANCE_TRIG_SOLVE</b> strategy.
318318 *
319- * @param timestampSeconds timestamp of the robot heading data.
319+ * @param timestampSeconds Timestamp of the robot heading data.
320320 * @param heading Field-relative robot heading at given timestamp. Standard WPILIB field
321321 * coordinates.
322322 */
@@ -328,7 +328,7 @@ public void addHeadingData(double timestampSeconds, Rotation3d heading) {
328328 * Add robot heading data to buffer. Must be called periodically for the
329329 * <b>PNP_DISTANCE_TRIG_SOLVE</b> strategy.
330330 *
331- * @param timestampSeconds timestamp of the robot heading data.
331+ * @param timestampSeconds Timestamp of the robot heading data.
332332 * @param heading Field-relative robot heading at given timestamp. Standard WPILIB field
333333 * coordinates.
334334 */
@@ -340,7 +340,20 @@ public void addHeadingData(double timestampSeconds, Rotation2d heading) {
340340 * Clears all heading data in the buffer, and adds a new seed. Useful for preventing estimates
341341 * from utilizing heading data provided prior to a pose or rotation reset.
342342 *
343- * @param timestampSeconds timestamp of the robot heading data.
343+ * @param timestampSeconds Timestamp of the robot heading data.
344+ * @param heading Field-relative robot heading at given timestamp. Standard WPILIB field
345+ * coordinates.
346+ */
347+ public void resetHeadingData (double timestampSeconds , Rotation3d heading ) {
348+ headingBuffer .clear ();
349+ addHeadingData (timestampSeconds , heading );
350+ }
351+
352+ /**
353+ * Clears all heading data in the buffer, and adds a new seed. Useful for preventing estimates
354+ * from utilizing heading data provided prior to a pose or rotation reset.
355+ *
356+ * @param timestampSeconds Timestamp of the robot heading data.
344357 * @param heading Field-relative robot heading at given timestamp. Standard WPILIB field
345358 * coordinates.
346359 */
0 commit comments