NikolaiVChr / f16

General Dynamics F-16 for Flightgear flight simulator
GNU General Public License v2.0
122 stars 39 forks source link

Nasal runtime error: Ubuntu trouble with external FDM #586

Open fgiral000 opened 10 months ago

fgiral000 commented 10 months ago

Using a external FDM in ubuntu I am getting the following run time error:

13.96 [ALRT]:nasal Nasal runtime error: props.setDoubleValue() passed a NaN

13.96 [ALRT]:nasal at /path/to/flightgear-data/Nasal/props.nas, line 38

13.96 [ALRT]:nasal called from: /path/to/flightgear-data/Aircraft/Generic/aar.nas, line 153

13.96 [ALRT]:nasal Nasal runtime error: nil used in numeric context

13.96 [ALRT]:nasal at /path/to/flightgear-data/Aircraft/f16/Nasal/light-manager.nas, line 67

NikolaiVChr commented 10 months ago

We would need a lot more info about what changes you have made, in order to help you. I suspect these errors are mere symptoms of a deeper issue of properties not being initialized.

fgiral000 commented 10 months ago

Sorry, I am a new user at Flightgear and I don't have clear some aspects. I have been using a f15c model with the same external interface and I don't have any problem. Maybe this model needs some extra initial conditions? I am not changing anaything in flightgear, only connecting the jsbsim model through socket from a python interface.

An example of my ic is:

<?xml version="1.0"?>

328.0 0.0 0.0 2.3273 51.3781 0.0 0.0 0.0 10000 0.00000001 -1
NikolaiVChr commented 10 months ago

You are probably going to get a lot more errors than just those 2. Nasal uses many properties created in our JSBSIM fdm, and some that jsbsim creates for Fligthgear. You would have to go into each nasal module from each error and figure out which property it needs initialized.