diff --git a/backend/api.test/Database/Models.cs b/backend/api.test/Database/Models.cs index 834cba5f0..8c37ee7e0 100644 --- a/backend/api.test/Database/Models.cs +++ b/backend/api.test/Database/Models.cs @@ -42,10 +42,7 @@ public void AssertCoordinateConversion() predefinedOrientation ); - var flotillaPose = new Pose( - echoPose.Position, - echoPose.Orientation.Angle - ); + var flotillaPose = new Pose(echoPose.Position, echoPose.Orientation.Angle); Assert.Equal(predefinedOrientation, flotillaPose.Orientation); } @@ -67,7 +64,7 @@ private static AxisAngle ConvertOrientation(Orientation orientation) if (orientation.Z >= 0) angle = 2 * MathF.Acos(qw); - return new AxisAngle(new EchoVector(0, 0, 1), -angle); + return new AxisAngle(new EchoVector(0, 0, 1), angle); } public class AxisAngle diff --git a/backend/api/Database/Models/Pose.cs b/backend/api/Database/Models/Pose.cs index 7bb3e6ced..faf216f6b 100644 --- a/backend/api/Database/Models/Pose.cs +++ b/backend/api/Database/Models/Pose.cs @@ -91,7 +91,7 @@ public class Pose [Required] public Orientation Orientation { get; set; } - // Since this is a ground robot the only quaternion vector + // Since this is a ground robot the only quaternion vector // that makes sense is up (0, 0, 1) public Orientation AxisAngleToQuaternion(float angle) { @@ -127,9 +127,8 @@ float w public Pose(EchoVector enuPosition, float angle) { - float clockAngle = -angle; Position = new Position(enuPosition.East, enuPosition.North, enuPosition.Up); - Orientation = AxisAngleToQuaternion(clockAngle); + Orientation = AxisAngleToQuaternion(angle); } public Pose(Position position, Orientation orientation)