OnboardTracker

public protocol OnboardTracker : Peripheral

Peripheral managing onboard tracker.

This peripheral can be retrieved by:

device.getPeripheral(Peripherals.onboardTracker)
  • Creates a request to add a target to track from a rectangle in the video.

    Declaration

    Swift

    func ofRect(timestamp: UInt64, horizontalPosition: Float, verticalPosition: Float, width: Float,
                       height: Float) -> TrackingRequest

    Parameters

    timestamp

    timestamp of the video frame

    horizontalPosition

    horizontal position of the top left corner’s target in the video, in range [0, 1]

    verticalPosition

    vertical position of the top left corner’s target in the video, in range [0, 1]

    width

    width of target in the video, in range [0, 1]

    height

    height of target in the video, in range [0, 1]

    Return Value

    a new tracking request

  • Creates a request to add a target to track from a proposal id.

    Declaration

    Swift

    func ofProposal(timestamp: UInt64, proposalId: UInt) -> TrackingRequest

    Parameters

    timestamp

    timestamp of the video frame

    proposalId

    id of the proposal given by the drone

    Return Value

    a new tracking request

  • Adds a new target to track.

    Declaration

    Swift

    func addNewTarget(trackingRequest: TrackingRequest)

    Parameters

    trackingRequest

    the tracking request

  • Replaces current targets by a new target.

    Declaration

    Swift

    func replaceAllTargetsBy(trackingRequest: TrackingRequest)

    Parameters

    trackingRequest

    the tracking request

  • Remove all targets.

    Declaration

    Swift

    func removeAllTargets()
  • Start tracking engine.

    Declaration

    Swift

    func startTrackingEngine(boxProposals: Bool)

    Parameters

    boxProposals

    true to use box proposals, false without

  • Stop tracking engine.

    Declaration

    Swift

    func stopTrackingEngine()
  • State of activation of tracking engine.

    Declaration

    Swift

    var trackingEngineState: TrackingEngineState { get }
  • Remove specific target from tracking.

    Declaration

    Swift

    func removeTarget(targetId: UInt)

    Parameters

    targetId

    id of the target given by the drone

  • Gets the targets currently managed by the drone.

    This is a dictionary of [id: TrackingObject]

    Declaration

    Swift

    var targets: [UInt : Target] { get }
  • Gets the latest request status returned by the drone in response to a tracking request.

    This method shall be used to get the response returned by the drone after calls to addNewTarget, replaceAllTargetsBy, removeAllTargets, or removeTarget. The returned status is transient. The returned value will change back to nil immediately after request, status is notified.

    Declaration

    Swift

    var requestStatus: RequestStatus? { get }
  • Tells if tracking feature is available.

    Declaration

    Swift

    var isAvailable: Bool { get }