MissionRaw
public class MissionRaw
Enable raw missions as exposed by MAVLink.
-
Initializes a new
MissionRawplugin.Normally never created manually, but used from the
Dronehelper class instead.Declaration
Swift
public convenience init(address: String = "localhost", port: Int32 = 50051, scheduler: SchedulerType = ConcurrentDispatchQueueScheduler(qos: .background))Parameters
addressThe address of the
MavsdkServerinstance to connect toportThe port of the
MavsdkServerinstance to connect toschedulerThe scheduler to be used by
Observables -
Undocumented
See moreDeclaration
Swift
public struct RuntimeMissionRawError : Error -
Undocumented
See moreDeclaration
Swift
public struct MissionRawError : Error -
Mission progress type.
See moreDeclaration
Swift
public struct MissionProgress : Equatable -
Mission item exactly identical to MAVLink MISSION_ITEM_INT.
See moreDeclaration
Swift
public struct MissionItem : Equatable -
Mission import data
See moreDeclaration
Swift
public struct MissionImportData : Equatable -
Result type.
See moreDeclaration
Swift
public struct MissionRawResult : Equatable -
Upload a list of raw mission items to the system.
The raw mission items are uploaded to a drone. Once uploaded the mission can be started and executed even if the connection is lost.
Declaration
Swift
public func uploadMission(missionItems: [MissionItem]) -> CompletableParameters
missionItemsThe mission items
-
Cancel an ongoing mission upload.
Declaration
Swift
public func cancelMissionUpload() -> Completable -
Download a list of raw mission items from the system (asynchronous).
Declaration
Swift
public func downloadMission() -> Single<[MissionItem]> -
Cancel an ongoing mission download.
Declaration
Swift
public func cancelMissionDownload() -> Completable -
Start the mission.
A mission must be uploaded to the vehicle before this can be called.
Declaration
Swift
public func startMission() -> Completable -
Pause the mission.
Pausing the mission puts the vehicle into HOLD mode. A multicopter should just hover at the spot while a fixedwing vehicle should loiter around the location where it paused.
Declaration
Swift
public func pauseMission() -> Completable -
Clear the mission saved on the vehicle.
Declaration
Swift
public func clearMission() -> Completable -
Sets the raw mission item index to go to.
By setting the current index to 0, the mission is restarted from the beginning. If it is set to a specific index of a raw mission item, the mission will be set to this item.
Declaration
Swift
public func setCurrentMissionItem(index: Int32) -> CompletableParameters
indexIndex of the mission item to be set as the next one (0-based)
-
Subscribe to mission progress updates.
Declaration
Swift
public lazy var missionProgress: Observable<MissionProgress> { get set } -
* Subscribes to mission changed.
This notification can be used to be informed if a ground station has been uploaded or changed by a ground station or companion computer.
@param callback Callback to notify about change.
Declaration
Swift
public lazy var missionChanged: Observable<Bool> { get set } -
Import a QGroundControl missions in JSON .plan format.
Supported:
- Waypoints
- Survey Not supported:
Structure Scan
Declaration
Swift
public func importQgroundcontrolMission(qgcPlanPath: String) -> Single<MissionImportData>Parameters
qgcPlanPathFile path of the QGC plan
View on GitHub
Install in Dash
MissionRaw Class Reference