pburnage
December 27th, 2009, 22:17
Hi guys!
It's been a long long time...
I think I might have understood something about AI behaviour. It might have been posted already, but I could not find anything about it yet.
Ever since we started building planes and missions with Gregg (Pen32Win), we have been very keen on giving the AI a decent flight model that would behave properly in missions, under any circumstances. We could not figure out how to have a realistic flight model for the flyable aircraft that could be handled by CFS2 for the AI, so I came up with a separate airfile for the AI (and also a separate model so as to have different textures and better frame rate, and a different dp...) that took a long long time to tune,thanks to Gregg's efforts and patience.
I was at my parents place for Christmas and set up a Saitek AutoPilot module and rudder pedals for my father on his FSX rig. The AP module has a pitch trim wheel, and it really is a joy to use. So far, when I needed trimming on CFS2, I had always used the keyboard, and never found it very convenient. As I came back home yesterday, I fired up CFS2 (happens so rarely these days....) and tried to set up a rotary control on my joystick to control pitch trim. I then realized how different the sensitivity of pitch trim control was from one aircraft to another.
I woke up this night and suddenly the heavens opened, a divine light shone on me and a voice from above spoke onto me:"the AI are on autopilot, thus they are not controlled by any virtual joystick input, but by adjustment of trim, be it elevator, ailerons or rudder. If trims settings in the airfile are not properly set according to the other aerodynamics parameters, then the AP loop cannot control the AI correctly and diverges. This results in porpoising, AI unable to align a target, etc. etc." Then another voice spoke to me "will you stop moving like this in bed and go back to sleep?". I could not. I had to check. So I got up and switched the computer on.
I tried with the AF_Hawker Typhoon. As it was, the AI flew straight (thanks to Gregg), but I could not tune the elevator trim precisely enough on the flyable. So I added the following lines in the cfg file:
elevator_trim_effectiveness = 0.3
aileron_trim_effectiveness = 1.0
rudder_trim_effectiveness = 1.0
With these settings, I could tune the elevator trim, but now the AI would go up and down in slow motion. I looked for elevator trim entries in the airfile. In the primary aerodynamics section 1101, there is a pitch moment trim range value. This value divided by 1024 is the amount of elevator trim applied each time the elevator trim is incremented (I read this somewhere ages ago but never realized how important it could be). Then again, changing this value would affect the AI behaviour.
So this theory seems to hold. AI are on autopilot and are thus controlled through trim adjustments. I wish I had time to experiment more than this, but I know I won't, so I thought I'd better pass it to the community. Some of you may have the time to check and experiment this, and find some ways to set trim control values according to other aerodynamic parameters. I hope it helps increase our knowledge of this sim and improve it.
Cheers.
It's been a long long time...
I think I might have understood something about AI behaviour. It might have been posted already, but I could not find anything about it yet.
Ever since we started building planes and missions with Gregg (Pen32Win), we have been very keen on giving the AI a decent flight model that would behave properly in missions, under any circumstances. We could not figure out how to have a realistic flight model for the flyable aircraft that could be handled by CFS2 for the AI, so I came up with a separate airfile for the AI (and also a separate model so as to have different textures and better frame rate, and a different dp...) that took a long long time to tune,thanks to Gregg's efforts and patience.
I was at my parents place for Christmas and set up a Saitek AutoPilot module and rudder pedals for my father on his FSX rig. The AP module has a pitch trim wheel, and it really is a joy to use. So far, when I needed trimming on CFS2, I had always used the keyboard, and never found it very convenient. As I came back home yesterday, I fired up CFS2 (happens so rarely these days....) and tried to set up a rotary control on my joystick to control pitch trim. I then realized how different the sensitivity of pitch trim control was from one aircraft to another.
I woke up this night and suddenly the heavens opened, a divine light shone on me and a voice from above spoke onto me:"the AI are on autopilot, thus they are not controlled by any virtual joystick input, but by adjustment of trim, be it elevator, ailerons or rudder. If trims settings in the airfile are not properly set according to the other aerodynamics parameters, then the AP loop cannot control the AI correctly and diverges. This results in porpoising, AI unable to align a target, etc. etc." Then another voice spoke to me "will you stop moving like this in bed and go back to sleep?". I could not. I had to check. So I got up and switched the computer on.
I tried with the AF_Hawker Typhoon. As it was, the AI flew straight (thanks to Gregg), but I could not tune the elevator trim precisely enough on the flyable. So I added the following lines in the cfg file:
elevator_trim_effectiveness = 0.3
aileron_trim_effectiveness = 1.0
rudder_trim_effectiveness = 1.0
With these settings, I could tune the elevator trim, but now the AI would go up and down in slow motion. I looked for elevator trim entries in the airfile. In the primary aerodynamics section 1101, there is a pitch moment trim range value. This value divided by 1024 is the amount of elevator trim applied each time the elevator trim is incremented (I read this somewhere ages ago but never realized how important it could be). Then again, changing this value would affect the AI behaviour.
So this theory seems to hold. AI are on autopilot and are thus controlled through trim adjustments. I wish I had time to experiment more than this, but I know I won't, so I thought I'd better pass it to the community. Some of you may have the time to check and experiment this, and find some ways to set trim control values according to other aerodynamic parameters. I hope it helps increase our knowledge of this sim and improve it.
Cheers.