Giter Site home page Giter Site logo

tudelft-cns-atm / bluesky Goto Github PK

View Code? Open in Web Editor NEW
333.0 41.0 236.0 127.55 MB

The open source air traffic simulator

License: GNU General Public License v3.0

Python 83.10% GLSL 2.60% C++ 2.77% HTML 10.77% CSS 0.64% Makefile 0.05% Batchfile 0.02% Rich Text Format 0.04%
python traffic aircraft simulation air-traffic-control air-transport conflict-detection conflict-resolution transportation-simulation transportation

bluesky's People

Contributors

amorfinv avatar andubadea avatar anoukscholtes avatar eman89 avatar espinielli avatar herryklumper avatar isabelmetz avatar jooste avatar juhannc avatar jules-7 avatar junzis avatar liam-deacon avatar malikdoole avatar michielaarts avatar migiliam avatar mjribeirotudelft avatar ninyes avatar olehenrikdahle avatar pdanneels avatar profhoekstra avatar rmonstein avatar rubenjacobse avatar sankarebarri avatar sbalasooriyan avatar undefiened avatar wschaberg avatar wy19990110 avatar xoolive avatar yaofuzhou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bluesky's Issues

Unable to load the example plugin

I'm trying to get the example.py plugin working (which adds a MYFUN command to the stack).
However, the PLUGINS command is not recognized, and I cannot manage to load it.
Here's the output on the command window :
>> PLUGINS
Unknown command or aircraft: PLUGINS

I've placed the file example.py in a "plugins" folder, inside the BlueSky root folder.
Moreover, I've mentioned it in the enabled_plugins inside the settings.cfg files...

Have I missed something ?

Thanks :)

CRmethod("SWARM") ERROR

Hi, I just tested CRmethod("SWARM") and I had a crash.
-- Open "ASAS-01.scn",and modify "00:00:00.00>RESO MVP" to "00:00:00.00>RESO SWARM"
-- Some error messages appear in the log:

File "D:/bluesky-20161201/bluesky-20161201\bluesky\traf\asas \Swarm.py", line 39, in resolve
MVP.resolve(dbconf)
TypeError: resolve() takes exactly 2 arguments (1 given)
Exception in thread Thread-6 (most likely raised during interpreter shutdown):
Process finished with exit code 1

-- Then I add a argument to the function like this:

First do conflict resolution following MVP

MVP.resolve(dbconf,traf)

-- Some error messages also appear in the log:

File "D:/bluesky-20161201/bluesky-20161201\bluesky\traf\asas\Swarm.py", line 42, in resolve
ca_trk = dbconf.active*dbconf.hdg+(1-dbconf.active)*traf.ahdg
AttributeError: 'ASAS' object has no attribute 'hdg'
Exception in thread Thread-6 (most likely raised during interpreter shutdown):
Process finished with exit code 1

-- Would you please tell me how to fix it?
-- The CD and CR algorithms, especially Swarm algorithm code(CRmethod) are a little bit too obscure, would you please provide some references of these algorithms.
-- Thanks.

weather map integration

Hi Guys,
I need to integrate the weather data and visualize it with blue sky interface, how I can do such thing.

mouse right button pan scale

Map panning with mouse right button is not working well, while map is zoomed out. We need to update the pan scale with zoom scale.

指令TRAIL会导致程序崩溃

pygame模式下启动项目,然后开始仿真之后,
如果输入TRAIL指令参数为ON的时候,程序会崩溃。
错误点在screen模块下,提示traf.lastlat中Traffic中没有lastlat属性。

Info: Airspace intersection and occupancy counts

Does BlueSky have any facility to perform 4D (3D + time, maybe 7D including speed vector) intersection with geo volums, i.e. airspaces?
This would allow for entry/exit or occupancy counts...useful for measuring sector load, simulating fatigue...

check on bluesky.traf.navdb fails

Installation checks fail with the following:

c:\repos\bluesky>python check.py
checking for pyqt, OK: PyQt4 found.
checking for pyopengl, OK.
checking for pygame, OK.
checking for scipy, OK.
checking for numpy, OK.
checking for matplotlib, OK.
checking bluesky modules
Using Qt5 for windows and widgets
Traceback (most recent call last):
  File "check.py", line 66, in <module>
    from bluesky.traf.navdb import *
ImportError: No module named navdb

One or more bluesky modules is not working properly, check error for more detail.

I can continue and pass the remaining checks only by commenting out the check.py line with

