Your diagram is unclear and does not convey your system properly. You have a node that is labelled 'cal' and you have 'setpoint' connected to it. You may need to brush up on block diagram drawing first. Also....your gyro-only system won't self-stabilise. That's what happens when you use gyro alone.
If you draw an incomplete diagram like the one shown (which is your diagram that I have loaded for you here), that shows unconventional symbolism that nobody can interpret (except maybe yourself), then it's impossible for anybody to have a proper conversation on this topic.
Step #1 is to draw an adequately detailed closed loop system diagram (of your system).]
Try to convey your method clearly. Avoid presenting something vague - that people cannot interpret properly.
adelphysi:
again i thought just looking at the code for any expert than me will help , yes gyrovalue is the change of angle and that is a basic work of gyro does it give any thing else , i mean the gyro ?? it gives basically degrees/sec
It's not the job of experts here to decipher your code for you. If you have something to new to share, then convey it in a normal way ..... not in a code that somebody needs to reverse engineer for you. Also, when you mean 'will help'.....does that mean to help you? Also note that our UAVs are very stable with PID controllers. Mine (just like a lot of UAVs being used these days) employ accelerometers and gyros ...... to get best of both worlds.
