mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
# FG improvements
This commit is contained in:
parent
ecf4f14222
commit
b811aa09a8
@ -1308,7 +1308,7 @@ function AUFTRAG:NewCAP(ZoneCAP, Altitude, Speed, Coordinate, Heading, Leg, Targ
|
||||
end
|
||||
|
||||
-- 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=AUFTRAG.Type.CAP
|
||||
@ -1322,6 +1322,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,Altitude)
|
||||
|
||||
mission.categories={AUFTRAG.Category.AIRCRAFT}
|
||||
|
||||
|
||||
@ -3773,9 +3773,16 @@ function FLIGHTGROUP:AddWaypoint(Coordinate, Speed, AfterWaypointWithID, Altitud
|
||||
|
||||
-- Set waypoint index.
|
||||
local wpnumber=self:GetWaypointIndexAfterID(AfterWaypointWithID)
|
||||
|
||||
|
||||
-- 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).
|
||||
local alttype=COORDINATE.WaypointAltType.BARO
|
||||
|
||||
@ -3213,8 +3213,10 @@ end
|
||||
function OPSGROUP:GetExpectedSpeed()
|
||||
|
||||
if self:IsHolding() or self:Is("Rearming") or self:IsWaiting() or self:IsRetreated() then
|
||||
--env.info("GetExpectedSpeed - returning ZERO")
|
||||
return 0
|
||||
else
|
||||
--env.info("GetExpectedSpeed - returning self.speedWP = "..self.speedWp)
|
||||
return self.speedWp or 0
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user