Board index FlightGear Development Scenery

The animated jetway project

Questions and discussion about enhancing and populating the FlightGear world.

The animated jetway project

Postby skyop » Sun Jul 04, 2010 7:47 pm

The FlightGear Flight Simulator Animated Jetway Project

Last updated: 05/21/2011

Note: Airports created by "The Omega Hangar" with animated jetway support are not compatible with FG 2.4.0!

The following packages are for FG 2.0.0 only. Do not use on FG 2.4.0. Not guaranteed to work on FG 1.9.1. Git users should pull the latest fgdata when available.

Base package (see README.animated_jetways.txt for installation instructions):
http://ubuntuone.com/p/unh/
Installing this package on a Git copy of FG will break the sim.

Boeing 777-200ER jetway support package (extract in $FG_ROOT/Aircraft/777-200, overwrite both files):
http://ubuntuone.com/p/uni/
For Git 777, see below.

Boeing 717 jetway support package (extract in $FG_ROOT/Aircraft/717, overwrite both files):
http://ubuntuone.com/p/unk/
Support available in Git.

The following packages are for FG 2.4.0 and above only.

Boeing 777-200ER jetway support package (extract in $FG_ROOT/Aircraft/777-200, overwrite both files):
http://ubuntuone.com/p/unj/
Patch sent to Syd Adams for inclusion upstream. This file will eventually become out-of-date.
Last edited by skyop on Mon Oct 03, 2011 9:19 pm, edited 7 times in total.
[ A320-family | CRJ700-family | DC-10-30 ]
User avatar
skyop
 
Posts: 3010
Joined: Mon Jun 14, 2010 12:40 am
Location: United States of America
Callsign: N-RYAN
IRC name: Skyop
Version: Git
OS: Arch Linux/Windows 7

Re: Movable jetways- some progress!

Postby Avionyx » Sun Jul 04, 2010 7:56 pm

Awesome stuff, great little feature and all adds to the experience. Look forward to following future progress with interest!

Alex
User avatar
Avionyx
 
Posts: 360
Joined: Mon Jan 11, 2010 3:07 pm
Location: EGKA
Callsign: G-AVYX
Version: GIT
OS: OS X/ Mint 16/ Win 7

Re: Movable jetways- some progress!

Postby Gijs » Sun Jul 04, 2010 7:57 pm

Nice job so far! This really adds something to the airport-experience one gets ;)

Also, unlike X-plane and MSFS, the jetway does _not_ know where the door of the plane is. It fits a 737, but try to fit in a 747... :shock:

This would be quite easily solved, by adding custom properties for each aircraft (that define the doors location). You could add something like the following to the -set.xml file of an aircraft

Code: Select all
<sim>
 ...
 <model>
  ...
  <door-position>
   <x-m>-10.5</x-m>
   <y-m>  -2.5</y-m>
   <z-m>   1.2</z-m>
  </door-position>
  ...
 </model>
 ...
</sim>

The jetway model will read those properties (sim/model/door-position/...) and can use it to animate the jetway to the right position. If you help on this, please send me a PM with your animations and I will see what I can do. Besides that I am interested to implement them into the KSFO scenery, together with some other updates to the terminals ;)

Cheers,
Gijs
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400, DC-2, F-117, Jetman, L1011-500
FlightGear Liveries
User avatar
Gijs
Moderator
 
Posts: 8788
Joined: Tue Jul 03, 2007 2:55 pm
Location: Amsterdam/Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 7

Re: Movable jetways- some progress!

Postby skyop » Sun Jul 04, 2010 8:05 pm

Gijs wrote:You could add something like the following to the -set.xml file of an aircraft


I was thinking the same thing (I know FSX does this), but I'm pondering how to calculate how the jetway should be rotated... and lengthened, for that matter! :shock:

Gijs wrote:The jetway model will read those properties (sim/model/door-position/...) and can use it to animate the jetway to the right position. If you help on this, please send me a PM with your animations and I will see what I can do.


Yes, I will need much help! :P

Gijs wrote:Besides that I am interested to implement them into the KSFO scenery, together with some other updates to the terminals ;)


