mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Clean up one frontline bounds user.
This commit is contained in:
parent
08d4fe92d1
commit
ba7b3aa473
@ -80,12 +80,8 @@ class Builder(IBuilder[CasFlightPlan, CasLayout]):
|
|||||||
|
|
||||||
bounds = FrontLineConflictDescription.frontline_bounds(location, self.theater)
|
bounds = FrontLineConflictDescription.frontline_bounds(location, self.theater)
|
||||||
ingress = bounds.left_position
|
ingress = bounds.left_position
|
||||||
center = ingress.point_from_heading(
|
center = bounds.center
|
||||||
bounds.heading_from_left_to_right.degrees, bounds.length / 2
|
egress = bounds.right_position
|
||||||
)
|
|
||||||
egress = ingress.point_from_heading(
|
|
||||||
bounds.heading_from_left_to_right.degrees, bounds.length
|
|
||||||
)
|
|
||||||
|
|
||||||
ingress_distance = ingress.distance_to_point(self.flight.departure.position)
|
ingress_distance = ingress.distance_to_point(self.flight.departure.position)
|
||||||
egress_distance = egress.distance_to_point(self.flight.departure.position)
|
egress_distance = egress.distance_to_point(self.flight.departure.position)
|
||||||
|
|||||||
@ -20,6 +20,16 @@ class FrontLineBounds:
|
|||||||
heading_from_left_to_right: Heading
|
heading_from_left_to_right: Heading
|
||||||
length: int
|
length: int
|
||||||
|
|
||||||
|
@property
|
||||||
|
def center(self) -> Point:
|
||||||
|
return (self.left_position + self.right_position) / 2
|
||||||
|
|
||||||
|
@property
|
||||||
|
def right_position(self) -> Point:
|
||||||
|
return self.left_position.point_from_heading(
|
||||||
|
self.heading_from_left_to_right.degrees, self.length
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class FrontLineConflictDescription:
|
class FrontLineConflictDescription:
|
||||||
def __init__(
|
def __init__(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user