byu-magicc / rosplane

A basic fixed-wing autopilot for ROS - based on the textbook "Small Unmanned Aircraft: Theory and Practice" by Randy Beard and Tim McLain
94 stars 47 forks source link

Negative angle of attack even in climb #44

Closed chunga2 closed 6 years ago

chunga2 commented 6 years ago

I launched the default ROSplane simulation (take off at center, orbit center at 100 meters at 30 meters/sec) but the angle of attack/alpha measurement in /fixedwing/truth is always negative. Based on Small Unmanned Aircraft: Theory and Practice, pointing the nose up should result in a positive alpha but alpha tends to stay at around -0.045 to -0.05, even when climbing altitude.

gellings commented 6 years ago

@chunga2 Thanks for your interest in rosplane! I think what your seeing is due to C_L_0 being positive (see figure 4.7 in the book). This means that at zero (or slightly negative) angle of attack (aoa) the plane should still have positive lift. Since you need about the same amount of lift throughout the flight then you will have about the same aoa the whole time. Further, if the aircraft is flying around like a rocket (30 m/s is about 70 mph) then it wont need very much aoa to get lots of lift (equation 4.6). We should probably slow that plane down to 20 m/s or less. What really should change as you fly up and down is the pitch angle (theta). You can try plotting theta and alpha together to understand what I'm talking about a little better.

We of course have another problem with the plugins in that they do not currently incorporate wind models into the wind triangle (refer to figure 2.12). The problem is that the body frame wind model doesn't work very well for multiple UAVs flight in the same wind. We have given that some thought but don't have solutions until someone tackles that problem.

Feel free to ask other questions and hopefully we'll get this rosplane working buttery smooth!

wynn4 commented 6 years ago

@chunga2 I agree with what @gellings said. The fixedwing.launch file has been updated to command an airspeed of 15 m/s (which is much closer to what it should be for this aircraft). I ran the simulation and now alpha is still negative, but much less so at -0.015 radians (-0.86 degrees).

chunga2 commented 6 years ago

Ok, I was worried this was unintended behavior. Thanks for responding!