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

ECL: Possibility to create Marker ticks asymmetric #8

Open
sergej-singer opened this issue Jul 16, 2024 · 2 comments
Open

ECL: Possibility to create Marker ticks asymmetric #8

sergej-singer opened this issue Jul 16, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@sergej-singer
Copy link

In cases, when 2 parallel runways are too close to each other, would be more pleasing to draw Marker tick only on the outer sides of the runways, like that:
image

@sergej-singer sergej-singer changed the title ECL: Possibility to create Marker ticks only one side ECL: Possibility to create Marker ticks asymmetric Jul 16, 2024
@sergej-singer
Copy link
Author

sergej-singer commented Jul 16, 2024

Possible implementation by me:

def draw_marker_ticks(rwy_info, at: list, gap: float, length: float, side: int = 0):
    #side: 0 = both, 1 = left, 2 = right

    lines = []
    brg = Brg(rwy_info["bearing"]).invert()
    tick_brg = brg + 90
    for dist in at:
        base = Fix(rwy_info["thr"]).move_to(dist, brg)

        if side == 0:
            lines.extend((str(base.move_to(gap, tick_brg).line_to(length, tick_brg)),
                        str(base.move_to(-gap, tick_brg).line_to(-length, tick_brg))))
        elif side == 1:
            lines.append(str(base.move_to(gap, tick_brg).line_to(length, tick_brg)))
        elif side == 2:
            lines.append(str(base.move_to(-gap, tick_brg).line_to(-length, tick_brg)))
        else:
            msg = f"The value for side can be only 0, 1 or 2. {side} is unknown"
            raise ValueError(msg)

    return "\n".join(lines)

@a3li a3li added the enhancement New feature or request label Jul 17, 2024
@hannesaltmann
Copy link

+1
We would appreciate having this option to generate realistic centerlines at EDDB.

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

No branches or pull requests

3 participants