Commit 12c691d6 authored by Julian Zobel's avatar Julian Zobel 🦄
Browse files

Bugfix smm

parent f3fd5f01
......@@ -298,9 +298,11 @@ public class StateMulticopterMovement implements UAVMovementModel {
assert velocityVector.getZ() == 0;
if(horizontalAngleToPosition(currentTargetPosition) != 0) {
System.out.println(Math.toDegrees(horizontalAngleToPosition(currentTargetPosition)));
System.out.println();
}
Monitor.log(StateMulticopterMovement.class, Monitor.Level.WARN,
"(Horizontal Flight) The Multicopter is not properly aligned to the target. Deviation: " + Math.toDegrees(horizontalAngleToPosition(currentTargetPosition))+"°", positionVector);
}
double v = flightVelocity();
if(v != velocityVector.getLength() && Math.abs(v - velocityVector.getLength()) > MARGIN) {
......@@ -374,9 +376,9 @@ public class StateMulticopterMovement implements UAVMovementModel {
private long horizontalDeceleration(long time) {
assert velocityVector.getZ() == 0;
if( horizontalAngleToPosition(currentTargetPosition) != 0) {
if(horizontalAngleToPosition(currentTargetPosition) != 0) {
Monitor.log(StateMulticopterMovement.class, Monitor.Level.WARN,
"The Multicopter is not properly aligned to the target. Deviation: " + Math.toDegrees(horizontalAngleToPosition(currentTargetPosition))+"°", positionVector);
"(Horizontal Deceleration) The Multicopter is not properly aligned to the target. Deviation: " + Math.toDegrees(horizontalAngleToPosition(currentTargetPosition))+"°", positionVector);
}
double v = velocityVector.getLength();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment