So i want to make a gyrocope that adjusts Yaw heading automaticly, like this:
(input Heading 0-360) ==>
Yaw steers to (heading 0-360)
Could someone please help me?
So i want to make a gyrocope that adjusts Yaw heading automaticly, like this:
==>
Yaw steers to (heading 0-360)Could someone please help me?
@winterro
wouldn't clamp(Yaw - YawRate/90, -1, 1) work?
@ZeroWithSlashedO sort of
so
kinda like the Head Hold tail rotor mode?
don't quote me on this but technically this is simpler and should work fine:
((InputHeading - Heading)-YawRate)/180
You might need to divide the output by a bigger number depending on the application
PID(70 * sum(Yaw), Heading, 0.1, 0, 0.1)
Replace
sum(Yaw)
with whatever input you want for the heading, the70 *
part is just there to make the input value change faster since sum() is normally very slow. The spaces are optional also, I just use them to make reading code a bit easier.Hope that helps.
The simpler the better, so i can look how it works