Main Content

predictTracksToTime

Predict tracks to a time stamp

Since R2021a

    Description

    predictedtracks = predictTracksToTime(tracker,trackID,time) returns the predicted tracks, predictedtracks, of the tracker, at the specified time, time. The tracker or fuser must be updated at least once before calling this object function. Use isLocked(tracker) to test whether the tracker or fuser has been updated.

    Note

    This function only outputs the predicted tracks and does not update the internal track states of the tracker.

    example

    predictedtracks = predictTracksToTime(tracker,category,time) returns all predicted tracks for a specified category, category, of tracked objects.

    predictedtracks = predictTracksToTime(tracker,category,time,'WithCovariance',tf) also allows you to specify whether to predict the state covariance of each track or not by setting the tf flag to true or false. Predicting the covariance slows down the prediction process and increases the computation cost, but it provides the predicted track state covariance in addition to the predicted state. The default is false.

    Examples

    collapse all

    Create a track from a detection at time t=0 second.

    tracker = radarTracker;
    detection = objectDetection(0,[0;0;0]);
    tracker(detection,0);

    Predict the track to t=1second.

    predictedtracks = predictTracksToTime(tracker,'all',1)
    predictedtracks = 
      objectTrack with properties:
    
                         TrackID: 1
                        BranchID: 0
                     SourceIndex: 0
                      UpdateTime: 1
                             Age: 1
                           State: [6x1 double]
                 StateCovariance: [6x6 double]
                 StateParameters: [1x1 struct]
                   ObjectClassID: 0
        ObjectClassProbabilities: 1
                      TrackLogic: 'History'
                 TrackLogicState: [1 0 0 0 0]
                     IsConfirmed: 0
                       IsCoasted: 0
                  IsSelfReported: 1
                ObjectAttributes: [1x1 struct]
    
    

    Input Arguments

    collapse all

    Radar tracker, specified as a radarTracker object.

    Track identifier, specified as a positive integer. Only the track specified by the trackID is predicted in the tracker.

    Example: 15

    Data Types: single | double

    Prediction time, specified as a scalar. The states of tracks are predicted to this time. The time must be greater than the time input to the tracker in the previous track update. Units are in seconds.

    Example: 1.0

    Data Types: single | double

    Track categories, specified as 'all', 'confirmed', or 'tentative'. You can choose to predict all tracks, only confirmed tracks, or only tentative tracks.

    Data Types: char

    Output Arguments

    collapse all

    List of tracks or branches, returned as:

    • An array of objectTrack objects in the MATLAB interpreted mode.

    • An array of structures in the code generation mode. The field names of the structures are the same as the names of properties in objectTrack.

    Data Types: struct | object

    Extended Capabilities

    C/C++ Code Generation
    Generate C and C++ code using MATLAB® Coder™.

    Version History

    Introduced in R2021a

    See Also