mirror of
https://github.com/FlightControl-Master/MOOSE_Demos.git
synced 2025-08-15 10:37:47 +00:00
Added mission Wrapper/Group/300-Switch-WayPoints
This commit is contained in:
parent
0036146a8a
commit
2504dd9636
@ -0,0 +1,33 @@
|
||||
---
|
||||
-- Author: FlightControl
|
||||
-- Created: 20.10.2018
|
||||
-- Contributors: kaltokri
|
||||
-- Modified: 24.02.2024
|
||||
--
|
||||
-- # Documentation:
|
||||
-- https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Wrapper.Group.html
|
||||
--
|
||||
-- # Description:
|
||||
--
|
||||
-- In this mission one Ka-50 (HeliGroup) will start from a FARP.
|
||||
-- Normally it would fly a big polygon shaped patrol around the FARP.
|
||||
-- At the end it will land back on the FARP.
|
||||
-- But in the code below we change the route dynamically.
|
||||
-- So instead of flying to waypoint 2, it will fly to the last waypoint 7.
|
||||
--
|
||||
-- # Guide:
|
||||
--
|
||||
-- 1. Start the mission and watch the Ka-50 flying around.
|
||||
|
||||
-- Get a group object of the Ka-50:
|
||||
HeliGroup = GROUP:FindByName( "Helicopter" )
|
||||
|
||||
-- Route it back to the FARP after 60 seconds.
|
||||
-- We use the SCHEDULER class to do this.
|
||||
SCHEDULER:New( nil,
|
||||
function( HeliGroup )
|
||||
local CommandRTB = HeliGroup:CommandSwitchWayPoint( 2, 7 )
|
||||
HeliGroup:SetCommand( CommandRTB )
|
||||
HeliGroup:MessageToAll("We lose fuel: RTB.", 20)
|
||||
end, { HeliGroup }, 60
|
||||
)
|
||||
BIN
Wrapper/Group/300-Switch-WayPoints/GRP-300-Switch-WayPoints.miz
Normal file
BIN
Wrapper/Group/300-Switch-WayPoints/GRP-300-Switch-WayPoints.miz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user