Fixed yaw error normalization issue

Esse commit está contido em:
Laurent Eschenauer
2013-08-30 16:36:07 +02:00
commit a81fb37923
+2 -2
Ver Arquivo
@@ -299,8 +299,8 @@ Controller.prototype._control = function(d) {
; ;
// Normalize eyaw within [-180, 180] // Normalize eyaw within [-180, 180]
while(eyaw < Math.PI/2) eyaw += Math.PI; while(eyaw < -Math.PI) eyaw += (2 * Math.PI);
while(eyaw >= Math.PI/2) eyaw -= Math.PI; while(eyaw > Math.PI) eyaw -= (2 * Math.PI);
// Check if we are within the target area // Check if we are within the target area
if ((Math.abs(ex) < EPS_LIN) && (Math.abs(ey) < EPS_LIN) && (Math.abs(ez) < EPS_ALT) && (Math.abs(eyaw) < EPS_ANG)) { if ((Math.abs(ex) < EPS_LIN) && (Math.abs(ey) < EPS_LIN) && (Math.abs(ez) < EPS_ALT) && (Math.abs(eyaw) < EPS_ANG)) {