TUDelft-CNS-ATM / bluesky

The open source air traffic simulator
GNU General Public License v3.0
365 stars 244 forks source link

NOISE command index 0 #451

Closed Ellislee1 closed 10 months ago

Ellislee1 commented 1 year ago

When running a sim using the NOISE ON stack command the following error is produced:

Client b'\x00\xce\xfc}\xe5' connected to host b'\x00\xd8z\x15('
Traceback (most recent call last):
  File "C:\Users\Ellis\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\Ellis\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\Ellis\AppData\Local\Programs\Python\Python310\lib\site-packages\bluesky\__main__.py", line 74, in <module>
    sys.exit(main())
  File "C:\Users\Ellis\AppData\Local\Programs\Python\Python310\lib\site-packages\bluesky\__main__.py", line 39, in main
    bs.net.run()
  File "C:\Users\Ellis\AppData\Local\Programs\Python\Python310\lib\site-packages\bluesky\network\node.py", line 67, in run
    bs.sim.update()
  File "C:\Users\Ellis\AppData\Local\Programs\Python\Python310\lib\site-packages\bluesky\simulation\simulation.py", line 111, in update
    self.step()
  File "C:\Users\Ellis\AppData\Local\Programs\Python\Python310\lib\site-packages\bluesky\simulation\simulation.py", line 82, in step
    bs.traf.update()
  File "C:\Users\Ellis\AppData\Local\Programs\Python\Python310\lib\site-packages\bluesky\traffic\traffic.py", line 424, in update
    self.turbulence.update()
  File "C:\Users\Ellis\AppData\Local\Programs\Python\Python310\lib\site-packages\bluesky\traffic\turbulence.py", line 32, in update
    turbhf=np.random.normal(0,self.sd[0]*timescale,bs.traf.ntraf) #[m]
IndexError: index 0 is out of bounds for axis 0 with size 0
jooste commented 1 year ago

Thanks. The noise implementation currently isn't maintained. To be honest, I think it needs to be changed/extended anyway, the current implementation is very simplistic.

ProfHoekstra commented 1 year ago

True, but I think we can still easily fix it for now until we have a more advanced turbulence model.

On 8 Feb 2023, at 09:05, Joost Ellerbroek @.***> wrote:



Thanks. The noise implementation currently isn't maintained. To be honest, I think it needs to be changed/extended anyway, the current implementation is very simplistic.

— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https://github.com/TUDelft-CNS-ATM/bluesky/issues/451*issuecomment-1422188841__;Iw!!PAKc-5URQlI!7dB-9Ay9tfDAPH1rVLyefWYz75ZWURRwOdDBRDttnAzsFGhJl-3lDxdHDLqOSP4n33MzNetxwD3LTg-l_pSrOOtCWuWI-g$, or unsubscribehttps://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ABWT2BG2VUK635ZITALDCU3WWNHS3ANCNFSM6AAAAAAUUT53ZE__;!!PAKc-5URQlI!7dB-9Ay9tfDAPH1rVLyefWYz75ZWURRwOdDBRDttnAzsFGhJl-3lDxdHDLqOSP4n33MzNetxwD3LTg-l_pSrOOus9fJPkw$. You are receiving this because you are subscribed to this thread.Message ID: @.***>