byu-magicc / roscopter

*Under Development* - A fully-featured multirotor autopilot for ROS
http://scholarsarchive.byu.edu/cgi/viewcontent.cgi?article=2324&context=facpub
52 stars 38 forks source link

heading wraps to avoid discontinuity when flying with changing headings #28

Closed wynn4 closed 6 years ago

wynn4 commented 6 years ago

I added wrapping to the heading measurement just like we do in the UAV book and ROSPlane. Without this change, the estimator will fail when you try to fly the copter around in a circle (heading changing as you go) because of the discontinuity when suddenly going from PI to -PI. wrap_heading