# FG improvements

This commit is contained in:
Applevangelist 2022-12-31 17:54:04 +01:00
parent ecf4f14222
commit b811aa09a8
3 changed files with 13 additions and 3 deletions

View File

@ -1308,7 +1308,7 @@ function AUFTRAG:NewCAP(ZoneCAP, Altitude, Speed, Coordinate, Heading, Leg, Targ
end end
-- Create ORBIT first. -- Create ORBIT first.
local mission=AUFTRAG:NewORBIT(Coordinate or ZoneCAP:GetCoordinate(), Altitude or 10000, Speed, Heading, Leg) local mission=AUFTRAG:NewORBIT(Coordinate or ZoneCAP:GetCoordinate(), Altitude or 10000, Speed or 350, Heading, Leg)
-- Mission type CAP. -- Mission type CAP.
mission.type=AUFTRAG.Type.CAP mission.type=AUFTRAG.Type.CAP
@ -1322,6 +1322,7 @@ function AUFTRAG:NewCAP(ZoneCAP, Altitude, Speed, Coordinate, Heading, Leg, Targ
mission.missionTask=ENUMS.MissionTask.CAP mission.missionTask=ENUMS.MissionTask.CAP
mission.optionROE=ENUMS.ROE.OpenFire mission.optionROE=ENUMS.ROE.OpenFire
mission.optionROT=ENUMS.ROT.EvadeFire mission.optionROT=ENUMS.ROT.EvadeFire
mission.missionSpeed = UTILS.KnotsToAltKIAS(Speed,Altitude)
mission.categories={AUFTRAG.Category.AIRCRAFT} mission.categories={AUFTRAG.Category.AIRCRAFT}

View File

@ -3775,7 +3775,14 @@ function FLIGHTGROUP:AddWaypoint(Coordinate, Speed, AfterWaypointWithID, Altitud
local wpnumber=self:GetWaypointIndexAfterID(AfterWaypointWithID) local wpnumber=self:GetWaypointIndexAfterID(AfterWaypointWithID)
-- Speed in knots. -- Speed in knots.
Speed=Speed or self:GetSpeedCruise() if not Speed or Speed < 10 then
local mission = self:GetMissionCurrent() -- Ops.Auftrag#AUFTRAG
local speed = mission.missionSpeed
Speed = speed or self:GetSpeedCruise()
end
--Speed=Speed or self:GetSpeedCruise()
-- Alt type default is barometric (ASL). For helos we use radar (AGL). -- Alt type default is barometric (ASL). For helos we use radar (AGL).
local alttype=COORDINATE.WaypointAltType.BARO local alttype=COORDINATE.WaypointAltType.BARO

View File

@ -3213,8 +3213,10 @@ end
function OPSGROUP:GetExpectedSpeed() function OPSGROUP:GetExpectedSpeed()
if self:IsHolding() or self:Is("Rearming") or self:IsWaiting() or self:IsRetreated() then if self:IsHolding() or self:Is("Rearming") or self:IsWaiting() or self:IsRetreated() then
--env.info("GetExpectedSpeed - returning ZERO")
return 0 return 0
else else
--env.info("GetExpectedSpeed - returning self.speedWP = "..self.speedWp)
return self.speedWp or 0 return self.speedWp or 0
end end