mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Fine-tune SEAD search point
This commit is contained in:
parent
d3069bdaad
commit
5818367f2e
@ -431,9 +431,12 @@ class WaypointBuilder:
|
|||||||
# Use the threat range as offset distance to avoid flying all the way to the SAM site
|
# Use the threat range as offset distance to avoid flying all the way to the SAM site
|
||||||
assert self.flight.package.waypoints
|
assert self.flight.package.waypoints
|
||||||
ingress = self.flight.package.waypoints.ingress
|
ingress = self.flight.package.waypoints.ingress
|
||||||
|
ingress2tgt_dist = ingress.distance_to_point(target.position)
|
||||||
threat_range = 1.1 * max([x.threat_range for x in target.strike_targets]).meters
|
threat_range = 1.1 * max([x.threat_range for x in target.strike_targets]).meters
|
||||||
hdg = target.position.heading_between_point(ingress)
|
hdg = target.position.heading_between_point(ingress)
|
||||||
hold = target.position.point_from_heading(hdg, threat_range)
|
hold = target.position.point_from_heading(
|
||||||
|
hdg, min(threat_range, ingress2tgt_dist * 0.95)
|
||||||
|
)
|
||||||
|
|
||||||
return FlightWaypoint(
|
return FlightWaypoint(
|
||||||
"SEAD Search",
|
"SEAD Search",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user