mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl-task-cargo-transport
# Conflicts: # Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua # Moose Mission Setup/Moose.lua
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
---
|
||||
-- Name: GRP-310 - Command StopRoute
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 25 Mar 2017
|
||||
--
|
||||
-- # Situation:
|
||||
-- A ground unit is moving.
|
||||
-- Using the command CommandStopMove it will stop moving after 10 seconds.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Observe the ground group stopping to move.
|
||||
--
|
||||
|
||||
--- @param Wrapper.Group#GROUP GroundGroup
|
||||
function StopMove( GroundGroup )
|
||||
|
||||
BASE:E("Stop")
|
||||
local Command = GroundGroup:CommandStopRoute( true )
|
||||
GroundGroup:SetCommand(Command)
|
||||
|
||||
end
|
||||
|
||||
--- @param Wrapper.Group#GROUP GroundGroup
|
||||
function StartMove( GroundGroup )
|
||||
|
||||
BASE:E("Start")
|
||||
local Command = GroundGroup:CommandStopRoute( false )
|
||||
GroundGroup:SetCommand(Command)
|
||||
|
||||
end
|
||||
|
||||
GroundGroup = GROUP:FindByName( "Ground" )
|
||||
|
||||
Scheduler = SCHEDULER:New( nil )
|
||||
ScheduleIDStop = Scheduler:Schedule(nil, StopMove, { GroundGroup }, 10, 20 )
|
||||
ScheduleIDStart = Scheduler:Schedule(nil, StartMove, { GroundGroup }, 20, 20 )
|
||||
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,45 @@
|
||||
---
|
||||
-- Name: GRP-400 - RouteReturnToAirbase
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 25 Mar 2017
|
||||
--
|
||||
-- # Situation:
|
||||
-- Three air units are flying and are commanded to return a specific airbase.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Observe the Air1 group return to Batumi after 10 seconds.
|
||||
-- 2. Observe the Air2 group returning to Kobuleti after 300 seconds. (It was planned to land at Kutaisi).
|
||||
-- 3. Observe the Air3 group returning to the home (landing) airbase after 300 seconds. (It was planned to land at Kutaisi).
|
||||
--
|
||||
|
||||
--- @param Wrapper.Group#GROUP AirGroup
|
||||
function ReturnToBatumi( AirGroup )
|
||||
BASE:E("ReturnToBatumi")
|
||||
AirGroup:RouteRTB( AIRBASE:FindByName("Batumi") )
|
||||
end
|
||||
|
||||
--- @param Wrapper.Group#GROUP AirGroup
|
||||
function ReturnToKobuleti( AirGroup )
|
||||
BASE:E("ReturnToKobuleti")
|
||||
AirGroup:RouteRTB( AIRBASE:FindByName("Kobuleti") )
|
||||
end
|
||||
|
||||
--- @param Wrapper.Group#GROUP AirGroup
|
||||
function ReturnToHome( AirGroup )
|
||||
BASE:E("ReturnToHome")
|
||||
AirGroup:RouteRTB()
|
||||
end
|
||||
|
||||
Air1Group = GROUP:FindByName( "Air1" )
|
||||
Air2Group = GROUP:FindByName( "Air2" )
|
||||
Air3Group = GROUP:FindByName( "Air3" )
|
||||
|
||||
Scheduler = SCHEDULER:New( nil )
|
||||
ScheduleIDAir1 = Scheduler:Schedule(nil, ReturnToBatumi, { Air1Group }, 10 )
|
||||
ScheduleIDAir2 = Scheduler:Schedule(nil, ReturnToKobuleti, { Air2Group }, 300 )
|
||||
ScheduleIDAir3 = Scheduler:Schedule(nil, ReturnToHome, { Air3Group }, 300 )
|
||||
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user