FollowMe
public class FollowMe
Allow users to command the vehicle to follow a specific target. The target is provided as a GPS coordinate and altitude.
-
Initializes a new
FollowMe
plugin.Normally never created manually, but used from the
Drone
helper class instead.Declaration
Swift
public convenience init(address: String = "localhost", port: Int32 = 50051, scheduler: SchedulerType = ConcurrentDispatchQueueScheduler(qos: .background))
Parameters
address
The address of the
MavsdkServer
instance to connect toport
The port of the
MavsdkServer
instance to connect toscheduler
The scheduler to be used by
Observable
s -
Undocumented
See moreDeclaration
Swift
public struct RuntimeFollowMeError : Error
-
Undocumented
See moreDeclaration
Swift
public struct FollowMeError : Error
-
Configuration type.
See moreDeclaration
Swift
public struct Config : Equatable
-
Target location for the vehicle to follow
See moreDeclaration
Swift
public struct TargetLocation : Equatable
-
Declaration
Swift
public struct FollowMeResult : Equatable
-
Get current configuration.
Declaration
Swift
public func getConfig() -> Single<Config>
-
Apply configuration by sending it to the system.
Declaration
Swift
public func setConfig(config: Config) -> Completable
Parameters
config
The new configuration to be set
-
Check if FollowMe is active.
Declaration
Swift
public func isActive() -> Single<Bool>
-
Set location of the moving target.
Declaration
Swift
public func setTargetLocation(location: TargetLocation) -> Completable
Parameters
location
The new TargetLocation to follow
-
Get the last location of the target.
Declaration
Swift
public func getLastLocation() -> Single<TargetLocation>
-
Start FollowMe mode.
Declaration
Swift
public func start() -> Completable
-
Stop FollowMe mode.
Declaration
Swift
public func stop() -> Completable