Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Takeoff command blows up #108

Closed
miklosduma opened this issue Oct 23, 2017 · 2 comments
Closed

Takeoff command blows up #108

miklosduma opened this issue Oct 23, 2017 · 2 comments

Comments

@miklosduma
Copy link

miklosduma commented Oct 23, 2017

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

@jooste
Copy link
Member

jooste commented Oct 23, 2017

Hi Miklos,

There were indeed two bugs. They should be fixed in e84c25b. I tested this as follows (slightly different than what you describe, but I assume you did something similar, since you need a CRE command as well):

CRE SP01 B744 EGKK/RW08R * 0 0
SP01 ADDWPT TAKEOFF

With the above-referenced commit this now works properly.

@jooste jooste closed this as completed Oct 23, 2017
@ProfHoekstra
Copy link
Collaborator

ProfHoekstra commented Oct 23, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants