Improve SEAD ingress tasking and target waypoint

* Fix suicide SEAD flights (diving to the SAM)

additional fix for #2152. This sets the Target Waypoint ALT to the Ingress ALT for non player flights. Player flights will have the target waypoint set to 0 AGL so that they can slave weapons or TGP to it.

* Add GroupAttack to SEAD so that they suppress more
This commit is contained in:
RndName 2022-04-20 00:19:03 +02:00 committed by GitHub
parent 004bcce58e
commit c437fa329c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 5 deletions

View File

@ -287,7 +287,15 @@ class WaypointBuilder:
return self._target_area(f"STRIKE {target.name}", target) return self._target_area(f"STRIKE {target.name}", target)
def sead_area(self, target: MissionTarget) -> FlightWaypoint: def sead_area(self, target: MissionTarget) -> FlightWaypoint:
return self._target_area(f"SEAD on {target.name}", target, flyover=True) # Set flyover with ingress altitude to allow the flight to search and engage
# the target group at the ingress alt without suicide dive
return self._target_area(
f"SEAD on {target.name}",
target,
flyover=True,
altitude=self.doctrine.ingress_altitude,
alt_type="BARO",
)
def dead_area(self, target: MissionTarget) -> FlightWaypoint: def dead_area(self, target: MissionTarget) -> FlightWaypoint:
return self._target_area(f"DEAD on {target.name}", target) return self._target_area(f"DEAD on {target.name}", target)
@ -297,14 +305,18 @@ class WaypointBuilder:
@staticmethod @staticmethod
def _target_area( def _target_area(
name: str, location: MissionTarget, flyover: bool = False name: str,
location: MissionTarget,
flyover: bool = False,
altitude: Distance = meters(0),
alt_type: AltitudeReference = "RADIO",
) -> FlightWaypoint: ) -> FlightWaypoint:
waypoint = FlightWaypoint( waypoint = FlightWaypoint(
name, name,
FlightWaypointType.TARGET_GROUP_LOC, FlightWaypointType.TARGET_GROUP_LOC,
location.position, location.position,
meters(0), altitude,
"RADIO", alt_type,
description=name, description=name,
pretty_name=name, pretty_name=name,
) )

View File

@ -50,6 +50,10 @@ class PydcsWaypointBuilder:
# It seems we need to leave waypoint.type exactly as it is even # It seems we need to leave waypoint.type exactly as it is even
# though it's set to "Turning Point". If I set this to "Fly Over # though it's set to "Turning Point". If I set this to "Fly Over
# Point" and then save the mission in the ME DCS resets it. # Point" and then save the mission in the ME DCS resets it.
if self.flight.client_count > 0:
# Set Altitute to 0 AGL for player flights so that they can slave target pods or weapons to the waypoint
waypoint.alt = 0
waypoint.alt_type = "RADIO"
waypoint.alt_type = self.waypoint.alt_type waypoint.alt_type = self.waypoint.alt_type
tot = self.flight.flight_plan.tot_for_waypoint(self.waypoint) tot = self.flight.flight_plan.tot_for_waypoint(self.waypoint)

View File

@ -42,7 +42,7 @@ class SeadIngressBuilder(PydcsWaypointBuilder):
# into the SAM instead of waiting for it to come alive # into the SAM instead of waiting for it to come alive
engage_task = EngageGroup(miz_group.id) engage_task = EngageGroup(miz_group.id)
engage_task.params["weaponType"] = DcsWeaponType.Guided.value engage_task.params["weaponType"] = DcsWeaponType.Guided.value
# Ensure that they fire all ammunition in one attack pass engage_task.params["groupAttack"] = True
engage_task.params["expend"] = Expend.All.value engage_task.params["expend"] = Expend.All.value
waypoint.tasks.append(engage_task) waypoint.tasks.append(engage_task)
else: else: