The website and forum will be intermittently unavailable while we're making some security updates.
File uploads to the download hangar are also disabled until further notice.

A.I. flaps question

The Tutorials forum section is the place where you can learn the various techniques that go into the creation of AI traffic packages.
User avatar
YoYo
Second Lieutenant
Second Lieutenant
Posts: 98
Joined: 27 Feb 2021, 07:55
Version: P3D

A.I. flaps question

Post by YoYo »

It's me again, maybe some are fed up with me ;) but lately Im tweaking AI traffic. :oops:
One thing bothers me - I noticed that some of models, which have flaps, have it on down position from the start the sim and during the flight too (!). I can solve it but fixing animation (turn it off on zero position by MCX) but maybe there is some other way to the correct operation of the flaps or is it normal for AI traffic?

Image

Image
Webmaster of yoyosims.pl.
Image
User avatar
John Young
MAIW Developer
MAIW Developer
Posts: 4206
Joined: 12 Jul 2008, 15:15

Re: A.I. flaps question

Post by John Young »

There's a variety of xml code for different configurations, unless you just want default flaps.

What do you want to achieve?

John
User avatar
Firebird
MAIW Admin
MAIW Admin
Posts: 12112
Joined: 11 Aug 2006, 21:04
Version: FS9
Location: EGLL

Re: A.I. flaps question

Post by Firebird »

Also one question that occurs is whether the flaps down aircraft are flyable ones that yo are trying to turn into AI aircraft?
Steve
_______________________________________________________
Image
Quid Si Coelum Ruat
_______________________________________________________
User avatar
John Young
MAIW Developer
MAIW Developer
Posts: 4206
Joined: 12 Jul 2008, 15:15

Re: A.I. flaps question

Post by John Young »

The two screen shots show flaps down when parked, which is not unusual. That's achievable too with AI, but it's a bit more complicated. Just post what configuration you want for your aircraft and I'll dig out some FSX/P3D code if you would like it.

John
User avatar
YoYo
Second Lieutenant
Second Lieutenant
Posts: 98
Joined: 27 Feb 2021, 07:55
Version: P3D

Re: A.I. flaps question

Post by YoYo »

John Young wrote: 14 May 2021, 10:56 The two screen shots show flaps down when parked, which is not unusual. That's achievable too with AI, but it's a bit more complicated. Just post what configuration you want for your aircraft and I'll dig out some FSX/P3D code if you would like it.

John

Just two position will be very ok - closed (0 position) for parking and in the air and something open (30-45deg?) for landing and take off if its possible :).
Webmaster of yoyosims.pl.
Image
User avatar
John Young
MAIW Developer
MAIW Developer
Posts: 4206
Joined: 12 Jul 2008, 15:15

Re: A.I. flaps question

Post by John Young »

You might as well just tag the flaps as the default for FSX/P3D then - "l_flap_key" and "r_flap key". KF0=up. KF100=down. You can set the deflection in the animation, or possibly just use the values in the aircraft.cfg file.

Are you OK with animation tagging? It's only a feature of FSX and P3D? FS9 just uses the part names.

John
User avatar
YoYo
Second Lieutenant
Second Lieutenant
Posts: 98
Joined: 27 Feb 2021, 07:55
Version: P3D

Re: A.I. flaps question

Post by YoYo »

So something like this? Right flap example:

Image

I'll check it. TY.
Webmaster of yoyosims.pl.
Image
User avatar
John Young
MAIW Developer
MAIW Developer
Posts: 4206
Joined: 12 Jul 2008, 15:15

Re: A.I. flaps question

Post by John Young »

Yes, give that a try. "r_flap_percent_key", I think forces the aircraft.cfg flap settings, but since I never use it, I can't quite remember.

John
User avatar
YoYo
Second Lieutenant
Second Lieutenant
Posts: 98
Joined: 27 Feb 2021, 07:55
Version: P3D

Re: A.I. flaps question

Post by YoYo »

Ok, what is good now they are at "0":

Image

So looks better, the worst thing - always ;) (so not for take off e.g.) but its not a big problem, or maybe I need to add something in cfg? But it sure looks better now. Great.
Webmaster of yoyosims.pl.
Image
User avatar
John Young
MAIW Developer
MAIW Developer
Posts: 4206
Joined: 12 Jul 2008, 15:15

Re: A.I. flaps question

Post by John Young »

This is the xml for flaps I use most.

This gives flaps half down for taxi and take-off and up for flight. On approach the flaps come back down to half and full flap on finals. Once the aircraft leaves the runway, the flaps go up to half for taxi and fully up when parked. The key variable is the trigger speed which is set in the code to 155 knots, but will need to be adjusted for your aircraft:

<Animation name="ai_flaps_half_at_taxi" guid="88E4F680-E313-47c2-B85D-E22553963614" length="100" type="Sim" typeParam2="ai_flaps_half_at_taxi" typeParam="AutoPlay" />

<PartInfo>
<Name>ai_flaps_half_at_taxi</Name>
<AnimLength>100</AnimLength>
<Animation>
<Parameter>
<Code>
(A:VELOCITY BODY Z, knots) 155 &lt; (A:FLAPS HANDLE PERCENT, percent) 0 &gt; + 50 * (A:LIGHT BEACON, bool) *
</Code>
<Lag>10</Lag>
</Parameter>
</Animation>
</PartInfo>

KF:0 = up, KF:50 = half down, KF100 = fully down.

I don't know how you set that up in the programs you are using but in Gmax I would just add the code to my modeldef.xml file to create a new animation tag.

John
User avatar
YoYo
Second Lieutenant
Second Lieutenant
Posts: 98
Joined: 27 Feb 2021, 07:55
Version: P3D

Re: A.I. flaps question

Post by YoYo »

Thx John, I have come to the point that I can add it and create xml file - however, yes, looks like Gmax is necessary to add this file to the model. I have and use only MCX.

Image

Ok, it's not that important, I've already checked in a few flights and flaps are always closed, so it's still a big success for me and looks more natural in the flight ;).
Webmaster of yoyosims.pl.
Image
User avatar
John Young
MAIW Developer
MAIW Developer
Posts: 4206
Joined: 12 Jul 2008, 15:15

Re: A.I. flaps question

Post by John Young »

It shouldn't be because members of the conversion regularly use custom xml. Is that why perhaps, that the animated lift appears to be not working on your conversion of Mins's Huey? Strange though because the hover-taxi xml is working and that uses similar custom xml.

No problem though, come back if you need any further help.



John
User avatar
YoYo
Second Lieutenant
Second Lieutenant
Posts: 98
Joined: 27 Feb 2021, 07:55
Version: P3D

Re: A.I. flaps question

Post by YoYo »

Ok, I'm starting to understand these xml: http://www.calclassic.com/convert_tutorial/part1.html . It looks like I saved it (new for flaps) in wrong place after modification (not overwriting this orginal one). I'll check it, thx for the tip :smt006 .
Webmaster of yoyosims.pl.
Image
User avatar
YoYo
Second Lieutenant
Second Lieutenant
Posts: 98
Joined: 27 Feb 2021, 07:55
Version: P3D

Re: A.I. flaps question

Post by YoYo »

Next step forward :) . It started to work for me finally. I did new conversion of model (DC6) and checked here. It works but with oposite side. Parking - ok, down, taxi and take off - up, bigger speed 1/2:

Image

Image

Image

So looks like it works ok but I must to check why vice versa.

I added this to lines:

Image

Next in MCX animator I added (I saw this name, new entry) it to flaps.
Webmaster of yoyosims.pl.
Image
User avatar
John Young
MAIW Developer
MAIW Developer
Posts: 4206
Joined: 12 Jul 2008, 15:15

Re: A.I. flaps question

Post by John Young »

Yes that's the way to do it. If the flaps are operating in the wrong direction, just reverse the animation.

John
User avatar
YoYo
Second Lieutenant
Second Lieutenant
Posts: 98
Joined: 27 Feb 2021, 07:55
Version: P3D

Re: A.I. flaps question

Post by YoYo »

Thx. I'm closer the light from the tunnel. :wink:

I found this advice for this: https://www.fsdeveloper.com/forum/threa ... ost-780708 (post of TeamNutmeg).

Image

So to be sure - I must revers red part (eg when is 0.000 on the top must be 100.00) from this? Green part looks the same (just see "-" on some parts).
Webmaster of yoyosims.pl.
Image
User avatar
John Young
MAIW Developer
MAIW Developer
Posts: 4206
Joined: 12 Jul 2008, 15:15

Re: A.I. flaps question

Post by John Young »

No, I meant reverse the animation in the model.

In Gmax, the code works with the following key frames as I said: KF:0 = up, KF:50 = half down, KF100 = fully down.

If MCX does something different, can you reverse the animation in the model, so KF:0 is down etc?

John
User avatar
YoYo
Second Lieutenant
Second Lieutenant
Posts: 98
Joined: 27 Feb 2021, 07:55
Version: P3D

Re: A.I. flaps question

Post by YoYo »

With my post above it looks now like this, full reverse :lol: :

Image
John Young wrote: 15 May 2021, 15:39 If MCX does something different, can you reverse the animation in the model, so KF:0 is down etc?
Hard to tell me is here option like this, I dont see it:

Image
Webmaster of yoyosims.pl.
Image
User avatar
John Young
MAIW Developer
MAIW Developer
Posts: 4206
Joined: 12 Jul 2008, 15:15

Re: A.I. flaps question

Post by John Young »

Sorry, I can't advise on the way you are doing things because I have no knowledge of MCX for converting aircraft. I can only say that the code works in Gmax with the key frames as I gave them to you. You really need to contact one of the conversion team for advice.

John
User avatar
YoYo
Second Lieutenant
Second Lieutenant
Posts: 98
Joined: 27 Feb 2021, 07:55
Version: P3D

Re: A.I. flaps question

Post by YoYo »

Thx John, you have helped me so much. :smt006

Finally I found this option, its present:

Image

but unfortunately in this model I have flaps above the wing now, as in the screen below, as if there was no lock at 0 so it works with revers not like 0 to 50 but from 0 to -50.

Image

I see some kind of editor is here too:

Image

I guess I have to turn them off though. I'll check only the Rot X option here, I see it causes the flap to go over the wing in animation.
Webmaster of yoyosims.pl.
Image
Post Reply