Permalink
Browse files

throw in some random negations. seems to work

  • Loading branch information...
1 parent 1aaf2ab commit c0b937b80073803923253487de189c479c9576ca @plobsing plobsing committed Apr 3, 2011
Showing with 3 additions and 2 deletions.
  1. +2 −1 controller.m
  2. +1 −1 planpath.m
View
@@ -15,7 +15,8 @@
d = (-[Kstate Kref]*[x3d; z])';
% Add steady-state trim to the controller's differential output.
- d = d + [-0.83301 0];
+ % d = d + [-0.83301 0];
+ d = [d(1)-0.83301 -d(2)];
% limit to physically achievable values
d = max(min(d, pi/4), -pi/4);
View
@@ -42,6 +42,6 @@
% we have control of pitch and roll, but pitch and yaw are how trajectory works
cur_roll = mod(X(9) + pi, 2*pi) - pi;
- P = [sqrt(pitch_star^2 + yaw_star^2), max(min(atan2(-yaw_star, pitch_star), -pi/8 - cur_roll), pi/8 - cur_roll)];
+ P = [sqrt(pitch_star^2 + yaw_star^2), -max(min(atan2(-yaw_star, pitch_star), -pi/8 - cur_roll), pi/8 - cur_roll)];
end

0 comments on commit c0b937b

Please sign in to comment.