diff --git a/PlaneGcsSdk.Contract_Shared/Copters/ICopterActionsSharedByCopterManager.cs b/PlaneGcsSdk.Contract_Shared/Copters/ICopterActionsSharedByCopterManager.cs
index 2f560aa..5805718 100644
--- a/PlaneGcsSdk.Contract_Shared/Copters/ICopterActionsSharedByCopterManager.cs
+++ b/PlaneGcsSdk.Contract_Shared/Copters/ICopterActionsSharedByCopterManager.cs
@@ -129,6 +129,7 @@ namespace Plane.Copters
Task InjectGpsDataAsync(byte[] data, ushort length);
+ Task MissionStartAsync(int hour_utc, int minute_utc, int second_utc, double Missionlng, double Missionlat);
}
diff --git a/PlaneGcsSdk_Shared/CopterManagement/SingleCopterManager.cs b/PlaneGcsSdk_Shared/CopterManagement/SingleCopterManager.cs
index 10cce52..1b382b0 100644
--- a/PlaneGcsSdk_Shared/CopterManagement/SingleCopterManager.cs
+++ b/PlaneGcsSdk_Shared/CopterManagement/SingleCopterManager.cs
@@ -147,6 +147,10 @@ namespace Plane.CopterManagement
{
return Copter.StartEmergencyHoverAsync();
}
+ public Task MissionStartAsync(int hour_utc, int minute_utc, int second_utc, double Missionlng, double Missionlat)
+ {
+ return Copter.MissionStartAsync(hour_utc, minute_utc, second_utc, Missionlng, Missionlat);
+ }
public void StartMobileControl(int? millisecondsInterval = default(int?))
{
diff --git a/PlaneGcsSdk_Shared/Copters/EmptyCopter.cs b/PlaneGcsSdk_Shared/Copters/EmptyCopter.cs
index 1f7c642..6af04e8 100644
--- a/PlaneGcsSdk_Shared/Copters/EmptyCopter.cs
+++ b/PlaneGcsSdk_Shared/Copters/EmptyCopter.cs
@@ -93,7 +93,10 @@ namespace Plane.Copters
{
return TaskUtils.CompletedTask;
}
-
+ public Task MissionStartAsync(int hour_utc, int minute_utc, int second_utc, double Missionlng, double Missionlat)
+ {
+ return TaskUtils.CompletedTask;
+ }
public Task UnlockAsync()
{
return TaskUtils.CompletedTask;
diff --git a/PlaneGcsSdk_Shared/Copters/FakeCopter.cs b/PlaneGcsSdk_Shared/Copters/FakeCopter.cs
index d693bbd..203b91c 100644
--- a/PlaneGcsSdk_Shared/Copters/FakeCopter.cs
+++ b/PlaneGcsSdk_Shared/Copters/FakeCopter.cs
@@ -354,6 +354,11 @@ namespace Plane.Copters
_takeOffTargetAltitude = (int)alt;
await TakeOffAsync().ConfigureAwait(false);
}
+ public Task MissionStartAsync(int hour_utc, int minute_utc, int second_utc, double Missionlng, double Missionlat)
+ {
+ return TaskUtils.CompletedTask;
+ }
+
public async Task UnlockAsync()
{
diff --git a/PlaneGcsSdk_Shared/Copters/PLCopter.cs b/PlaneGcsSdk_Shared/Copters/PLCopter.cs
index 2794b65..ea28c49 100644
--- a/PlaneGcsSdk_Shared/Copters/PLCopter.cs
+++ b/PlaneGcsSdk_Shared/Copters/PLCopter.cs
@@ -84,7 +84,13 @@ namespace Plane.Copters
await _internalCopter.DoARMAsync(false).ConfigureAwait(false);
}
}
-
+ public async Task MissionStartAsync(int hour_utc, int minute_utc, int second_utc, double Missionlng, double Missionlat)
+ {
+ if (IsUnlocked)
+ {
+ await _internalCopter.DoMissionStartAsync(hour_utc, minute_utc, second_utc, Missionlng, Missionlat).ConfigureAwait(false);
+ }
+ }
public override async Task SetChannelsAsync()
{
await _internalCopter.SetChannelsAsync(
diff --git a/PlaneGcsSdk_Shared/Copters/PlaneCopter.cs b/PlaneGcsSdk_Shared/Copters/PlaneCopter.cs
index dd92578..e48a757 100644
--- a/PlaneGcsSdk_Shared/Copters/PlaneCopter.cs
+++ b/PlaneGcsSdk_Shared/Copters/PlaneCopter.cs
@@ -607,7 +607,11 @@ namespace Plane.Copters
/// Takeoff from ground / hand |Minimum pitch (if airspeed sensor present), desired pitch without sensor| Empty| Empty| Yaw angle (if magnetometer present), ignored without magnetometer| Latitude| Longitude| Altitude|
return await DoCommandAsync(MAVLink.MAV_CMD.TAKEOFF, 0, 0, 0, -1, 0, 0, 15);
}
-
+ public async Task DoMissionStartAsync(int hour_utc, int minute_utc, int second_utc, double Missionlng, double Missionlat)
+ {
+ /// Takeoff from ground / hand |Minimum pitch (if airspeed sensor present), desired pitch without sensor| Empty| Empty| Yaw angle (if magnetometer present), ignored without magnetometer| Latitude| Longitude| Altitude|
+ return await DoCommandAsync(MAVLink.MAV_CMD.MISSION_START, hour_utc, minute_utc, second_utc, (float)Missionlng, (float)Missionlat, 0, 0);
+ }
public async Task DoCommandAsync(MAVLink.MAV_CMD actionid, float p1, float p2, float p3, float p4, float p5, float p6, float p7)
{
giveComport = true;