mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
#OPSGROUP, CONTROLLER
* AUFTRAG Patrol Race Track will use ASL not AGL as default
This commit is contained in:
parent
d7788a2a2e
commit
3c252f01be
@ -4481,7 +4481,7 @@ function OPSGROUP:_UpdateTask(Task, Mission)
|
|||||||
Task.dcstask.params.TrackFormation = self.TrackFormation
|
Task.dcstask.params.TrackFormation = self.TrackFormation
|
||||||
--]]
|
--]]
|
||||||
local aircraft = self:GetGroup()
|
local aircraft = self:GetGroup()
|
||||||
aircraft:PatrolRaceTrack(Task.dcstask.params.TrackPoint1,Task.dcstask.params.TrackPoint2,Task.dcstask.params.TrackAltitude,Task.dcstask.params.TrackSpeed,Task.dcstask.params.TrackFormation,1)
|
aircraft:PatrolRaceTrack(Task.dcstask.params.TrackPoint1,Task.dcstask.params.TrackPoint2,Task.dcstask.params.TrackAltitude,Task.dcstask.params.TrackSpeed,Task.dcstask.params.TrackFormation,false,1)
|
||||||
end
|
end
|
||||||
|
|
||||||
elseif Task.dcstask.id==AUFTRAG.SpecialTask.HOVER then
|
elseif Task.dcstask.id==AUFTRAG.SpecialTask.HOVER then
|
||||||
|
|||||||
@ -5337,9 +5337,10 @@ end
|
|||||||
-- @param #number Altitude (Optional) Altitude in meters. Defaults to the altitude of the coordinate.
|
-- @param #number Altitude (Optional) Altitude in meters. Defaults to the altitude of the coordinate.
|
||||||
-- @param #number Speed (Optional) Speed in kph. Defaults to 500 kph.
|
-- @param #number Speed (Optional) Speed in kph. Defaults to 500 kph.
|
||||||
-- @param #number Formation (Optional) Formation to take, e.g. ENUMS.Formation.FixedWing.Trail.Close, also see [Hoggit Wiki](https://wiki.hoggitworld.com/view/DCS_option_formation).
|
-- @param #number Formation (Optional) Formation to take, e.g. ENUMS.Formation.FixedWing.Trail.Close, also see [Hoggit Wiki](https://wiki.hoggitworld.com/view/DCS_option_formation).
|
||||||
|
-- @param #boolean AGL (Optional) If true, set altitude to above ground level (AGL), not above sea level (ASL).
|
||||||
-- @param #number Delay (Optional) Set the task after delay seconds only.
|
-- @param #number Delay (Optional) Set the task after delay seconds only.
|
||||||
-- @return #CONTROLLABLE self
|
-- @return #CONTROLLABLE self
|
||||||
function CONTROLLABLE:PatrolRaceTrack(Point1, Point2, Altitude, Speed, Formation, Delay)
|
function CONTROLLABLE:PatrolRaceTrack(Point1, Point2, Altitude, Speed, Formation, AGL, Delay)
|
||||||
|
|
||||||
local PatrolGroup = self -- Wrapper.Group#GROUP
|
local PatrolGroup = self -- Wrapper.Group#GROUP
|
||||||
|
|
||||||
@ -5361,8 +5362,10 @@ function CONTROLLABLE:PatrolRaceTrack(Point1, Point2, Altitude, Speed, Formation
|
|||||||
|
|
||||||
-- Calculate the new Route
|
-- Calculate the new Route
|
||||||
if Altitude then
|
if Altitude then
|
||||||
FromCoord:SetAltitude(Altitude)
|
local asl = true
|
||||||
ToCoord:SetAltitude(Altitude)
|
if AGL then asl = false end
|
||||||
|
FromCoord:SetAltitude(Altitude, asl)
|
||||||
|
ToCoord:SetAltitude(Altitude, asl)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Create a "air waypoint", which is a "point" structure that can be given as a parameter to a Task
|
-- Create a "air waypoint", which is a "point" structure that can be given as a parameter to a Task
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user