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

label holding pattern in Traffic #253

Closed
junzis opened this issue Sep 28, 2022 · 3 comments
Closed

label holding pattern in Traffic #253

junzis opened this issue Sep 28, 2022 · 3 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@junzis
Copy link
Collaborator

junzis commented Sep 28, 2022

Add a new function for traffic that labels the holding pattern, example code follows:

def label_holding(flight):
    flight = flight.assign(holding=False)
    hold = flight.holding_pattern().all()
    if hold:
        flight.data.loc[hold.data.index, "holding"] = True
    return flight

@junzis junzis added the enhancement New feature or request label Sep 28, 2022
@xoolive xoolive self-assigned this Sep 29, 2022
@xoolive xoolive added the good first issue Good for newcomers label Sep 29, 2022
@xoolive
Copy link
Owner

xoolive commented Sep 29, 2022

I am thinking of something along the following interface on FlightIterator:

.label(holding=True)
.label(index="{i}")  # will apply a format with index=i, f=self
.label(start="start", altitude_max="{f.altitude_max}")  # string will call for attribute

then on Flight:

.label("holding_pattern", **kwargs)
.label("aligned_on_ils('LFBO')", **kwargs)

This will induce some refactoring for more elegant output in:

  • all remains awkward in the way:
    • it creates a new index,
    • it concatenates non consecutive segments;
      so the method could disappear? or become an alias for label.
  • aligned_on_ils with the ILS argument
  • same with takeoff_runway and aligned_on_runway

@junzis
Copy link
Collaborator Author

junzis commented Sep 29, 2022

yes. looks quite nice for me, let's do that.

@xoolive
Copy link
Owner

xoolive commented Oct 5, 2022

After a closer look, it has to work only on Flight because we lose reference to the original flight when in FlightIterator

xoolive added a commit that referenced this issue Oct 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants