Replace log() with toDouble()

This commit is contained in:
Ryan Brott
2023-11-26 11:46:46 -08:00
parent 79d6297a46
commit 7ad781b8ac
4 changed files with 7 additions and 7 deletions

View File

@ -291,12 +291,12 @@ public final class MecanumDrive {
p.put("x", pose.position.x);
p.put("y", pose.position.y);
p.put("heading (deg)", Math.toDegrees(pose.heading.log()));
p.put("heading (deg)", Math.toDegrees(pose.heading.toDouble()));
Pose2d error = txWorldTarget.value().minusExp(pose);
p.put("xError", error.position.x);
p.put("yError", error.position.y);
p.put("headingError (deg)", Math.toDegrees(error.heading.log()));
p.put("headingError (deg)", Math.toDegrees(error.heading.toDouble()));
// only draw when active; only one drive action should be active at a time
Canvas c = p.fieldOverlay();

View File

@ -304,12 +304,12 @@ public final class TankDrive {
p.put("x", pose.position.x);
p.put("y", pose.position.y);
p.put("heading (deg)", Math.toDegrees(pose.heading.log()));
p.put("heading (deg)", Math.toDegrees(pose.heading.toDouble()));
Pose2d error = txWorldTarget.value().minusExp(pose);
p.put("xError", error.position.x);
p.put("yError", error.position.y);
p.put("headingError (deg)", Math.toDegrees(error.heading.log()));
p.put("headingError (deg)", Math.toDegrees(error.heading.toDouble()));
targetPoseWriter.write(new PoseMessage(txWorldTarget.value()));

View File

@ -12,7 +12,7 @@ public final class PoseMessage {
this.timestamp = System.nanoTime();
this.x = pose.position.x;
this.y = pose.position.y;
this.heading = pose.heading.log();
this.heading = pose.heading.toDouble();
}
}

View File

@ -30,7 +30,7 @@ public class LocalizationTest extends LinearOpMode {
telemetry.addData("x", drive.pose.position.x);
telemetry.addData("y", drive.pose.position.y);
telemetry.addData("heading (deg)", Math.toDegrees(drive.pose.heading.log()));
telemetry.addData("heading (deg)", Math.toDegrees(drive.pose.heading.toDouble()));
telemetry.update();
}
} else if (TuningOpModes.DRIVE_CLASS.equals(TankDrive.class)) {
@ -51,7 +51,7 @@ public class LocalizationTest extends LinearOpMode {
telemetry.addData("x", drive.pose.position.x);
telemetry.addData("y", drive.pose.position.y);
telemetry.addData("heading (deg)", Math.toDegrees(drive.pose.heading.log()));
telemetry.addData("heading (deg)", Math.toDegrees(drive.pose.heading.toDouble()));
telemetry.update();
}
} else {