Board index FlightGear Development Scenery

The animated jetway project

Questions and discussion about enhancing and populating the FlightGear world.

Re: The animated jetway project

Postby ThomasS » Wed Jun 13, 2018 8:14 am

Hello,

thanks to bugmans fix in the 2018.2.1 release animated jetways are working again OOTB without using icare38s patched nas file. Thats fine so far. What I realize now is a very sensitive collision detection causing an immediate plane crash (red message "Airframe structural..." and crash sound) when approaching a jetway.

This definitly is not related to the fix. I also see this when I place eg. a vehicle model with "enable-hot" activated with Nasals "put_model" function close to the aircraft. I don't remember having seen such a behaviour before.

Maybe the model collision detection in Flightgear did change in one of the latest releases, maybe due to a change in OSG. I have no idea how crash detection in FG works, but I guess it is based on some model collision detection in OSG.

Moving through static scenery buildings and aircraft is still possible, however.

The use case i used is: Start FG in KSFO, parkpos E60 with a 777-300 , autostarting, release parking brakes, throttle up a bit, move forward. It only takes a few seconds for crashing.

Back to my basic question: If we have such a sensitive collision detection, should we set flag "enable-hot" to false for animated jetways? Or am I mistaken here?

A local test on my system with a patched jetways.nas (line 231)

Code: Select all
 var model_path = model.getPath();
 model.getNode("enable-hot", 1).setValue(0);
 model.getNode("path", 1).setValue(path);


solved the issue successfully.

Best Regards

Thomas
ThomasS
 
Posts: 81
Joined: Sun Sep 11, 2016 1:21 pm
Location: West of EDDK
Version: 2018.2.1
OS: Linux,MacOS,Windows

Re: The animated jetway project

Postby merspieler » Thu Jun 14, 2018 8:11 am

The enable-hot is set in the .xml file not the nasal code...

IIRC in the icare version the front part of the jetway has enable-hot = false starting behind the round. Tho IMO the jetway should 100% enable-hot = true and any unintended collisions should be considered a bug.
Love at first flight
Checkout Autopush. An improvment to the pushback to make your life easier.
merspieler
 
Posts: 169
Joined: Thu Oct 26, 2017 10:43 am
Location: GCLP
Callsign: LH454, HG3840, LX64
IRC name: merspieler
Version: 2018.3.1
OS: Linux

Re: The animated jetway project

Postby ThomasS » Thu Jun 14, 2018 3:08 pm

When I started looking for a solution to the collision problem I came across flag enable-hot for the first time. And I was confused. I found hints saying it should be part of the XML file (the last property). But setting it in a XML file made the model completely invisible.

Greping through the C++ code I found FGModelMgr::add_model@130 , where flag enable-hot is used for setting flag SG_NODEMASK_TERRAIN_BIT. But this code it not reached when enable-hot is set in the XML file. Only when it is set from Nasal in addition to the source path of the XML file and before calling put_model(). And only in that case the model is visible but will not cause a collision.

So according to my tests my impression is that there are two different ways enable-hot is working (plus a possible third way in animations). But, well, I might be wrong.
ThomasS
 
Posts: 81
Joined: Sun Sep 11, 2016 1:21 pm
Location: West of EDDK
Version: 2018.2.1
OS: Linux,MacOS,Windows

Re: The animated jetway project

Postby merspieler » Fri Jun 15, 2018 8:45 am

You might consider asking on the mailing list....
Love at first flight
Checkout Autopush. An improvment to the pushback to make your life easier.
merspieler
 
Posts: 169
Joined: Thu Oct 26, 2017 10:43 am
Location: GCLP
Callsign: LH454, HG3840, LX64
IRC name: merspieler
Version: 2018.3.1
OS: Linux

Re: The animated jetway project

Postby ThomasS » Thu Jul 19, 2018 8:52 am

After some more tests I came to the conclusion that the "enable-hot animation" is the key. Though it is possible to set enable-hot from Nasal as I mentioned before, merspieler is right in saying it should be defined in the model. I solved the collision problem by both listing all model objects in the animation AND move the animation to the end of the file jetways/generic[_s].xml:

Code: Select all
<!-- Don't let the entrance rotunda interact with aircraft -->
        <animation>
                <object-name>Support</object-name>
                <object-name>SupportGirder</object-name>
                <object-name>Tunnel1</object-name>
                <object-name>Tunnel2</object-name>
                <object-name>Tunnel3</object-name>
                <object-name>Tunnel4</object-name>
                <object-name>Rotunda1</object-name>
                <object-name>AirlineSign</object-name>
                <object-name>GateSign</object-name>
                <object-name>Gate number 1</object-name>
                <object-name>Gate number 2</object-name>
                <object-name>Gate number 3</object-name>

                <object-name>Entrance</object-name>
                <object-name>Hood</object-name>
                <object-name>Rotunda2</object-name>
                <enable-hot type="bool">false</enable-hot>
        </animation>
ThomasS
 
Posts: 81
Joined: Sun Sep 11, 2016 1:21 pm
Location: West of EDDK
Version: 2018.2.1
OS: Linux,MacOS,Windows

Re: The animated jetway project

Postby ThomasS » Fri Jul 20, 2018 4:48 am

Being confident that the jetway model should be modified accordingly I submitted a change to the object model database but it was rejected. Rethinking the topic I came to the conclusion that even if technically correct it isn't intended to suppress any collision. After all, depending on the expectation of a user to realism, an aircraft might not touch a jetway without causing harm.

However, in some situation a crash is caused immediately after placing an aircraft at a parking position just because the jetway is too close. But that might be a question of proper object placement.
ThomasS
 
Posts: 81
Joined: Sun Sep 11, 2016 1:21 pm
Location: West of EDDK
Version: 2018.2.1
OS: Linux,MacOS,Windows

Previous

Return to Scenery

Who is online

Users browsing this forum: No registered users and 4 guests