mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
OPS
**FLIGHTGROUP** - Waypoint altitude for helos is not radar (AGL) - Increased cruise speed thresholds for helos to 110 kts and 380 kts for fixed wing
This commit is contained in:
parent
4a0040a12f
commit
1256cc3bd1
@ -2647,6 +2647,13 @@ function WAREHOUSE:SetWarehouseZone(zone)
|
||||
return self
|
||||
end
|
||||
|
||||
--- Get the warehouse zone.
|
||||
-- @param #WAREHOUSE self
|
||||
-- @return Core.Zone#ZONE The warehouse zone.
|
||||
function WAREHOUSE:GetWarehouseZone()
|
||||
return self.zone
|
||||
end
|
||||
|
||||
--- Set auto defence on. When the warehouse is under attack, all ground assets are spawned automatically and will defend the warehouse zone.
|
||||
-- @param #WAREHOUSE self
|
||||
-- @return #WAREHOUSE self
|
||||
|
||||
@ -335,11 +335,13 @@ function FLIGHTGROUP:New(group)
|
||||
self:HandleEvent(EVENTS.Kill, self.OnEventKill)
|
||||
self:HandleEvent(EVENTS.PlayerLeaveUnit, self.OnEventPlayerLeaveUnit)
|
||||
|
||||
-- Initialize group.
|
||||
self:_InitGroup()
|
||||
|
||||
-- Init waypoints.
|
||||
self:_InitWaypoints()
|
||||
|
||||
-- Initialize group.
|
||||
self:_InitGroup()
|
||||
|
||||
|
||||
-- Start the status monitoring.
|
||||
self.timerStatus=TIMER:New(self.Status, self):Start(1, 30)
|
||||
@ -3373,8 +3375,8 @@ function FLIGHTGROUP:_InitGroup(Template)
|
||||
self.isMobile=false
|
||||
end
|
||||
|
||||
-- Cruise speed limit 350 kts for fixed and 80 knots for rotary wings.
|
||||
local speedCruiseLimit=self.isHelo and UTILS.KnotsToKmph(80) or UTILS.KnotsToKmph(350)
|
||||
-- Cruise speed limit 380 kts for fixed and 110 knots for rotary wings.
|
||||
local speedCruiseLimit=self.isHelo and UTILS.KnotsToKmph(110) or UTILS.KnotsToKmph(380)
|
||||
|
||||
-- Cruise speed: 70% of max speed but within limit.
|
||||
self.speedCruise=math.min(self.speedMax*0.7, speedCruiseLimit)
|
||||
@ -3774,9 +3776,15 @@ function FLIGHTGROUP:AddWaypoint(Coordinate, Speed, AfterWaypointWithID, Altitud
|
||||
|
||||
-- Speed in knots.
|
||||
Speed=Speed or self:GetSpeedCruise()
|
||||
|
||||
-- Alt type default is barometric (ASL). For helos we use radar (AGL).
|
||||
local alttype=COORDINATE.WaypointAltType.BARO
|
||||
if self.isHelo then
|
||||
alttype=COORDINATE.WaypointAltType.RADIO
|
||||
end
|
||||
|
||||
-- Create air waypoint.
|
||||
local wp=coordinate:WaypointAir(COORDINATE.WaypointAltType.BARO, COORDINATE.WaypointType.TurningPoint, COORDINATE.WaypointAction.TurningPoint, UTILS.KnotsToKmph(Speed), true, nil, {})
|
||||
local wp=coordinate:WaypointAir(alttype, COORDINATE.WaypointType.TurningPoint, COORDINATE.WaypointAction.TurningPoint, UTILS.KnotsToKmph(Speed), true, nil, {})
|
||||
|
||||
-- Create waypoint data table.
|
||||
local waypoint=self:_CreateWaypoint(wp)
|
||||
@ -3824,7 +3832,7 @@ function FLIGHTGROUP:AddWaypointLanding(Airbase, Speed, AfterWaypointWithID, Alt
|
||||
local Coordinate=Airbase:GetCoordinate()
|
||||
|
||||
-- Create air waypoint.
|
||||
local wp=Coordinate:WaypointAir(COORDINATE.WaypointAltType.BARO,COORDINATE.WaypointType.Land, COORDINATE.WaypointAction.Landing, Speed, nil, Airbase, {}, "Landing Temp", nil)
|
||||
local wp=Coordinate:WaypointAir(COORDINATE.WaypointAltType.BARO, COORDINATE.WaypointType.Land, COORDINATE.WaypointAction.Landing, Speed, nil, Airbase, {}, "Landing Temp", nil)
|
||||
|
||||
-- Create waypoint data table.
|
||||
local waypoint=self:_CreateWaypoint(wp)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user