from bluesky.traf.navdb import *

[BUG] pygame version broken

Bug introduces in: 3ebc7f8

Now needs to load data only available to Qt version.

Problem: loaddata.py
Requires: loaddata.py

The problem stretches beyond the loaddata module, the libraries used also check which GUI is enabled and do not load the required functions.

The bug breaks the pygame version completely as it is not able to start.

Takeoff command blows up

Hi Guys,

I've tried running:

SP01 ADDWPT EGKK/RW08R
SP01 ADDWPT TAKEOFF

And received the following after TAKEOFF:

File "bluesky/traffic/route.py", line 222, in addwptStack
    wpidx = self.addwpt(idx, name, wptype, lat, lon, alt, spd, afterwp, beforewp)
UnboundLocalError: local variable 'beforewp' referenced before assignment

Running only:

SP01 ADDWPT TAKEOFF

Returns:

Traceback (most recent call last):
  File "BlueSky_qtgl.py", line 113, in <module>
    main_loop()
  File "BlueSky_qtgl.py", line 103, in main_loop
    manager.run()
  File "../bluesky/bluesky/simulation/qtgl/nodemanager.py", line 24, in run
    bs.sim.doWork()
  File "../bluesky/bluesky/simulation/qtgl/simulation.py", line 98, in doWork
    stack.process()
  File "/../bluesky/bluesky/stack/stack.py", line 1158, in process
    results = function(*parser.arglist)  # * = unpack list to call arguments
  File "/../bluesky/bluesky/stack/stack.py", line 149, in <lambda>
    lambda idx, *args: bs.traf.ap.route[idx].addwptStack(idx, *args),
  File "/../bluesky/bluesky/traffic/route.py", line 213, in addwptStack
    elif self.wptype[0]==self.orig:
IndexError: list index out of range

I may be using the commands incorrectly but in other cases you send helpful error messages and the simulation does not blow up.

Cheers,
Miklos

p.s.: Tested with Python 2.7 and Python 3.6

qtgl/nodemanager.py - IOError: [Errno 32] Broken pipe

***** BlueSky Open ATM simulator *****
Distributed under GNU General Public License v3
Reading config from settings.cfg
Using Qt4 for windows and widgets
Initializing multi-process simulation
QGLWidget initialized for OpenGL version 3.3
OpenGL context created with GL version 2.1
Reading config from settings.cfg
Traceback (most recent call last):
File "/home/junzi/Desktop/bluesky/bluesky/ui/qtgl/radarwidget.py", line 160, in actnodeChanged
self.allpolys.set_vertex_count(len(nact.polydata) / 2)
AttributeError: 'RadarWidget' object has no attribute 'allpolys'
junzi@ubuntu:~/Desktop/bluesky$ Traceback (most recent call last):
File "BlueSky_qtgl.py", line 83, in
MainLoop()
File "BlueSky_qtgl.py", line 44, in MainLoop
runNode()
File "/home/junzi/Desktop/bluesky/bluesky/sim/qtgl/nodemanager.py", line 20, in runNode
manager.sim.doWork()
File "/home/junzi/Desktop/bluesky/bluesky/sim/qtgl/simulation.py", line 96, in doWork
self.stack.process(self, self.traf, self.screenio)
File "/home/junzi/Desktop/bluesky/bluesky/stack/stack.py", line 707, in process
results = function(*arglist) # * = unpack list to call arguments
File "/home/junzi/Desktop/bluesky/bluesky/sim/qtgl/screenio.py", line 113, in pan
self.manager.sendEvent(PanZoomEvent(pan=(self.ctrlat, self.ctrlon), absolute=True))
File "/home/junzi/Desktop/bluesky/bluesky/sim/qtgl/nodemanager.py", line 56, in sendEvent
self.connection.send((int(event.type()), event))
IOError: [Errno 32] Broken pipe

improve message on aircraft performance

I am using scenario 0-demo-scenario.scn with BADA 3.1 and I get the following on stdout:

aircraft is using default aircraft performance (Boeing 747-400)

I see that message in 2 places in the code, in perfbada.py and perf.py

