Hi guys,
I am working in a flight simulator project where I am integrating HOTAS-Warthog throttle and joystick to fly the aircraft. I am using SDL_joystick to read joystick axis data and passing that axis to a flight model library to fly the aircraft. The flight model library provide physically accurate flight behaviour.
My joystick axis values are ranging from ~ negative 32000 to 32000. I am normalizing tat value from -1 to 1 before passing that to my flight model.However, I am having some issue where my aircraft showing some unexpected behaviour. When I try to roll my air craft, the aircraft change its pitch slightly. What is happening is, while moving my joystick through x axis to roll the aircraft, the joystick giving some small value in its y axis too.
Which resulting some minor pitch changes in my aircraft. I have a dead zone configure but this is not helping and I guess it is only normal that from usability point of view, an analog joystick may give out some small value in different axis even though I am not intending to move to that axis.
My question is, is there any way to make the flight experience better by removing unexpected value from the other axis that I am not moving? The challenges here is the code should be able to filter any minor y axis value if I am moving the joystick to x axis and vice versa.
Or is there any better way to achieve my goal? Any thought?
Thanks!
M