@@ -316,7 +316,7 @@ public void setLastPose(Pose2d lastPose) {
316
316
* Add robot heading data to buffer. Must be called periodically for the
317
317
* <b>PNP_DISTANCE_TRIG_SOLVE</b> strategy.
318
318
*
319
- * @param timestampSeconds timestamp of the robot heading data.
319
+ * @param timestampSeconds Timestamp of the robot heading data.
320
320
* @param heading Field-relative robot heading at given timestamp. Standard WPILIB field
321
321
* coordinates.
322
322
*/
@@ -328,7 +328,7 @@ public void addHeadingData(double timestampSeconds, Rotation3d heading) {
328
328
* Add robot heading data to buffer. Must be called periodically for the
329
329
* <b>PNP_DISTANCE_TRIG_SOLVE</b> strategy.
330
330
*
331
- * @param timestampSeconds timestamp of the robot heading data.
331
+ * @param timestampSeconds Timestamp of the robot heading data.
332
332
* @param heading Field-relative robot heading at given timestamp. Standard WPILIB field
333
333
* coordinates.
334
334
*/
@@ -340,7 +340,20 @@ public void addHeadingData(double timestampSeconds, Rotation2d heading) {
340
340
* Clears all heading data in the buffer, and adds a new seed. Useful for preventing estimates
341
341
* from utilizing heading data provided prior to a pose or rotation reset.
342
342
*
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.
344
357
* @param heading Field-relative robot heading at given timestamp. Standard WPILIB field
345
358
* coordinates.
346
359
*/
0 commit comments