Main Content

predictTracksToTime

Predict track state

Description

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

This syntax applies when you create the obj using trackerGNN, trackerJPDA, trackerPHD, trackerGridRFS, or trackFuser.

Note

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

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

This syntax applies when you create the obj using trackerGNN, trackerJPDA, trackerPHD, trackerGridRFS, or trackFuser.

predictedtracks = predictTracksToTime(obj,type,id,time) returns the predicted tracks or branches, predictedtracks, of the tracker or fuser object, obj, at the specified time, time. Specify the type, type, of tracked object and the object ID, id. The tracker or fuser must be updated at least once before calling this object function. Use isLocked(trackObj) to test whether the tracker or fuser has been updated.

This syntax applies when you create the obj using trackerTOMHT.

example

predictedtracks = predictTracksToTime(obj,type,category,time) returns all predicted tracks or branches for a specified category, category, of tracked objects.

This syntax applies when you create the obj using trackerTOMHT.

predictedtracks = predictTracksToTime(___,'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 and predict its state later on.

tracker = trackerTOMHT;
detection = objectDetection(0,[0;0;0]);
tracker(detection,0);
branches = getBranches(tracker);
predictedtracks = predictTracksToTime(tracker,'branch',1,1)
predictedtracks = 
  objectTrack with properties:

                     TrackID: 1
                    BranchID: 1
                 SourceIndex: 0
                  UpdateTime: 1
                         Age: 1
                       State: [6x1 double]
             StateCovariance: [6x6 double]
             StateParameters: [1x1 struct]
               ObjectClassID: 0
    ObjectClassProbabilities: 1
                  TrackLogic: 'Score'
             TrackLogicState: [13.7102 13.7102]
                 IsConfirmed: 0
                   IsCoasted: 0
              IsSelfReported: 1
            ObjectAttributes: [1x1 struct]

Input Arguments

collapse all

Tracker or fuser object, specified as a trackerTOMHT, trackerJPDA object, trackerGNN object, trackerGridRFS object, or trackFuser object.

Tracked object type, specified as 'track' or 'branch'.

Track or branch identifier, specified as a positive integer.

Example: 21

Data Types: single | double

Track identifier, specified as a positive integer.

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 structures or an array of objectTrack objects. If the obj input is specified as a trackerGNN, trackerJPDA, or trackFuser object, it is returned as an array of objectTrack objects in MATLAB, and returned as an array of structures with field names same as the property names of objectTrack in code generation. If the obj input is specified as a trackerPHD object, it is returned as an array of structures, in which each structure contains the following fields:

FieldDescription
TrackID

Unique integer that identifies the track.

SouceIndex

Unique identifier the tracker in a multiple tracker environment. The SourceIndex is exactly the same with the TrackerIndex.

UpdateTime

The time the track was updated.

AgeNumber of times the track survived.
State

Value of state vector at the update time.

StateCovariance

Uncertainty covariance matrix.

Extent

Spatial extent estimate of the tracked object, returned as a d-by-d matrix, where d is the dimension of the object. This field is only returned when the tracking filter is specified as a ggiwphd filter.

MeasurementRate

Expected number of detections from the tracked object. This field is only returned when the tracking filter is specified as a ggiwphd filter.

IsConfirmed

True if the track is assumed to be of a real target.

IsCoasted

trackerPHD does not support the IsCoasted field. The value is always 0.

ObjectClassID

trackerPHD does not support the ObjectClassID field. The value is always 0.

StateParamaters

Parameters about the track state reference frame specified in the StateParameters property of the PHD tracker.

IsSelfReported

Indicate if the track is reported by the tracker. This field is used in a track fusion environment. It is returned as true by default.

Data Types: struct | object

Extended Capabilities

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

Version History

Introduced in R2018b