42 lines
1.1 KiB
C#
42 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Plane.Copters;
|
|
|
|
namespace Plane.FormationCreator.Formation
|
|
{
|
|
public partial class FlightTaskSingleCopterInfo
|
|
{
|
|
public static FlightTaskSingleCopterInfo CreateForTakeOffTask(ICopter copter, float targetAlt)
|
|
{
|
|
var info = new FlightTaskSingleCopterInfo(copter)
|
|
{
|
|
TargetAlt = targetAlt,
|
|
TargetLat = copter.Latitude,
|
|
TargetLng=copter.Longitude
|
|
};
|
|
return info;
|
|
}
|
|
|
|
public static FlightTaskSingleCopterInfo CreateForTakeOffTask(ICopter copter, int waitTime)
|
|
{
|
|
var info = new FlightTaskSingleCopterInfo(copter)
|
|
{
|
|
TakeOffWaitTime = (ushort)waitTime
|
|
};
|
|
return info;
|
|
}
|
|
|
|
|
|
//起飞等待时间
|
|
private ushort _TakeOffWaitTime = 1;
|
|
public ushort TakeOffWaitTime
|
|
{
|
|
get { return _TakeOffWaitTime; }
|
|
set { Set(nameof(TakeOffWaitTime), ref _TakeOffWaitTime, value); }
|
|
}
|
|
}
|
|
}
|