mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-19 00:41:41 +00:00
Correct image capture time (#501)
* Correct image capture time `Timer.getFPGATimesptamp()` returns the current time in _seconds_, but `res.getLatencyMillis()` is in _miliseconds_. * Correct image capture time (correctly) * Change double literal to not use suffix Co-authored-by: shueja-personal <32416547+shueja-personal@users.noreply.github.com>
This commit is contained in:
@@ -86,7 +86,7 @@ public class DrivetrainPoseEstimator {
|
||||
|
||||
var res = cam.getLatestResult();
|
||||
if (res.hasTargets()) {
|
||||
double imageCaptureTime = Timer.getFPGATimestamp() - res.getLatencyMillis();
|
||||
double imageCaptureTime = Timer.getFPGATimestamp() - res.getLatencyMillis() / 1000.0;
|
||||
Transform3d camToTargetTrans = res.getBestTarget().getCameraToTarget();
|
||||
var transform =
|
||||
new Transform2d(
|
||||
|
||||
Reference in New Issue
Block a user