Giter Site home page Giter Site logo

Comments (13)

jooste avatar jooste commented on June 1, 2024

Dear Enrico,

First of all thanks for your comments and suggestions! The performance implementation of BlueSky is indeed in need of some improvement. We also want to work on a more thorough basic-use manual.

CORRECTION:

My previous message was wrong; that message just means that no aircraft model was given for the created aircraft. B744 is then selected as default.

from bluesky.

espinielli avatar espinielli commented on June 1, 2024

@jooste I changed performance_model from 'bluesky' to 'bada' and left 'perf_path_bada' to its default value of data_path + '/coefficients/BADA' (I suppose you mentioned perf_path_bada rather than perf_path above...given I am using BADA model) but I get the same message on stdout.

from bluesky.

jooste avatar jooste commented on June 1, 2024

Dear Enrico,

I made a mistake in my original message, the stdout message you mention indicates that an aircraft was created without specifying an aircraft model. In that case BlueSky uses the default, which is a B747-400.

The settings.cfg change is still a good change to make though. Do you get any additional messages in stdout now, when you start BlueSky? If it says 'Falling back to BlueSky performance model', it wasn't able to find your BADA files. Otherwise it should be using BADA. We'll add more informative messages soon! :)

from bluesky.

espinielli avatar espinielli commented on June 1, 2024

With the setting as above when loading 0-demo-scenario.scn I still get (as in the initial essay):

c:\repos\bluesky>python BlueSky.py
   *****   BlueSky Open ATM simulator *****
Distributed under GNU General Public License v3
Reading config from settings.cfg
Loading global navigation database...
Reading cache: navdata.p
Reading cache: rwythresholds.p

Setting up screen...
Reading coastlines.dat
     230912  coastlines added.
Setting up Traffic simulation
Opening  C:\repos\bluesky\scenario\0-demo-scenario.scn
aircraft is using default aircraft performance (Boeing 747-400).

from bluesky.

jooste avatar jooste commented on June 1, 2024

Yes, this is correct. 0-demo-scenario doesn't specify aircraft models for the created aircraft, which is why that message is printed. If you specified 'bada' in your configuration before you ran this, then this printout also means that loading the BADA files succeeded (no error message). I have added a positive message as well when the BADA performance model successfully loads in commit 8a60bff.

from bluesky.

espinielli avatar espinielli commented on June 1, 2024

So I put the debugger on just before the print of the message and found out that BADA is not loaded...the debugger kicks in at perf.py and not perf_bada.py...my settings:

# Select the performance model. options: 'bluesky', 'bada'
performance_model = 'bada'

# Indicate the datafile path
data_path = 'data'

# Indicate the logfile path
log_path = 'output'

# Indicate the scenario path
scenario_path = 'scenario'

# Indicate the path for the aircraft performance data
perf_path = data_path + '/coefficients/BS_aircraft'

# Indicate the path for the BADA aircraft performance data (leave empty if BADA is not available)
perf_path_bada = data_path + '/coefficients/BADA'

from bluesky.

jooste avatar jooste commented on June 1, 2024

When I run BlueSky with performance_model = 'bada' I get the following message in stdout:

BADA performance model: No BADA files found in data/coefficients/BADA!
Falling back to BlueSky performance model

This is correct behavior when there are no .OPF files in your specified BADA path. When I put OPF files there the bada performance model is loaded. If you update to the latest version on GitHub, do you still not get any message about bada? (either positive or negative)

from bluesky.

espinielli avatar espinielli commented on June 1, 2024

Pulled latest from repo, removed any other file by .OPF, checked that the code I see changed, and I still get:

c:\repos\bluesky>python BlueSky.py
   *****   BlueSky Open ATM simulator *****
Distributed under GNU General Public License v3
Reading config from settings.cfg
Loading global navigation database...
Reading cache: navdata.p
Reading cache: rwythresholds.p

Setting up screen...
Reading coastlines.dat
     230912  coastlines added.
Setting up Traffic simulation
Opening  C:\repos\bluesky\scenario\0-demo-scenario.scn
aircraft is using default aircraft performance (Boeing 747-400).

I thought this was due to line 48 of perfbada.py not using perf_path_bada but even changing that does not change my results...

weird...I will clone again and start from scratch...

from bluesky.

espinielli avatar espinielli commented on June 1, 2024

Now BADA is loaded, but it crashes

C:\repos\bluesky>python BlueSky.py
   *****   BlueSky Open ATM simulator *****
Distributed under GNU General Public License v3
Reading config from settings.cfg
Using BADA performance model. Found 195 aircraft performance definition files (*.OPF)
Loading global navigation database...
Reading cache: navdata.p
Reading cache: rwythresholds.p

Setting up screen...
Reading coastlines.dat
     230912  coastlines added.
Setting up Traffic simulation
Opening  C:\repos\bluesky\scenario\0-demo-scenario.scn
Traceback (most recent call last):
  File "BlueSky.py", line 19, in <module>
    bs.MainLoop()
  File "C:\repos\bluesky\BlueSky_pygame.py", line 34, in MainLoop
    sim.update(gui.scr)  # Update sim
  File "C:\repos\bluesky\bluesky\sim\pygame\simulation.py", line 118, in update
    stack.process(self, self.traf, scr)
  File "C:\repos\bluesky\bluesky\stack\stack.py", line 1143, in process
    results = function(*arglist)  # * = unpack list to call arguments
  File "C:\repos\bluesky\bluesky\traf\traffic.py", line 268, in create
    self.perf.create()
  File "C:\repos\bluesky\bluesky\traf\perfbada.py", line 594, in create
    self.cascl        = np.append(self.cascl, coeff.cascl[self.coeffidx]*kts)
IndexError: list index out of range

And if I go back to bluesky model it runs.

from bluesky.

jooste avatar jooste commented on June 1, 2024

Could it be that you have only OPF files installed? coeff.cascl comes out of the .APF files, but currently the bada implementation just assumes that every OPF file is accompanied by a APF file. This will be made more robust, but its going to take a bit of work and time :)

from bluesky.

espinielli avatar espinielli commented on June 1, 2024

from bluesky.

jooste avatar jooste commented on June 1, 2024

Thanks! I will add more print statements where useful :)

from bluesky.

espinielli avatar espinielli commented on June 1, 2024

I slightly modified a couple of lines in perfbada.py in order to see which flights are missing perf data in the `` scenario.

Similarly in perf.py to log verbosely.
PR is coming

from bluesky.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.