Author Topic: Scripting engine error when using GSX.cfg [solved]  (Read 5975 times)

Plexi1

  • Newbie
  • *
  • Posts: 29
    • FS-Flightcrew.de
Scripting engine error when using GSX.cfg [solved]
« on: March 23, 2012, 11:25:19 am »
While trying to make a GSX.cfg for the CLS 747 I got a problem which I don´t know how to solve. When I put the GSX.cfg in the airplane folder, I get two errors

1. error



2. error, this comes from Microsoft Visual C++ Runtime Library


I have already updated GSX and the Addon Manager without success

This is my GSX.cfg so far

Code: [Select]
[aircraft]
nosegear = -19.333

[exit1]
pos = -54.00 -9.0 0.0
code = 1
name = L1 door

[exit2]
pos = -72.00 -9.0 0.0
name = L2 door

[exit3]
remove = 1

[exit4]
remove = 1

[service1]
flip = 1
name = Front Catering Door

[service2]
flip = 2
name = Rear Catering Door

[cargo1]
pos = -54.00 7.0 -7.0
name = Front Cargo Door
uldcode = ""

and here is the content of the Couatl.err

Code: [Select]
couatl v2.0 (build 2303)
panic log started on Fri Mar 23 11:03:23 2012
Traceback (most recent call last):
  File "couatl\GSX\__init__.py", line 417, in onSimStart
  File "couatl\common\aircraftData.py", line 693, in getAircraftData
  File "couatl\common\aircraftData.py", line 447, in __init__
  File "couatl\common\aircraftData.py", line 531, in _processGsxCfg
  File "couatl\common\aircraftData.py", line 565, in _processGsxCfgExit
IndexError: list index out of range

any ideas ?
« Last Edit: March 23, 2012, 12:08:31 pm by Plexi1 »

virtuali

  • Administrator
  • Hero Member
  • *****
  • Posts: 51439
    • VIRTUALI Sagl
Re: Scripting engine error when using GSX.cfg
« Reply #1 on: March 23, 2012, 11:44:30 am »
Your door coordinates looks a bit strange: read the update manual more carefully, on Page 25 there's the explanation what the coordinates means: the first parameter ( X ) is the Lateral Left/Right offset of the door, and it's *meters* from the airplane longitudinal axis, the 2nd it's the Longitudinal Front/Back offset from the airplane center and the 3rd is the height from ground.

In your file, you defined the main passenger exit 1 to be 54 meters on the left side of the airplane, 9 meters ahead from the center, and at ground level!

Plexi1

  • Newbie
  • *
  • Posts: 29
    • FS-Flightcrew.de
Re: Scripting engine error when using GSX.cfg
« Reply #2 on: March 23, 2012, 11:54:02 am »
Yes I noticed that too already and I solved all problems now. (I should have paid closer attention  ;) )

1. GSX needs X Y Z coordinates but in the aircraft.cfg it is Y X Z  so I need to exchange the first two values for the positions
2. GSX needs meters but values in the aircraft.cfg are in feet, so I need to convert them
3. I forgot to add the angle and after adding it, the error seems to be gone, without the angle, I get those error messages !

Thanks for your help

« Last Edit: March 23, 2012, 11:56:25 am by Plexi1 »

Plexi1

  • Newbie
  • *
  • Posts: 29
    • FS-Flightcrew.de
Re: Scripting engine error when using GSX.cfg [solved]
« Reply #3 on: March 23, 2012, 12:15:00 pm »
One question remains:

the position coordinates are the offset from the center of the plane and not from the reference_datum_position in the aircraft.cfg is this correct ?

virtuali

  • Administrator
  • Hero Member
  • *****
  • Posts: 51439
    • VIRTUALI Sagl
Re: Scripting engine error when using GSX.cfg
« Reply #4 on: March 23, 2012, 01:29:54 pm »
1. GSX needs X Y Z coordinates but in the aircraft.cfg it is Y X Z  so I need to exchange the first two values for the positions.

2. GSX needs meters but values in the aircraft.cfg are in feet, so I need to convert them

That's not the only difference: the [Exits] section in the aircraft.cfg also expresses distances in a different way, the door's heights for example is relative to the ground, while in the aircraft.cfg they are relative to the airplane datum and, the door reference needed by GSX is the bottom of the door, while in the aircraft.cfg it's the center of the door.