I assume I hit the perfbada.py code (see #68 for a request to provide the contextual info), then what does the message mean? Is a certain flight in the scenario specified with an aircraft model not in the BADA ones?
If so, which one? I.e. which ID, line in the scenario...

AttributeError: 'RadarWidget' object has no attribute 'globaldata'

Hello !

I have an issue running Bluesky with Pyqt4. Here is the entire output before python crashes :

Initializing multi-process simulation
QGLWidget initialized for OpenGL version 3.3
Reading config from settings.cfg
OpenGL context created with GL version 2.1
Traceback (most recent call last):
File "/Users/username/Desktop/bluesky-master/bluesky/ui/qtgl/radarwidget.py", line 557, in resizeGL
self.globaldata.set_win_width_height(self.width, self.height)
AttributeError: 'RadarWidget' object has no attribute 'global data'

Do you have any idea of the reasons of such an error.

The soft is running perfectly well with pygame.
Thanking you by advance for your help.

Bugs introduced in check.py and nav.dat

Hi, this diff shows a fix for check.py which is broken in Python 2.7, and for nav.dat which has non-ASCII chars in line 104.

diff --git a/check.py b/check.py
index cca4e4a..2962e4d 100644
--- a/check.py
+++ b/check.py
@@ -1,4 +1,5 @@
 #!/usr/bin/python
+from __future__ import print_function
 import traceback
 print("This script checks the availability of the libraries required by BlueSky, and the capabilities of your system.")
 print()
diff --git a/data/navdata/nav.dat b/data/navdata/nav.dat
index e7b90bf..a0a68c7 100644
--- a/data/navdata/nav.dat
+++ b/data/navdata/nav.dat
@@ -101,7 +101,7 @@
 2  41.06972222 -081.38736111      0   362  50    0.0 AK   AKRON NDB
 2  41.06972222 -081.38747222      0   362  50    0.0 AK   AKRON NDB
 2  55.15000000  038.29000000      0   732  80    0.0 QO   AKSINYINO NDB
-2  55.15277778  038.28861111    514   732  80    0.0 ÀÎ AKSINYINO NDB
+2  55.15277778  038.28861111    514   732  80    0.0 QO   AKSINYINO NDB^M
 2  43.83431100  051.14724200      0   670  50    0.0 TA   AKTAU NDB
 2  43.88629400  051.03521900      0   670  50    0.0 AU   AKTAU NDB
 2  50.28093900  057.15226900      0   323  50    0.0 AT   AKTYUBINSK LOM

DDS texture compression is not supported

I used pyqt5 to run Bluesky on Fedora 25 (switched to X11) and got a warning like this:
Warning:
QGLContext::bindTexture(): DDS texture compression is not supported.
Could anyone give some hints on how to resolve this?

The configuration with pygame runs fine. Thanks

some scenarios fail to load

The following scenarios produce errors:

  • CIRCLE12.SCN

    Traceback (most recent call last):
    File "c:\repos\bluesky\bluesky\sim\qtgl\simulation.py", line 79, in doWork
      self.stack.process(self, self.traf, self.screenio)
    File "c:\repos\bluesky\bluesky\stack\stack.py", line 289, in process
      cmd = self.cmdsynon[key]
    NameError: global name 'key' is not defined
    
  • EHAM-TAXY-SCN

    Traceback (most recent call last):
    File "c:\repos\bluesky\bluesky\sim\qtgl\simulation.py", line 82, in doWork
      self.traf.update(self.simt, self.simdt)
    File "c:\repos\bluesky\bluesky\traf\traffic.py", line 554, in update
      self.dbconf.conflictlist(simt)
    File "c:\repos\bluesky\bluesky\traf\asas.py", line 212, in conflictlist
      self.confidxs = np.where(self.swconfl)
    AttributeError: Dbconf instance has no attribute 'swconfl'
    
  • INTENT.scn

    Traceback (most recent call last):
    File "c:\repos\bluesky\bluesky\sim\qtgl\simulation.py", line 79, in doWork
      self.stack.process(self, self.traf, self.screenio)
    File "c:\repos\bluesky\bluesky\stack\stack.py", line 289, in process
      cmd = self.cmdsynon[key]
    NameError: global name 'key' is not defined
    
  • mtn.scn

    Reading scenario file:  C:/repos/bluesky/scenario/mtn.scn
    
    except this:  0:00:00,00>CRE MS841, B737,  51.42972,   4.15673, 118.4 FL320, 400
    
  • RUNWAYINCURSION.scn

    Traceback (most recent call last):
    File "c:\repos\bluesky\bluesky\sim\qtgl\simulation.py", line 79, in doWork
      self.stack.process(self, self.traf, self.screenio)
    File "c:\repos\bluesky\bluesky\stack\stack.py", line 316, in process
      arglist.append(float(cmdargs[i]))
    ValueError: invalid literal for float(): 326.8T
    

    and similarly for other similar floats with a trailing T

  • Test-1-on-1-90-deg.scn

    Reading scenario file:  C:/repos/bluesky/scenario/Test-1-on-1-90-deg.scn
    
    aircraft is using default aircraft performance (Boeing 747-400).
    Syntax error in command:  FIXDT ON,20
    
  • TESTWP.SCN

    Reading scenario file:  C:/repos/bluesky/scenario/TESTWP.SCN
    
    Traceback (most recent call last):
    File "c:\repos\bluesky\bluesky\sim\qtgl\simulation.py", line 79, in doWork
      self.stack.process(self, self.traf, self.screenio)
    File "c:\repos\bluesky\bluesky\stack\stack.py", line 357, in process
      results = function(arglist)
    File "c:\repos\bluesky\bluesky\traf\traffic.py", line 903, in create
      acspd = mach2tas(cmdspd,acalt)
    NameError: global name 'mach2tas' is not defined
    
  • WALLH.SCN

    Reading scenario file:  C:/repos/bluesky/scenario/WALLH.SCN
    
    Traceback (most recent call last):
    File "c:\repos\bluesky\bluesky\sim\qtgl\simulation.py", line 79, in doWork
      self.stack.process(self, self.traf, self.screenio)
    File "c:\repos\bluesky\bluesky\stack\stack.py", line 289, in process
      cmd = self.cmdsynon[key]
    NameError: global name 'key' is not defined
    

Crash on 0-demo-scenario.scn

Hi, I just tested bluesky and I have a systematic crash. Procedure to reproduce:
-- load "0-demo-scenario.scn"
-- wait around 1 minute. Some warning messages appear in the log:

/home/earendil/Programmes/BlueSky/bluesky/bluesky/traf/asas.py:159: RuntimeWarning: invalid value encountered in less
*(1.-I)

-- Click on any aircraft, code AF982 appears instead of its own code in the console.
-- Click again on any aircraft, crash with stacktrace:

Traceback (most recent call last):
File "bluesky.py", line 98, in
tmx.run() # Run it
File "bluesky.py", line 58, in run
self.cmd.process() # Process commands
File "/home/earendil/Programmes/BlueSky/bluesky/bluesky/stack/stack.py", line 372, in process
+ str(int(traf.alt[idx] / ft)) + " ft")
ValueError: cannot convert float NaN to integer

Obviously, some numpy arrays related to asas are corrupted by NaN values because at least one aircraft (AF982?) is messing around.

Ducumentation via wiki

I would suggest to integrate the documentation via the wiki (using Markdown).
One memorable example is d3.js, but it does not have to be so complicated.

Few advantages come to mind:

  1. possibility to get contributions (not everybody uses MS Word or likes it)
  2. better version control
  3. browsable
  4. you can still turn the pages in PDF

PAN command broken

The PAN command does not process a lat/lon argument.

Solution:
This line in stack has the comma in the wrong place. Moving it outside the bracket fixes it.

BlueSky unhappy about `AT` command

Hi There,

If I try to edit a waypoint constraint with the AT command BlueSky crashes out.

Running:

CRE foo bar egkk 100 100 100
ADDWPT foo liffy 12000
foo AT liffy ALT 10000

Will reward me with (Python2):

File "BlueSky_qtgl.py", line 113, in <module>
    main_loop()
  File "BlueSky_qtgl.py", line 103, in main_loop
    manager.run()
  File "/bluesky/simulation/qtgl/nodemanager.py", line 24, in run
    bs.sim.doWork()
  File "/bluesky/simulation/qtgl/simulation.py", line 98, in doWork
    stack.process()
  File "/bluesky/stack/stack.py", line 1166, in process
    results = function(*parser.arglist)  # * = unpack list to call arguments
  File "/bluesky/stack/stack.py", line 186, in <lambda>
    lambda idx, *args: bs.traf.ap.route[idx].atwptStack(idx, *args),
  File "/bluesky/traffic/route.py", line 371, in atwptStack
    parser  = Argparser()
TypeError: __init__() takes exactly 4 arguments (1 given)

Or with (Python3):

