Merge branch 'develop' into FF/Ops

This commit is contained in:
Frank 2023-01-01 20:10:28 +01:00
commit b194985827
3 changed files with 20 additions and 3 deletions

View File

@ -155,7 +155,7 @@ function TIMER:New(Function, ...)
return self
end
--- Create a new TIMER object.
--- Start TIMER object.
-- @param #TIMER self
-- @param #number Tstart Relative start time in seconds.
-- @param #number dT Interval between function calls in seconds. If not specified `nil`, the function is called only once.
@ -192,6 +192,20 @@ function TIMER:Start(Tstart, dT, Duration)
return self
end
--- Start TIMER object if a condition is met. Useful for e.g. debugging.
-- @param #TIMER self
-- @param #boolean Condition Must be true for the TIMER to start
-- @param #number Tstart Relative start time in seconds.
-- @param #number dT Interval between function calls in seconds. If not specified `nil`, the function is called only once.
-- @param #number Duration Time in seconds for how long the timer is running. If not specified `nil`, the timer runs forever or until stopped manually by the `TIMER:Stop()` function.
-- @return #TIMER self
function TIMER:StartIf(Condition,Tstart, dT, Duration)
if Condition then
self:Start(Tstart, dT, Duration)
end
return self
end
--- Stop the timer by removing the timer function.
-- @param #TIMER self
-- @param #number Delay (Optional) Delay in seconds, before the timer is stopped.

View File

@ -1310,7 +1310,7 @@ function AUFTRAG:NewCAP(ZoneCAP, Altitude, Speed, Coordinate, Heading, Leg, Targ
mission.missionTask=ENUMS.MissionTask.CAP
mission.optionROE=ENUMS.ROE.OpenFire
mission.optionROT=ENUMS.ROT.EvadeFire
mission.missionSpeed = UTILS.KnotsToAltKIAS(Speed or 350,Altitude)
mission.missionSpeed = UTILS.KnotsToKmph(UTILS.KnotsToAltKIAS(Speed or 350, Altitude))
mission.categories={AUFTRAG.Category.AIRCRAFT}

View File

@ -3777,10 +3777,13 @@ function FLIGHTGROUP:AddWaypoint(Coordinate, Speed, AfterWaypointWithID, Altitud
-- Set waypoint index.
local wpnumber=self:GetWaypointIndexAfterID(AfterWaypointWithID)
-- Speed in knots.
Speed=Speed or self:GetSpeedCruise()
-- Debug info.
self:T3(self.lid..string.format("Waypoint Speed=%.1f knots", Speed))
-- Alt type default is barometric (ASL). For helos we use radar (AGL).
local alttype=COORDINATE.WaypointAltType.BARO
if self.isHelo then