For this reason, since you have to do several conversions from the aircraft.cfg anyway, there was no need to keep the format "compatible" with it.

But more importantly, if the airplane is unknown, GSX ALREADY reads the exits from the [Exits] section of the aircraft.cfg, so there's no point just replicating them, you would end up in the same situation as not having any GSX.CFG file at all.

The whole point of having a GSX configuration, is that you can specify more doors, and with greater precisions, because the aircraft.cfg exits coordinates are usually not very precise, and optimized for the default jetways to reach (that's why they point to the door's middle point) so, you can basically disregard the aircraft.cfg file, since you'll have to do conversions and further adjustments anyway.

Quote
3. I forgot to add the angle and after adding it, the error seems to be gone, without the angle, I get those error messages !

Yes, the angle parameter is not optional, you need to put a 0 for a straight exit.

Plexi1

  • Newbie
  • *
  • Posts: 29
    • FS-Flightcrew.de
Re: Scripting engine error when using GSX.cfg [solved]
« Reply #5 on: March 23, 2012, 02:20:39 pm »
Thanks for the reply and yes I know that it is no good idea to replicate the values, I just wanted to use them as a reference point to make it easier to add more doors than the ones present in the aircraft.cfg but that does not really work, it is more like trial and error.

The reason I want to make my own GSX.cfg is, I have a lot of planes where most of the ground vehicles dock at the wrong point or height so it would have been nice if I could just copy the values from the aircraft.cfg and modify them as I need them but that is not possible.

gigigo

  • Newbie
  • *
  • Posts: 2
Re: Scripting engine error when using GSX.cfg [solved]
« Reply #6 on: March 23, 2012, 03:32:10 pm »
Hi, this is my first post ever in this forum. I want to congratulate FSdt an all you’re the wonderful scenery and now this tool. I’m a true customer of almost all your work.

I have question regarding GSX.cfg. I been creating a custom file for Project Airbus A320, and I think I managed pretty well so far. However, the only way I could accomplish this was to set the height of the exit door 1 (port side number 1) to 0.1 mts and for the forward cargo door to a negative value. If I don’t do that the stairs/ cargo loaders are much higher than the actual plane. The rest of the doors are set to a more “reasonable height” of 3.7 mts.   

On a related note, on the Level-D winglet version all the services are higher than the actual height. I was planning to do a custom CFG file; yet the Aircraft.cfg file is identical to the non-winglet version, which makes me to think that the winglet version is not part of the “included aircraft”. Is there any way we could use the same configuration set in the database for the non-winglet version?  I don’t want to reinvent the wheel. ;)

Plexi1

  • Newbie
  • *
  • Posts: 29
    • FS-Flightcrew.de
Re: Scripting engine error when using GSX.cfg [solved]
« Reply #7 on: March 23, 2012, 04:15:23 pm »
hmm very strange, I just played around with the PA Airbus A320 as well and I needed to use negative values for the door heights. When using 0, the stairs connected in the middle of the doors, however I managed to get both passenger doors on the left side, both service doors on the right side and the front cargo door to work with the AKH loader, I can´t get a second loader to the rear cargo door and I don´t know why

gigigo

  • Newbie
  • *
  • Posts: 2
Re: Scripting engine error when using GSX.cfg [solved]
« Reply #8 on: March 23, 2012, 04:48:43 pm »
I find the scripting that requires a lot a trial and error and precise tweaking; a bit as when we starting fixing the exits so aircraft in FSX would align to the jet ways. When experimenting with the values, if a put a zero for the height of the forward door, the rear didn’t showed at all, that’s why I put 0.1. The same was for the rear cargo. Also affected the distance, if I started with something way back or out of the fuselage of the plane, No loader would show.

Regarding to your use of negative values for all doors while I don’t, and I think this could be because of the exit configuration in the Aircraft.cfg. I custom adjusted mine long time ago and only for exit.0. and exit.1 the other two are as per FS9 standards, no lon, lat or vertical height.. As soon as I get home, I’ll do a test by removing the FSX entries and see if this will then work as documented using the height of the ground to the door.