File "BlueSky_qtgl.py", line 113, in <module>
    main_loop()
  File "BlueSky_qtgl.py", line 103, in main_loop
    manager.run()
  File "/bluesky/simulation/qtgl/nodemanager.py", line 24, in run
    bs.sim.doWork()
  File "/bluesky/simulation/qtgl/simulation.py", line 98, in doWork
    stack.process()
  File "/bluesky/stack/stack.py", line 1166, in process
    results = function(*parser.arglist)  # * = unpack list to call arguments
  File "/bluesky/stack/stack.py", line 186, in <lambda>
    lambda idx, *args: bs.traf.ap.route[idx].atwptStack(idx, *args),
  File "/bluesky/traffic/route.py", line 371, in atwptStack
    parser  = Argparser()
TypeError: __init__() missing 3 required positional arguments: 'argtypes', 'argisopt', and 'argstring'

DELWPT fails if one waypoint added

To replicate, perform these commands:

CRE EZ833 B739 n53'04'34.0 w011'12'0.0 82 35000 250
ADDWPT EZ833 LIFFY 16000
LISTRTE EZ833
DELWPT EZ833 LIFFY

The waypoint is not deleted, even though it is listed (screenshot enclosed).
bug

Untangeling research area from metrics instance

The research area functions called by the AREA command use the METRICS instance to save some data.

Wouldn't it be best to untangle those? In my opinion the AREA command is should not require an enabled METRICS module.

In my last pull request I fixed this by always issuing the command "METRICS ON" at startup to create the metrics instance.

ADS-B datafeed setup documentation

I see that in adsb_datafeed.py you can listen to a cetain IP address/port to stream flight ADS-B readings.
Could you add some more documentation (in README? Wiki?) about how you use it?
What is the format?

I am interested in it because I was thinking whether it could be possible to feed historical ADS-B data which we have already decoded and archived in our DB and/or files...
Thanks in advance

more packages needed

The check.py script should also check for the following:

  • python-qt5
  • pyopengl

And I had to re-install PyQt4.

At least these are the ones I had to install on top of the ones listed by check.py.
I am using Python 2.7.5

TCP socket is not opened (pygame simulation)

If I start an pygame simulation using python BlueSky.py, it should listen on port 8888 for incoming console connections.
I cannot open a connection on this port using telnet, netcat or whatever...

Is this feature enabled with the pygame simulation ? I can't find any indication in the code.

Thanks for the support !

Waypoint names are rendered wrong

If I pan liffy, it appears in the display as FYLIF

Screenshot attached.
bug

Platform is Mac OS X 10.13, using QtGL, bluesky master branch.

[BUG] exported scenario files (stack.saveic) not always readable

The saveic function in stack does sometimes save a lat/lon coordinate in scientific notation when dealing with near-zero values. The stack cannot handle this format when reading in the scenario file and skips the argument:

bug1

One way to solve this is by formatting the exported values, the below example does this by setting the precision to a 10 point float.
https://github.com/pdanneels/bluesky/blob/synthetics/bluesky/stack/stack.py#L308

This however replaces the initial repr functions! @jooste @ProfHoekstra Do you know of any implications this might have?

Import error in check.py

I appreciate you for providing an open ATC simulator to researchers who cannot use expensive simulators.
I manually installed the required libraries such as PyQt4 and PyOpenGL in my Windows (Windows 7, 32 bit) and tried to launch BlueSky in OpenGL mode, but I failed. So, I launched check.py in order to check whether the required libraries are appropriately installed, but I got the following error message:

F:\Installed\Folder\bluesky-20170323>python check.py
This script checks the availability of the libraries required by BlueSky, and th
e capabilities of your system.

Checking for numpy [OK]
Checking for scipy [OK]
Checking for matplotlib [OK]
Checking for pyqt [QT4]
Checking for pyopengl [OK]
OpenGL module version is [3.1.0]
Checking GL capabilities [OK]
GL Version at least 3.3 [OK]
Supported GL version [3.3]
Checking for pygame [OK]

You have all the required libraries to run BlueSky. You can use both the QTGL an
d the pygame versions.
Checking bluesky modules
Using Qt4 for windows and widgets
StateBasedCD: using default Python version, no compiled version for this platfor
m.
Using BlueSky performance model
Traceback (most recent call last):
File "check.py", line 139, in
from bluesky.traf.params import *
ImportError: No module named params

One or more BlueSky modules are not working properly, check the above error for
more detail.

The following is the error message I got when I launched BlueSky.py.

