How would I create a 'Rolleron' type effect, so the missile remains at a 0 degree angle at all times while flying and corrects itself back to 0 degrees whenever it goes beyond that value?
Example of the issue:
Missile I am creating will roll when pitching and yawing, I want to stabilize it with vizzy.
2,909
OIac2
7 months ago
Tags
Question3 Comments
- Log in to leave a comment
-
2,909 OIac2
@CloakPin The command chip is already set to rocket, thanks for the advice anyway.
-
387 CloakPin
Are you set to rocket pilot on the command chip?
That alone may settle it.
No Upvotes
Log in in to upvote this post.
You can use a PID control loop in Vizzy and the logic of the controller would look something like:
Kp = proportional value
Ki = integral value
Kd = derivative value
I = 0
target _ roll = roll _ limit * input (roll)
P = target _ roll - nav (roll)
I = I + ( target _ roll - nav ( roll ) ) * ( time (frame delta time) )
d1 = target _ roll - nav (roll)
wait (frame delta time) seconds
d2 = target _ roll - nav (roll)
D = d2 - d1 / time (frame delta time)
Roll = min of 1 and max of -1 and Kp * P + Ki * I + Kd * D
Some tuning would be needed for Kp, Ki, and Kd to achieve the desired output response and settling time. Then you'd use that output and put your aileron input to [CommandPodName].FlightProgram.Roll