I am working on a project to develop a controller which can reject wind or gust if we know its direction and magnitude. I used the parrot sphinx wind option to generate wind in the simulation. When I analysed the parrot anafi drone behavior in different wind conditions by just hovering it, I saw it has a very good inner loop autopilot, it can reject the wind pretty well and stay at the same position. But once I give some some PCMD commands it starts drifting away. What my understanding is drone is trying to achieve the pose we give as arguments in the PCMD command. Because of the presence of the wind it is unable to do that and hence it drifts. But my concern is the way it drifts. So for example I give a crosswind, and 0,0,0,0 PCMD command, I hope the drone to drift sidewards in the direction of wind, but what I saw is surprising, the drone makes random circular motion. Same case with headwind. Infact what I saw is, irrespective of wind direction, the drone kinda makes random circular motion. I cannot understand what’s happening. Can someone explain what exactly PCMD commands try to do and what is the inner loop autopilot trying to achieve? Why do we see this random circular motion for all wind direction. Any help is appreciated.
PS: This is all in parrot sphinx simulation