Initializing multi-process simulation
QGLWidget initialized for OpenGL version 3.3
Loading global navigation database...
Reading cache: navdata.p
Reading cache: rwythresholds.p
Reading cache: aptsurface.p
Maximum supported texture size: 8192
Loading texture data/graphics/world.8192x4096.dds
Traceback (most recent call last):
File "F:\Installed\Folder\bluesky-20170323\bluesky\ui\qtgl\radarwidget.py", line 42
5, in initializeGL
print 'Error while creating RadarWidget objects: ' + e.args[0]
IndexError: tuple index out of range

`AT` altitude and speed change command only affects altitude

Hi Again,

The AT command now works a treat if you edit the altitude speed constraints separately.

If you try to override both altitude and speed at the same time though, it ignores the speed override.

E.g.

Foo ADDWPT std 20000 320
Foo AT std ALT 18000 SPD 300

Will change the altitude constraint to 18000 but leave the speed constraint at 320.

Thanks for the super-quick fixes :)

OpenGL.error.GLError

I'm using:

Can't see anything but a black board. Here is my log:

Traceback (most recent call last):
  File "C:\Users\jack\Downloads\bluesky\bluesky-master\bluesky\ui\qtgl\radarwidget.py", line 276, in initializeGL
    self.create_objects()
  File "C:\Users\jack\Downloads\bluesky\bluesky-master\bluesky\ui\qtgl\radarwidget.py", line 121, in create_objects
    self.achdgbuf    = RenderObject.create_empty_buffer(MAX_NAIRCRAFT * 4, usage=gl.GL_STREAM_DRAW)
  File "C:\Users\jack\Downloads\bluesky\bluesky-master\bluesky\ui\qtgl\glhelpers.py", line 211, in create_empty_buffer
    buf_id = gl.glGenBuffers(1)
  File "latebind.pyx", line 32, in OpenGL_accelerate.latebind.LateBind.__call__ (D:\Build\PyOpenGL\pyopengl-bzr\OpenGL_accelerate\src\latebind.c:992)
  File "wrapper.pyx", line 318, in OpenGL_accelerate.wrapper.Wrapper.__call__ (D:\Build\PyOpenGL\pyopengl-bzr\OpenGL_accelerate\src\wrapper.c:6564)
OpenGL.error.GLError: GLError(
        err = 1281,
        description = '\xce\xde\xd0\xa7\xd6\xb5',
        baseOperation = glGenBuffers,
        pyArgs = (1, <object object at 0x01F984D0>),
        cArgs = (1, array([2], dtype=uint32)),
        cArguments = (1, array([2], dtype=uint32))
)
Traceback (most recent call last):
  File "C:\Users\jack\Downloads\bluesky\bluesky-master\bluesky\ui\qtgl\nd.py", line 179, in initializeGL
    self.create_objects()
  File "C:\Users\jack\Downloads\bluesky\bluesky-master\bluesky\ui\qtgl\nd.py", line 144, in create_objects
    self.waypoints = RenderObject.copy(self.shareWidget.waypoints)
AttributeError: 'RadarWidget' object has no attribute 'waypoints'

Thanks for help :)

Python version mismatch

Hi,

You are doing a great job guys, really nice tool!

Have a small issue here, I've tried to run the bluesky on python v2.7.13 and the check.py fails to start with this error:

Traceback (most recent call last):
  File "check.py", line 133, in <module>
    from bluesky import *
  File "/Users/yev/Projects/sparkl/bluesky/bluesky/__init__.py", line 8, in <module>
    import bluesky.ui.pygame.screen as _scr
  File "/Users/yev/Projects/sparkl/bluesky/bluesky/ui/pygame/__init__.py", line 1, in <module>
    from .screen import Screen
  File "/Users/yev/Projects/sparkl/bluesky/bluesky/ui/pygame/screen.py", line 21, in <module>
    from .dialog import fileopen as opendialog
  File "/Users/yev/Projects/sparkl/bluesky/bluesky/ui/pygame/dialog.py", line 7, in <module>
    from tkinter import *
ImportError: No module named tkinter

From the python documentation, I've found this:

Install Tkinter

To see if you have Tkinter, type python on the Linux command line. 
Then at the Python prompt, type

>>> import Tkinter

Or in Python 3

>>> import tkinter

Seems that the code refers to python3 tkinter library while documentation says "BlueSky is developed in Python 2.x".

weird problems

now I'm try to build the simplest case. Suppose I have define an orig, a destination. After the aircraft reaches the destination, it won't stop, it just continue going on and the simulation won't stop too. How can I stop the aircraft at that point and stop the simulation?

Besides, I have read that if I want to do 1000 simulations at the same time, I can generate 1000 nodes. But how can I do that?

Aircraft created through `mcre` seem to share the same route

Hello Guys,

Seem to have run into an issue.

To reproduce:
(assume for the minute that the new aircraft objects will be foo and bar

$ mcre 2
$ addwpt foo coa
$ listrte bar
*COA : ----/----

The waypoint COA was assigned only to foo, not bar, so running listrte on bar should not return it. Except of course, if this is the intended behaviour :)

Cheers!

about FLIGHT PHASES

Hi

I‘m confused with some codes in “bluesky/bluesky/traffic/performance/legacy/performance.py”

“vmcr” has two different meanings?

unnamed1
unnamed2

Problem of generating airport binary file

It seems the binary file generation code is not working with pyQt4.. Maybe we should deprecated the support for qt4 ?...

Also, on Ubuntu the PyQt5 is only bundled with Python3. We have to built it from source code again. I think we could put out an guide on building pyqt5 on Mac and Linux.

Loading texture data/graphics/world.16384x8192.dds
Traceback (most recent call last):
File "/home/junzi/workspace/py/bluesky/bluesky/ui/qtgl/radarwidget.py", line 679, in event
self.airportsInRange()
File "/home/junzi/workspace/py/bluesky/bluesky/ui/qtgl/radarwidget.py", line 610, in airportsInRange
indices = np.logical_and.reduce((self.apt_ctrlat >= self.panlat - ll_range, self.apt_ctrlat <= self.panlat + ll_range,
AttributeError: 'RadarWidget' object has no attribute 'apt_ctrlat'

Flickering WPT

(Sorry to bother.)
Using QT version of BlueSky I get flickering WPT, see video

out

Flickering happens even when you load a scenario.

how can I get the result of the simulation

I'm currently working on several simulations with different speeds.For example, in 1000 simulations, the speed in each simulation is the same,but different between different simulations. The aircraft, waypoint, origin and destination are all the same among different simulations. In each simulation, I want to find out the deviation of the speed, altitude,logitude from each waypoint. How can I do that? Or where can I find the simulation results?

Renamed package imported by old name in check.py

Hi There,

check.py tries to import everything from perf - from bluesky.traf.perf import *.

perf was renamed as performance, so the import fails.

The simulation is pretty cool by the way:)
Miklos

TCP connection to simulation is one-way only

If I start an opengl simulation using python BlueSky.py, it listens on port 8888 for incoming console connections.

I connect using netcat and issue a command, as follows:

% nc 127.0.0.1 8888
airport egkk

Both the command (as issued in lower case) and the output result of the command appear on the gui console.

I would expect the output of the command to appear on the TCP connection, and the GUI console to remain unchanged.

HOW to automatically run 1000 simulations?

HI, I'm trying not to ask stupid questions as a beginner, but sometimes I have no other choice but ask for help. I'm trying to run 1000 simulations with 1000 different speeds, and the speed follows a Gaussian distribution. Now I have generated 1000 scn files, which contain different speed. The problem is that how can I run the 1000 simulation simultaneously? It will take a long time to run it one by one manually.

Besides, after I read the log file,I find out that the true airspeed is far away from the CAS, can I set the true airspeed the same as CAS? Like turn off the real temp, p ,or density?

I really need to get a good control of this software cause my phd work need it a lot. Is there any seminar or lecture giving more details and guidance about this software? I really need help:(

IndexError: list index out of range

Hello,
Sorry to disturb

I've been trying to use the release version of bluesky for the first time and i keep getting this error whenever i use the IC command to access the demo file. It even comes when i try to open it from file>open and select demo.

Traceback (most recent call last):
File "bluesky\sim\qtgl\mainmanager.py", line 196, in event
IndexError: list index out of range

BADA

When using the BADA performance model, I get the following error

Using BADA Perfromance model
Traceback (most recent call last):
  File "BlueSky_qtgl.py", line 113, in <module>
    main_loop()
  File "BlueSky_qtgl.py", line 99, in main_loop
    bs.init()
  File "D:\me\repo\bluesky-master\bluesky\__init__.py", line 24, in init
    from bluesky.traffic import Traffic
  File "D:\me\repo\bluesky-master\bluesky\traffic\__init__.py", line 1, in <module>
    from .traffic import Traffic
  File "D:\me\repo\bluesky-master\bluesky\traffic\traffic.py", line 36, in <module>
    from .performance.legacy.perfbada import PerfBADA as Perf
  File "D:\me\repo\bluesky-master\bluesky\traffic\performance\legacy\perfbada.py", line 13, in <module>
    if not coeff_bada.init(settings.perf_path_bada):
  File "D:\me\repo\bluesky-master\bluesky\traffic\performance\legacy\coeff_bada.py", line 122, in init
    ac.setOPFData(opf_parser.parse(file))
  File "D:\me\repo\bluesky-master\bluesky\tools\fwparser.py", line 62, in parse
    dline = [t(s.strip()) for t, s in zip(dtypes, match.groups())]
  File "D:\me\repo\bluesky-master\bluesky\tools\fwparser.py", line 62, in <listcomp>
    dline = [t(s.strip()) for t, s in zip(dtypes, match.groups())]
ValueError: invalid literal for int() with base 10: ''
Found BADA version 3.6 (release date May 25 2004)
296 aircraft entries loaded

Any clue to what could be causing this?

Should the metrics block in the stack be pulled out?

The metrics block in the stack file needs to be adapted every time a metric is added.

Isn't it better to move the metrics command processing to the metrics module so the stack file doesn't have to be changed on the addition or change of a metric?

Use of TCP port

Hi - trying to issue commands over TCP (8888)
I notice in the code that my commands make it on to a command stack, but they never seem to be processed.

I get this far in stack.py

def stack(cmdline):
    # Stack one or more commands separated by ";"
    cmdline = cmdline.strip()
    if len(cmdline) > 0:
        for line in cmdline.split(';'):
            print line   # my addition
            cmdstack.append(line)

but I don't get this far:

def process():
    """process and empty command stack"""
    global cmdstack

    # Process stack of commands
    for line in cmdstack:
        print "processing:" + line   # my addition

Could you advise on use of the network interface? 👍

Many thanks

PyQt5 passes checks but simulator still crashes

I installed as per instructions.
I run the checks and then the applications, got a brief dialog with some QEGLPlatformContext: eglError 3005 ... error message than the application crashed.
Here is the output:

C:\repos\bluesky>python check.py
checking for pyqt, OK: PyQt4 found.
checking for pyopengl, OK.
checking for pygame, OK.
checking for scipy, OK.
checking for numpy, OK.
checking for matplotlib, OK.
checking bluesky modules
Using Qt5 for windows and widgets
Cool! all modules good to go!

C:\repos\bluesky>python BlueSky.py
   *****   BlueSky Open ATM simulator *****
Distributed under GNU General Public License v3
Reading config from settings.cfg
Using Qt5 for windows and widgets
Using BADA performance model. Found 195 aircraft performance definition files (*.OPF)
Initializing multi-process simulation
QGLWidget initialized for OpenGL version 3.3
Loading global navigation database...
Reading cache: navdata.p
Reading cache: rwythresholds.p
Reading cache: aptsurface.p
Reading config from settings.cfg
Using BADA performance model. Found 195 aircraft performance definition files (*.OPF)
Loading global navigation database...
Reading cache: navdata.p
Traceback (most recent call last):
  File "C:\repos\bluesky\bluesky\ui\qtgl\radarwidget.py", line 160, in actnodeChanged
    self.allpolys.set_vertex_count(len(nact.polydata) / 2)
AttributeError: 'RadarWidget' object has no attribute 'allpolys'

C:\repos\bluesky>Reading cache: rwythresholds.p
Traceback (most recent call last):
  File "BlueSky_qtgl.py", line 84, in <module>
    MainLoop()
  File "BlueSky_qtgl.py", line 45, in MainLoop
    runNode()
  File "C:\repos\bluesky\bluesky\sim\qtgl\nodemanager.py", line 20, in runNode
    manager.sim.doWork()
  File "C:\repos\bluesky\bluesky\sim\qtgl\simulation.py", line 104, in doWork
    stack.process(self, self.traf, self.screenio)
  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\sim\qtgl\screenio.py", line 79, in echo
    self.manager.sendEvent(StackTextEvent(disptext=text))
  File "C:\repos\bluesky\bluesky\sim\qtgl\nodemanager.py", line 56, in sendEvent
    self.connection.send((int(event.type()), event))
IOError: [Errno 10054] An existing connection was forcibly closed by the remote host

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.