mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-07-25 06:53:05 +00:00
Ops
This commit is contained in:
@@ -84,7 +84,9 @@ AIRWING = {
|
|||||||
|
|
||||||
--- Patrol data.
|
--- Patrol data.
|
||||||
-- @type AIRWING.PatrolData
|
-- @type AIRWING.PatrolData
|
||||||
|
-- @field #string type Type name.
|
||||||
-- @field Core.Point#COORDINATE coord Patrol coordinate.
|
-- @field Core.Point#COORDINATE coord Patrol coordinate.
|
||||||
|
-- @field #number altitude Altitude in feet.
|
||||||
-- @field #number heading Heading in degrees.
|
-- @field #number heading Heading in degrees.
|
||||||
-- @field #number leg Leg length in NM.
|
-- @field #number leg Leg length in NM.
|
||||||
-- @field #number speed Speed in knots.
|
-- @field #number speed Speed in knots.
|
||||||
@@ -93,7 +95,7 @@ AIRWING = {
|
|||||||
|
|
||||||
--- AIRWING class version.
|
--- AIRWING class version.
|
||||||
-- @field #string version
|
-- @field #string version
|
||||||
AIRWING.version="0.2.0"
|
AIRWING.version="0.2.1"
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
-- ToDo list
|
-- ToDo list
|
||||||
@@ -567,37 +569,52 @@ function AIRWING:SetNumberRescuehelo(n)
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Create a new generic patrol point.
|
---
|
||||||
-- @param #AIRWING self
|
-- @param #AIRWING self
|
||||||
-- @param #AIRWING.PatrolData point Patrol point table.
|
-- @param #AIRWING.PatrolData point Patrol point table.
|
||||||
-- @param #string Text
|
|
||||||
-- @return #string Marker text.
|
-- @return #string Marker text.
|
||||||
function AIRWING:_PatrolPointMarkerText(point, Text)
|
function AIRWING:_PatrolPointMarkerText(point)
|
||||||
|
|
||||||
local text=string.format("%s Occupied=%d, \nheading=%03d, leg=%d NM, alt=%d ft, speed=%d kts",
|
local text=string.format("%s Occupied=%d, \nheading=%03d, leg=%d NM, alt=%d ft, speed=%d kts",
|
||||||
Text, point.noccupied, point.heading, point.leg, point.altitude, point.speed)
|
point.type, point.noccupied, point.heading, point.leg, point.altitude, point.speed)
|
||||||
|
|
||||||
return text
|
return text
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Update marker of the patrol point.
|
||||||
|
-- @param #AIRWING.PatrolData point Patrol point table.
|
||||||
|
function AIRWING.UpdatePatrolPointMarker(point)
|
||||||
|
|
||||||
|
local text=string.format("%s Occupied=%d\nheading=%03d, leg=%d NM, alt=%d ft, speed=%d kts",
|
||||||
|
point.type, point.noccupied, point.heading, point.leg, point.altitude, point.speed)
|
||||||
|
|
||||||
|
point.marker:UpdateText(text, 1)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
--- Create a new generic patrol point.
|
--- Create a new generic patrol point.
|
||||||
-- @param #AIRWING self
|
-- @param #AIRWING self
|
||||||
|
-- @param #string Type Patrol point type, e.g. "CAP" or "AWACS". Default "Unknown".
|
||||||
-- @param Core.Point#COORDINATE Coordinate Coordinate of the patrol point. Default 10-15 NM away from the location of the airwing.
|
-- @param Core.Point#COORDINATE Coordinate Coordinate of the patrol point. Default 10-15 NM away from the location of the airwing.
|
||||||
|
-- @param #number Altitude Orbit altitude in feet. Default random between Angels 10 and 20.
|
||||||
-- @param #number Heading Heading in degrees. Default random (0, 360] degrees.
|
-- @param #number Heading Heading in degrees. Default random (0, 360] degrees.
|
||||||
-- @param #number LegLength Length of race-track orbit in NM. Default 15 NM.
|
-- @param #number LegLength Length of race-track orbit in NM. Default 15 NM.
|
||||||
-- @param #number Altitude Orbit altitude in feet. Default random between Angels 10 and 20.
|
|
||||||
-- @param #number Speed Orbit speed in knots. Default 350 knots.
|
-- @param #number Speed Orbit speed in knots. Default 350 knots.
|
||||||
-- @return #AIRWING.PatrolData Patrol point table.
|
-- @return #AIRWING.PatrolData Patrol point table.
|
||||||
function AIRWING:NewPatrolPoint(Coordinate, Heading, LegLength, Altitude, Speed)
|
function AIRWING:NewPatrolPoint(Type, Coordinate, Altitude, Speed, Heading, LegLength)
|
||||||
|
|
||||||
local patrolpoint={} --#AIRWING.PatrolData
|
local patrolpoint={} --#AIRWING.PatrolData
|
||||||
|
patrolpoint.type=Type or "Unknown"
|
||||||
patrolpoint.coord=Coordinate or self:GetCoordinate():Translate(UTILS.NMToMeters(math.random(10, 15)), math.random(360))
|
patrolpoint.coord=Coordinate or self:GetCoordinate():Translate(UTILS.NMToMeters(math.random(10, 15)), math.random(360))
|
||||||
patrolpoint.heading=Heading or math.random(360)
|
patrolpoint.heading=Heading or math.random(360)
|
||||||
patrolpoint.leg=LegLength or 15
|
patrolpoint.leg=LegLength or 15
|
||||||
patrolpoint.altitude=Altitude or math.random(10,20)*1000
|
patrolpoint.altitude=Altitude or math.random(10,20)*1000
|
||||||
patrolpoint.speed=Speed or 350
|
patrolpoint.speed=Speed or 350
|
||||||
patrolpoint.noccupied=0
|
patrolpoint.noccupied=0
|
||||||
patrolpoint.marker=MARKER:New(Coordinate, self:_PatrolPointMarkerText(patrolpoint, "New")):ToAll()
|
patrolpoint.marker=MARKER:New(Coordinate, "New Patrol Point"):ToAll()
|
||||||
|
|
||||||
|
AIRWING.UpdatePatrolPointMarker(patrolpoint)
|
||||||
|
|
||||||
return patrolpoint
|
return patrolpoint
|
||||||
end
|
end
|
||||||
@@ -605,19 +622,16 @@ end
|
|||||||
--- Add a patrol Point for CAP missions.
|
--- Add a patrol Point for CAP missions.
|
||||||
-- @param #AIRWING self
|
-- @param #AIRWING self
|
||||||
-- @param Core.Point#COORDINATE Coordinate Coordinate of the patrol point.
|
-- @param Core.Point#COORDINATE Coordinate Coordinate of the patrol point.
|
||||||
-- @param #number Heading Heading in degrees.
|
|
||||||
-- @param #number LegLength Length of race-track orbit in NM.
|
|
||||||
-- @param #number Altitude Orbit altitude in feet.
|
-- @param #number Altitude Orbit altitude in feet.
|
||||||
-- @param #number Speed Orbit speed in knots.
|
-- @param #number Speed Orbit speed in knots.
|
||||||
|
-- @param #number Heading Heading in degrees.
|
||||||
|
-- @param #number LegLength Length of race-track orbit in NM.
|
||||||
-- @return #AIRWING self
|
-- @return #AIRWING self
|
||||||
function AIRWING:AddPatrolPointCAP(Coordinate, Heading, LegLength, Altitude, Speed)
|
function AIRWING:AddPatrolPointCAP(Coordinate, Altitude, Speed, Heading, LegLength)
|
||||||
|
|
||||||
local cappoint=self:NewPatrolPoint(Coordinate, Heading, LegLength, Altitude, Speed)
|
local patrolpoint=self:NewPatrolPoint("CAP", Coordinate, Altitude, Speed, Heading, LegLength)
|
||||||
|
|
||||||
local text=self:_PatrolPointMarkerText(cappoint, "CAP")
|
|
||||||
cappoint.marker:UpdateText(text, 1)
|
|
||||||
|
|
||||||
table.insert(self.pointsCAP, cappoint)
|
table.insert(self.pointsCAP, patrolpoint)
|
||||||
|
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
@@ -625,19 +639,16 @@ end
|
|||||||
--- Add a patrol Point for TANKER missions.
|
--- Add a patrol Point for TANKER missions.
|
||||||
-- @param #AIRWING self
|
-- @param #AIRWING self
|
||||||
-- @param Core.Point#COORDINATE Coordinate Coordinate of the patrol point.
|
-- @param Core.Point#COORDINATE Coordinate Coordinate of the patrol point.
|
||||||
-- @param #number Heading Heading in degrees.
|
|
||||||
-- @param #number LegLength Length of race-track orbit in NM.
|
|
||||||
-- @param #number Altitude Orbit altitude in feet.
|
-- @param #number Altitude Orbit altitude in feet.
|
||||||
-- @param #number Speed Orbit speed in knots.
|
-- @param #number Speed Orbit speed in knots.
|
||||||
|
-- @param #number Heading Heading in degrees.
|
||||||
|
-- @param #number LegLength Length of race-track orbit in NM.
|
||||||
-- @return #AIRWING self
|
-- @return #AIRWING self
|
||||||
function AIRWING:AddPatrolPointTANKER(Coordinate, Heading, LegLength, Altitude, Speed)
|
function AIRWING:AddPatrolPointTANKER(Coordinate, Altitude, Speed, Heading, LegLength)
|
||||||
|
|
||||||
local cappoint=self:NewPatrolPoint(Coordinate, Heading, LegLength, Altitude, Speed)
|
local patrolpoint=self:NewPatrolPoint("Tanker", Coordinate, Altitude, Speed, Heading, LegLength)
|
||||||
|
|
||||||
local text=self:_PatrolPointMarkerText(cappoint, "Tanker")
|
table.insert(self.pointsTANKER, patrolpoint)
|
||||||
cappoint.marker:UpdateText(text, 1)
|
|
||||||
|
|
||||||
table.insert(self.pointsTANKER, cappoint)
|
|
||||||
|
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
@@ -645,19 +656,16 @@ end
|
|||||||
--- Add a patrol Point for AWACS missions.
|
--- Add a patrol Point for AWACS missions.
|
||||||
-- @param #AIRWING self
|
-- @param #AIRWING self
|
||||||
-- @param Core.Point#COORDINATE Coordinate Coordinate of the patrol point.
|
-- @param Core.Point#COORDINATE Coordinate Coordinate of the patrol point.
|
||||||
-- @param #number Heading Heading in degrees.
|
|
||||||
-- @param #number LegLength Length of race-track orbit in NM.
|
|
||||||
-- @param #number Altitude Orbit altitude in feet.
|
-- @param #number Altitude Orbit altitude in feet.
|
||||||
-- @param #number Speed Orbit speed in knots.
|
-- @param #number Speed Orbit speed in knots.
|
||||||
|
-- @param #number Heading Heading in degrees.
|
||||||
|
-- @param #number LegLength Length of race-track orbit in NM.
|
||||||
-- @return #AIRWING self
|
-- @return #AIRWING self
|
||||||
function AIRWING:AddPatrolPointAWACS(Coordinate, Heading, LegLength, Altitude, Speed)
|
function AIRWING:AddPatrolPointAWACS(Coordinate, Altitude, Speed, Heading, LegLength)
|
||||||
|
|
||||||
local cappoint=self:NewPatrolPoint(Coordinate, Heading, LegLength, Altitude, Speed)
|
local patrolpoint=self:NewPatrolPoint("AWACS", Coordinate, Altitude, Speed, Heading, LegLength)
|
||||||
|
|
||||||
local text=self:_PatrolPointMarkerText(cappoint, "AWACS")
|
table.insert(self.pointsAWACS, patrolpoint)
|
||||||
cappoint.marker:UpdateText(text, 1)
|
|
||||||
|
|
||||||
table.insert(self.pointsAWACS, cappoint)
|
|
||||||
|
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
@@ -850,12 +858,14 @@ function AIRWING:CheckCAP()
|
|||||||
|
|
||||||
local patrol=self:_GetPatrolData(self.pointsCAP)
|
local patrol=self:_GetPatrolData(self.pointsCAP)
|
||||||
|
|
||||||
local missionCAP=AUFTRAG:NewPATROL(patrol.coord, patrol.speed, patrol.heading, patrol.leg, patrol.altitude)
|
local missionCAP=AUFTRAG:NewPATROL(patrol.coord, patrol.altitude, patrol.speed, patrol.heading, patrol.leg)
|
||||||
|
|
||||||
missionCAP.patroldata=patrol
|
missionCAP.patroldata=patrol
|
||||||
|
|
||||||
patrol.noccupied=patrol.noccupied+1
|
patrol.noccupied=patrol.noccupied+1
|
||||||
|
|
||||||
|
AIRWING.UpdatePatrolPointMarker(patrol)
|
||||||
|
|
||||||
self:AddMission(missionCAP)
|
self:AddMission(missionCAP)
|
||||||
|
|
||||||
end
|
end
|
||||||
@@ -890,14 +900,14 @@ function AIRWING:CheckTANKER()
|
|||||||
|
|
||||||
local patrol=self:_GetPatrolData(self.pointsTANKER)
|
local patrol=self:_GetPatrolData(self.pointsTANKER)
|
||||||
|
|
||||||
patrol.coord:MarkToAll("Patrol point boom")
|
local mission=AUFTRAG:NewTANKER(patrol.coord, patrol.altitude, patrol.speed, patrol.heading, patrol.leg, 0)
|
||||||
|
|
||||||
local mission=AUFTRAG:NewTANKER(patrol.coord, patrol.speed, patrol.heading, patrol.leg, patrol.altitude, 0)
|
|
||||||
|
|
||||||
mission.patroldata=patrol
|
mission.patroldata=patrol
|
||||||
|
|
||||||
patrol.noccupied=patrol.noccupied+1
|
patrol.noccupied=patrol.noccupied+1
|
||||||
|
|
||||||
|
AIRWING.UpdatePatrolPointMarker(patrol)
|
||||||
|
|
||||||
self:AddMission(mission)
|
self:AddMission(mission)
|
||||||
|
|
||||||
end
|
end
|
||||||
@@ -906,14 +916,14 @@ function AIRWING:CheckTANKER()
|
|||||||
|
|
||||||
local patrol=self:_GetPatrolData(self.pointsTANKER)
|
local patrol=self:_GetPatrolData(self.pointsTANKER)
|
||||||
|
|
||||||
patrol.coord:MarkToAll("Patrol point probe")
|
local mission=AUFTRAG:NewTANKER(patrol.coord, patrol.altitude, patrol.speed, patrol.heading, patrol.leg, 1)
|
||||||
|
|
||||||
local mission=AUFTRAG:NewTANKER(patrol.coord, patrol.speed, patrol.heading, patrol.leg, patrol.altitude, 1)
|
|
||||||
|
|
||||||
mission.patroldata=patrol
|
mission.patroldata=patrol
|
||||||
|
|
||||||
patrol.noccupied=patrol.noccupied+1
|
patrol.noccupied=patrol.noccupied+1
|
||||||
|
|
||||||
|
AIRWING.UpdatePatrolPointMarker(patrol)
|
||||||
|
|
||||||
self:AddMission(mission)
|
self:AddMission(mission)
|
||||||
|
|
||||||
end
|
end
|
||||||
@@ -932,12 +942,14 @@ function AIRWING:CheckAWACS()
|
|||||||
|
|
||||||
local patrol=self:_GetPatrolData(self.pointsAWACS)
|
local patrol=self:_GetPatrolData(self.pointsAWACS)
|
||||||
|
|
||||||
local mission=AUFTRAG:NewAWACS(patrol.coord, patrol.speed, patrol.heading, patrol.leg, patrol.altitude)
|
local mission=AUFTRAG:NewAWACS(patrol.coord, patrol.altitude, patrol.speed, patrol.heading, patrol.leg)
|
||||||
|
|
||||||
mission.patroldata=patrol
|
mission.patroldata=patrol
|
||||||
|
|
||||||
patrol.noccupied=patrol.noccupied+1
|
patrol.noccupied=patrol.noccupied+1
|
||||||
|
|
||||||
|
AIRWING.UpdatePatrolPointMarker(patrol)
|
||||||
|
|
||||||
self:AddMission(mission)
|
self:AddMission(mission)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -79,6 +79,7 @@
|
|||||||
-- @field #number requestID The ID of the queued warehouse request. Necessary to cancel the request if the mission was cancelled before the request is processed.
|
-- @field #number requestID The ID of the queued warehouse request. Necessary to cancel the request if the mission was cancelled before the request is processed.
|
||||||
-- @field #boolean cancelContactLost If true, cancel mission if the contact is lost.
|
-- @field #boolean cancelContactLost If true, cancel mission if the contact is lost.
|
||||||
-- @field #table squadrons User specifed airwing squadrons assigned for this mission. Only these will be considered for the job!
|
-- @field #table squadrons User specifed airwing squadrons assigned for this mission. Only these will be considered for the job!
|
||||||
|
-- @field Ops.AirWing#AIRWING.PatrolData patroldata Patrol data.
|
||||||
--
|
--
|
||||||
-- @field #string missionTask Mission task. See `ENUMS.MissionTask`.
|
-- @field #string missionTask Mission task. See `ENUMS.MissionTask`.
|
||||||
-- @field #number missionAltitude Mission altitude in meters.
|
-- @field #number missionAltitude Mission altitude in meters.
|
||||||
@@ -523,7 +524,7 @@ end
|
|||||||
function AUFTRAG:NewORBIT_RACETRACK(Coordinate, Altitude, Speed, Heading, Leg)
|
function AUFTRAG:NewORBIT_RACETRACK(Coordinate, Altitude, Speed, Heading, Leg)
|
||||||
|
|
||||||
Heading = Heading or math.random(360)
|
Heading = Heading or math.random(360)
|
||||||
Leg = UTILS.NMToMeters(Leg or 10)
|
Leg = Leg or 10
|
||||||
|
|
||||||
local mission=AUFTRAG:NewORBIT(Coordinate, Altitude, Speed, Heading, Leg)
|
local mission=AUFTRAG:NewORBIT(Coordinate, Altitude, Speed, Heading, Leg)
|
||||||
|
|
||||||
@@ -532,16 +533,16 @@ end
|
|||||||
|
|
||||||
--- Create a PATROL mission.
|
--- Create a PATROL mission.
|
||||||
-- @param #AUFTRAG self
|
-- @param #AUFTRAG self
|
||||||
-- @param Core.Point#COORDINATE Coordinate Where to orbit. Altitude is also taken from the coordinate.
|
-- @param Core.Point#COORDINATE Coordinate Where to orbit.
|
||||||
|
-- @param #number Altitude Orbit altitude in feet. Default is y component of `Coordinate`.
|
||||||
-- @param #number Speed Orbit speed in knots. Default 350 kts.
|
-- @param #number Speed Orbit speed in knots. Default 350 kts.
|
||||||
-- @param #number Heading Heading of race-track pattern in degrees. Default random in [0, 360) degrees.
|
-- @param #number Heading Heading of race-track pattern in degrees. Default random in [0, 360) degrees.
|
||||||
-- @param #number Leg Length of race-track in NM. Default 10 NM.
|
-- @param #number Leg Length of race-track in NM. Default 10 NM.
|
||||||
-- @param #number Altitude Orbit altitude in feet.
|
|
||||||
-- @return #AUFTRAG self
|
-- @return #AUFTRAG self
|
||||||
function AUFTRAG:NewPATROL(Coordinate, Speed, Heading, Leg, Altitude)
|
function AUFTRAG:NewPATROL(Coordinate, Altitude, Speed, Heading, Leg)
|
||||||
|
|
||||||
-- Create ORBIT first.
|
-- Create ORBIT first.
|
||||||
local mission=self:NewORBIT_RACETRACK(Coordinate, Altitude, Speed, Heading, Leg)
|
local mission=AUFTRAG:NewORBIT_RACETRACK(Coordinate, Altitude, Speed, Heading, Leg)
|
||||||
|
|
||||||
-- Mission type PATROL.
|
-- Mission type PATROL.
|
||||||
mission.type=AUFTRAG.Type.PATROL
|
mission.type=AUFTRAG.Type.PATROL
|
||||||
@@ -557,17 +558,17 @@ end
|
|||||||
|
|
||||||
--- Create a TANKER mission.
|
--- Create a TANKER mission.
|
||||||
-- @param #AUFTRAG self
|
-- @param #AUFTRAG self
|
||||||
-- @param Core.Point#COORDINATE Coordinate Where to orbit. Altitude is also taken from the coordinate.
|
-- @param Core.Point#COORDINATE Coordinate Where to orbit.
|
||||||
|
-- @param #number Altitude Orbit altitude in feet. Default is y component of `Coordinate`.
|
||||||
-- @param #number Speed Orbit speed in knots. Default 350 kts.
|
-- @param #number Speed Orbit speed in knots. Default 350 kts.
|
||||||
-- @param #number Heading Heading of race-track pattern in degrees. Default 270 (East to West).
|
-- @param #number Heading Heading of race-track pattern in degrees. Default 270 (East to West).
|
||||||
-- @param #number Leg Length of race-track in NM. Default 10 NM.
|
-- @param #number Leg Length of race-track in NM. Default 10 NM.
|
||||||
-- @param #number Altitude Orbit altitude in feet.
|
|
||||||
-- @param #number RefuelSystem Refueling system.
|
-- @param #number RefuelSystem Refueling system.
|
||||||
-- @return #AUFTRAG self
|
-- @return #AUFTRAG self
|
||||||
function AUFTRAG:NewTANKER(Coordinate, Speed, Heading, Leg, Altitude, RefuelSystem)
|
function AUFTRAG:NewTANKER(Coordinate, Altitude, Speed, Heading, Leg, RefuelSystem)
|
||||||
|
|
||||||
-- Create ORBIT first.
|
-- Create ORBIT first.
|
||||||
local mission=self:NewORBIT_RACETRACK(Coordinate, Altitude, Speed, Heading, Leg)
|
local mission=AUFTRAG:NewORBIT_RACETRACK(Coordinate, Altitude, Speed, Heading, Leg)
|
||||||
|
|
||||||
-- Mission type PATROL.
|
-- Mission type PATROL.
|
||||||
mission.type=AUFTRAG.Type.TANKER
|
mission.type=AUFTRAG.Type.TANKER
|
||||||
@@ -588,16 +589,16 @@ end
|
|||||||
|
|
||||||
--- Create a AWACS mission.
|
--- Create a AWACS mission.
|
||||||
-- @param #AUFTRAG self
|
-- @param #AUFTRAG self
|
||||||
-- @param Core.Point#COORDINATE Coordinate Where to orbit. Altitude is also taken from the coordinate.
|
-- @param Core.Point#COORDINATE Coordinate Where to orbit. Altitude is also taken from the coordinate.
|
||||||
|
-- @param #number Altitude Orbit altitude in feet. Default is y component of `Coordinate`.
|
||||||
-- @param #number Speed Orbit speed in knots. Default 350 kts.
|
-- @param #number Speed Orbit speed in knots. Default 350 kts.
|
||||||
-- @param #number Heading Heading of race-track pattern in degrees. Default 270 (East to West).
|
-- @param #number Heading Heading of race-track pattern in degrees. Default 270 (East to West).
|
||||||
-- @param #number Leg Length of race-track in NM. Default 10 NM.
|
-- @param #number Leg Length of race-track in NM. Default 10 NM.
|
||||||
-- @param #number Altitude Orbit altitude in feet.
|
|
||||||
-- @return #AUFTRAG self
|
-- @return #AUFTRAG self
|
||||||
function AUFTRAG:NewAWACS(Coordinate, Speed, Heading, Leg, Altitude)
|
function AUFTRAG:NewAWACS(Coordinate, Altitude, Speed, Heading, Leg)
|
||||||
|
|
||||||
-- Create ORBIT first.
|
-- Create ORBIT first.
|
||||||
local mission=self:NewORBIT_RACETRACK(Coordinate, Altitude, Speed, Heading, Leg)
|
local mission=AUFTRAG:NewORBIT_RACETRACK(Coordinate, Altitude, Speed, Heading, Leg)
|
||||||
|
|
||||||
-- Mission type PATROL.
|
-- Mission type PATROL.
|
||||||
mission.type=AUFTRAG.Type.AWACS
|
mission.type=AUFTRAG.Type.AWACS
|
||||||
@@ -657,7 +658,7 @@ function AUFTRAG:NewCAP(ZoneCAP, Altitude, Speed, Coordinate, Heading, Leg, Targ
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Create ORBIT first.
|
-- Create ORBIT first.
|
||||||
local mission=self:NewORBIT(Coordinate or ZoneCAP:GetCoordinate(), Altitude or 10000, Speed, Heading, Leg)
|
local mission=AUFTRAG:NewORBIT(Coordinate or ZoneCAP:GetCoordinate(), Altitude or 10000, Speed, Heading, Leg)
|
||||||
|
|
||||||
-- Mission type CAP.
|
-- Mission type CAP.
|
||||||
mission.type=AUFTRAG.Type.CAP
|
mission.type=AUFTRAG.Type.CAP
|
||||||
@@ -697,7 +698,7 @@ function AUFTRAG:NewCAS(ZoneCAS, Altitude, Speed, Coordinate, Heading, Leg, Targ
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Create ORBIT first.
|
-- Create ORBIT first.
|
||||||
local mission=self:NewORBIT(Coordinate or ZoneCAS:GetCoordinate(), Altitude or 10000, Speed, Heading, Leg)
|
local mission=AUFTRAG:NewORBIT(Coordinate or ZoneCAS:GetCoordinate(), Altitude or 10000, Speed, Heading, Leg)
|
||||||
|
|
||||||
-- Mission type CAS.
|
-- Mission type CAS.
|
||||||
mission.type=AUFTRAG.Type.CAS
|
mission.type=AUFTRAG.Type.CAS
|
||||||
@@ -2054,6 +2055,7 @@ function AUFTRAG:onafterDone(From, Event, To)
|
|||||||
|
|
||||||
-- Set time stamp.
|
-- Set time stamp.
|
||||||
self.Tover=timer.getAbsTime()
|
self.Tover=timer.getAbsTime()
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4012,6 +4012,12 @@ function FLIGHTGROUP:onafterMissionDone(From, Event, To, Mission)
|
|||||||
if wpidx then
|
if wpidx then
|
||||||
self:RemoveWaypoint(wpidx)
|
self:RemoveWaypoint(wpidx)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Decrease patrol data.
|
||||||
|
if Mission.patroldata then
|
||||||
|
Mission.patroldata.noccupied=Mission.patroldata.noccupied-1
|
||||||
|
AIRWING.UpdatePatrolPointMarker(Mission.patroldata)
|
||||||
|
end
|
||||||
|
|
||||||
-- TODO: reset mission specific parameters like radio, ROE etc.
|
-- TODO: reset mission specific parameters like radio, ROE etc.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user