Awesome! :D I'll release a demo version once I get the "only one jetway" problem worked out. That, and I'll modify some of the other jetway models (the ones for the A320 and 747). In the future, I hope to implement TWO jetways for wide-body jets and maybe even THREE for the A380! :mrgreen:
[ A320-family | CRJ700-family | DC-10-30 ]
User avatar
skyop
 
Posts: 3010
Joined: Mon Jun 14, 2010 12:40 am
Location: United States of America
Callsign: N-RYAN
IRC name: Skyop
Version: Git
OS: Arch Linux/Windows 7

Re: Movable jetways- some progress!

Postby Gijs » Sun Jul 04, 2010 8:09 pm

skyop wrote:I'm pondering how to calculate how the jetway should be rotated... and lengthened, for that matter!

That shouldn't be that hard at all. But you do have to rely on the pilots parking at the correct spot, as the jetways do not (yet) see where and how the aircraft is positioned relative to the jetway...
If you could send me the files, then I will try to send them back tomorrow with working animations for multiple aircraft.

Multiple jetways per aircraft will be even more interesting! :D
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400, DC-2, F-117, Jetman, L1011-500
FlightGear Liveries
User avatar
Gijs
Moderator
 
Posts: 8788
Joined: Tue Jul 03, 2007 2:55 pm
Location: Amsterdam/Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 7

Re: Movable jetways- some progress!

Postby skyop » Sun Jul 04, 2010 8:13 pm

Gijs wrote:If you could send me the files, then I will try to send them back tomorrow with working animations for multiple aircraft.


Oh why not. I'll PM you what I have so far (but don't be surprised if it's... uh... messy!). ;)
[ A320-family | CRJ700-family | DC-10-30 ]
User avatar
skyop
 
Posts: 3010
Joined: Mon Jun 14, 2010 12:40 am
Location: United States of America
Callsign: N-RYAN
IRC name: Skyop
Version: Git
OS: Arch Linux/Windows 7

Re: Movable jetways- some progress!

Postby glazmax » Sun Jul 04, 2010 9:25 pm

Anyone know how to get the length of an array in nasal? Then I could solve that issue.


I think you get the size of an object with: size(object)

like
var s = size(your_array);

You can find more at the nasal library itself:

http://www.plausible.org/nasal/lib.html

Fly on,
glazmax
XXX pilot of the caribbean - bones and porters XXX
User avatar
glazmax
 
Posts: 454
Joined: Sat Jan 27, 2007 10:38 am
Location: Austria
Callsign: jettoo/OE-JTO
Version: cvs

Re: Movable jetways- some progress!

Postby ot-666 » Sun Jul 04, 2010 9:31 pm

Moving jetways would be a nice thing.
I guess the movements of the jetways will not be visible over mp?

Just an idea…
Could it be possible to develop an intelligent jetway, that just reacts to a plane getting to the right position, reading the aircraft type and as a trigger maybe turning of engines to move the jetway into position? This way maybe the movement would be possible to see for everyone on mp without adding more traffic to mp protocol.

Cheers, Oliver
Callsign: ot-666
Working on LOWI and other stuff - Custom Scenery Overlay Repo: http://gitorious.org/fgfs-custom-scenery/custom-scenery-overlay/
VMX22 - Osprey... sometimes in 2014
ot-666
 
Posts: 746
Joined: Sun Nov 08, 2009 5:14 pm
Location: Germany, Konstanz
Callsign: ot-666
IRC name: ot666
Version: GIT
OS: win7 64bit

Re: Movable jetways- some progress!

Postby skyop » Sun Jul 04, 2010 9:37 pm

glazmax wrote:I think you get the size of an object with: size(object)


Yeah, that was it. Thanks! :)

ot-666 wrote:Could it be possible to develop an intelligent jetway, that just reacts to a plane getting to the right position, reading the aircraft type and as a trigger maybe turning of engines to move the jetway into position? This way maybe the movement would be possible to see for everyone on mp without adding more traffic to mp protocol.


I don't think shutting off the engines should be the trigger for the jetway, since a lot of airplanes can't turn off their engines. Gijs is trying to implement the "reading the aircraft type" though. I'm not sure about the MP protocol- I'd imagine it'd need extra code. :?
[ A320-family | CRJ700-family | DC-10-30 ]
User avatar
skyop
 
Posts: 3010
Joined: Mon Jun 14, 2010 12:40 am
Location: United States of America
Callsign: N-RYAN
IRC name: Skyop
Version: Git
OS: Arch Linux/Windows 7

Re: Movable jetways- some progress!

Postby skyop » Sun Jul 04, 2010 10:56 pm

Okay, now I'm having more nasal problems. Can anyone help me in allowing more than one jetway to be placed? Right now if you place more than one clicking one of them will activate ALL of them. :roll:

Here's my .xml file, adapted from a KNUQ hangar:
Code: Select all
<?xml version="1.0"?>

<PropertyList>

  <path>MovingJetway.ac</path>

  <animation>
    <type>range</type>
    <min-m>0</min-m>
    <max-property>sim/rendering/static-lod/bare</max-property>
  </animation>

  <nasal>
   <load>
    if (!contains(globals, "scenery"))
     {
     globals["scenery"] = {};
     }
    if (!contains(scenery, "movingJetway"))
     {
     scenery["movingJetway"] = [nil];
     }

    scenery.movingJetway[0] =
     {
     extended: 0,

     # rotate the entire jetway (2 secs)
     tunnel1rotunda: aircraft.door.new("/scenery/movingJetway[0]/tunnel1rotunda", 2),
     tunnel1: aircraft.door.new("/scenery/movingJetway[0]/tunnel1", 2),
     tunnel2: aircraft.door.new("/scenery/movingJetway[0]/tunnel2", 2),
     rotunda2: aircraft.door.new("/scenery/movingJetway[0]/rotunda2", 2),
     entrance_a1: aircraft.door.new("/scenery/movingJetway[0]/entrance_a1", 2),
     hood_a1: aircraft.door.new("/scenery/movingJetway[0]/hood_a1", 2),

     # rotate the jetway entrance (1 sec)
     entrance_a2: aircraft.door.new("/scenery/movingJetway[0]/entrance_a2", 1),
     hood_a2: aircraft.door.new("/scenery/movingJetway[0]/hood_a2", 1),

     # extend the jetway hood (0.5 sec)
     hood_a3: aircraft.door.new("/scenery/movingJetway[0]/hood_a3", 0.5)
     };
   </load>
  </nasal>

  <animation>
   <type>pick</type>
    <action>
     <button>0</button>
     <repeatable>false</repeatable>
     <binding>
      <command>nasal</command>
      <script>
       if (scenery.movingJetway[0].extended == 1)
        {
        scenery.movingJetway[0].hood_a3.toggle();

        var rotateEntrance = func
         {
         scenery.movingJetway[0].entrance_a2.toggle();
         scenery.movingJetway[0].hood_a2.toggle();
         }
        settimer(rotateEntrance, 0.5);

        var moveJetway = func
         {
         scenery.movingJetway[0].tunnel1rotunda.toggle();
         scenery.movingJetway[0].tunnel1.toggle();
         scenery.movingJetway[0].tunnel2.toggle();
         scenery.movingJetway[0].rotunda2.toggle();
         scenery.movingJetway[0].entrance_a1.toggle();
         scenery.movingJetway[0].hood_a1.toggle();
         }
        settimer(moveJetway, 1.5);

        scenery.movingJetway[0].extended = 0;
        }
       else
        {
        scenery.movingJetway[0].tunnel1rotunda.toggle();
        scenery.movingJetway[0].tunnel1.toggle();
        scenery.movingJetway[0].tunnel2.toggle();
        scenery.movingJetway[0].rotunda2.toggle();
        scenery.movingJetway[0].entrance_a1.toggle();
        scenery.movingJetway[0].hood_a1.toggle();

        var rotateEntrance = func
         {
         scenery.movingJetway[0].entrance_a2.toggle();
         scenery.movingJetway[0].hood_a2.toggle();
         }
        settimer(rotateEntrance, 2);

        var extendHood = func
         {
         scenery.movingJetway[0].hood_a3.toggle();
         }
        settimer(extendHood, 3);

        scenery.movingJetway[0].extended = 1;
        }
      </script>
     </binding>
    </action>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>Tunnel1Rotunda</object-name>
    <property>/scenery/movingJetway[0]/tunnel1rotunda/position-norm</property>
    <factor>20</factor>
    <center>
     <x-m>0</x-m>
     <y-m>0</y-m>
     <z-m>0</z-m>
    </center>
    <axis>
     <x>0</x>
     <y>0</y>
     <z>1</z>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>Tunnel1</object-name>
    <property>/scenery/movingJetway[0]/tunnel1/position-norm</property>
    <factor>20</factor>
    <center>
     <x-m>0</x-m>
     <y-m>0</y-m>
     <z-m>0</z-m>
    </center>
    <axis>
     <x>0</x>
     <y>0</y>
     <z>1</z>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>Tunnel2</object-name>
    <property>/scenery/movingJetway[0]/tunnel2/position-norm</property>
    <factor>20</factor>
    <center>
     <x-m>0</x-m>
     <y-m>0</y-m>
     <z-m>0</z-m>
    </center>
    <axis>
     <x>0</x>
     <y>0</y>
     <z>1</z>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>Rotunda2</object-name>
    <property>/scenery/movingJetway[0]/rotunda2/position-norm</property>
    <factor>20</factor>
    <center>
     <x-m>0</x-m>
     <y-m>0</y-m>
     <z-m>0</z-m>
    </center>
    <axis>
     <x>0</x>
     <y>0</y>
     <z>1</z>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>Entrance</object-name>
    <property>/scenery/movingJetway[0]/entrance_a1/position-norm</property>
    <factor>20</factor>
    <center>
     <x-m>0</x-m>
     <y-m>0</y-m>
     <z-m>0</z-m>
    </center>
    <axis>
     <x>0</x>
     <y>0</y>
     <z>1</z>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>Hood</object-name>
    <property>/scenery/movingJetway[0]/hood_a1/position-norm</property>
    <factor>20</factor>
    <center>
     <x-m>0</x-m>
     <y-m>0</y-m>
     <z-m>0</z-m>
    </center>
    <axis>
     <x>0</x>
     <y>0</y>
     <z>1</z>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>Entrance</object-name>
    <property>/scenery/movingJetway[0]/entrance_a2/position-norm</property>
    <factor>20</factor>
    <center>
     <x-m>19.536</x-m>
     <y-m>0</y-m>
     <z-m>2.6</z-m>
    </center>
    <axis>
     <x>0</x>
     <y>0</y>
     <z>-1</z>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>Hood</object-name>
    <property>/scenery/movingJetway[0]/hood_a2/position-norm</property>
    <factor>20</factor>
    <center>
     <x-m>19.536</x-m>
     <y-m>0</y-m>
     <z-m>2.6</z-m>
    </center>
    <axis>
     <x>0</x>
     <y>0</y>
     <z>-1</z>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>Hood</object-name>
    <property>/scenery/movingJetway[0]/hood_a3/position-norm</property>
    <factor>5</factor>
    <center>
     <x-m>19.536</x-m>
     <y-m>2</y-m>
     <z-m>2.6</z-m>
    </center>
    <axis>
     <x>-1</x>
     <y>0</y>
     <z>0</z>
    </axis>
  </animation>

</PropertyList>
[ A320-family | CRJ700-family | DC-10-30 ]
User avatar
skyop
 
Posts: 3010
Joined: Mon Jun 14, 2010 12:40 am
Location: United States of America
Callsign: N-RYAN
IRC name: Skyop
Version: Git
OS: Arch Linux/Windows 7

Re: Movable jetways- some progress!

Postby HHS » Mon Jul 05, 2010 1:08 pm

Great to see that there is developement on this going! :D

I don't think shutting off the engines should be the trigger for the jetway, since a lot of airplanes can't turn off their engines.

But all aircrafts have parkingbrakes! So when parkingbrake is applied the jetways should be triggered.

Could it be possible to develop an intelligent jetway, that just reacts to a plane getting to the right position, reading the aircraft type and as a trigger maybe turning of engines to move the jetway into position? This way maybe the movement would be possible to see for everyone on mp without adding more traffic to mp protocol.

It must just take the mp-aircrafts also in account. That should be possible, I guess.

Can anyone help me in allowing more than one jetway to be placed? Right now if you place more than one clicking one of them will activate ALL of them.

Currently I can only imagine that every jetway needs its own code. (Jetway1.xml, Jetway2.xml...)
Or a code written which includes jetways of one terminal. But that would also mean that every airport needs its own designed jetway-code. :|
Up, up and away
User avatar
HHS
Retired
 
Posts: 3624
Joined: Thu Jul 19, 2007 8:09 am
Version: GIT

Re: Movable jetways- some progress!

Postby ot-666 » Mon Jul 05, 2010 2:17 pm

Currently I can only imagine that every jetway needs its own code. (Jetway1.xml, Jetway2.xml...)
Or a code written which includes jetways of one terminal. But that would also mean that every airport needs its own designed jetway-code. :|


I guess that would be some work, but it looks like you got many similar jetways for each airport.
I thought of one example airport that is covering most jetway types as a template.

Still a lot of work, but that could lead into a lot of airport designers incorporating it into their airports.

Maybe each jetwayXX.xml could read the needed aircraft door positions from a separately maintained list that could be updated if new aircraft are developed or changed without involving changes for all airports the jetway.xml.

A structure like this could drive service vehicles (eye candy) or maybe used to create airfield activities like potable stairs for a parking position without a jetway.

Cheers, Oliver
Callsign: ot-666
Working on LOWI and other stuff - Custom Scenery Overlay Repo: http://gitorious.org/fgfs-custom-scenery/custom-scenery-overlay/
VMX22 - Osprey... sometimes in 2014
ot-666
 
Posts: 746
Joined: Sun Nov 08, 2009 5:14 pm
Location: Germany, Konstanz
Callsign: ot-666
IRC name: ot666
Version: GIT
OS: win7 64bit

Re: Movable jetways- some progress!

Postby Gijs » Mon Jul 05, 2010 2:37 pm

ot-666 wrote:Currently I can only imagine that every jetway needs its own code. (Jetway1.xml, Jetway2.xml...)

Best would be to have single code, that creates a property in the property-tree for each instance. This is what is done with the MP/AI traffic, so it should be possible for jetways as well...

ot-666 wrote:Maybe each jetwayXX.xml could read the needed aircraft door positions from a separately maintained list that could be updated if new aircraft are developed or changed without involving changes for all airports the jetway.xml.

My current approach involves editing of each aircraft's -set.xml. That way, aircraft authors will have full freedom.

Hope to have something to show this evening or tomorrow. Animations (rotate/extension etc.) all work fine, but there are still some problems on retrieving the specified door position.
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400, DC-2, F-117, Jetman, L1011-500
FlightGear Liveries
User avatar
Gijs
Moderator
 
Posts: 8788
Joined: Tue Jul 03, 2007 2:55 pm
Location: Amsterdam/Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 7

Re: Movable jetways- some progress!

Postby zakalawe » Mon Jul 05, 2010 3:36 pm

One suggestion - rather than placing the doors in the -set file, could you create special point objects in the .ac file, at the centre of the doors, and then have the jetway script 'lock on' to the the door position, assuming it finds such a point with a 5 metre sphere (or whatever movement range the jetway can do). I think the collision / intersection API exposed to Nasal is sufficient for this, although I'm no expert.
zakalawe
 
Posts: 999
Joined: Sat Jul 19, 2008 4:48 pm
Location: Edinburgh, Scotland

Re: Movable jetways- some progress!

Postby skyop » Mon Jul 05, 2010 6:23 pm

Gijs wrote:Best would be to have single code, that creates a property in the property-tree for each instance. This is what is done with the MP/AI traffic, so it should be possible for jetways as well...


That's what I was hoping. Who wants to create 50 different jetway models!? :shock:

I can't wait to see your animations Gijs! :mrgreen:
[ A320-family | CRJ700-family | DC-10-30 ]
User avatar
skyop
 
Posts: 3010
Joined: Mon Jun 14, 2010 12:40 am
Location: United States of America
Callsign: N-RYAN
IRC name: Skyop
Version: Git
OS: Arch Linux/Windows 7

Next

Return to Scenery

Who is online

Users browsing this forum: GhostRider, Lydiot and 3 guests