%% Find Position and Covariance of 3-D Constant-Velocity Object
% Create an extended Kalman filter tracker for 3-D constant-velocity motion.

tracker = trackerTOMHT('FilterInitializationFcn',@initcvekf);

%
% Update the tracker with a single detection and get the tracks output.

detection = objectDetection(0,[10;3;-7],'ObjectClassID',3);
tracks = tracker(detection,0)

%
% Obtain the position vector and position covariance for that track

positionSelector = [1 0 0 0 0 0; 0 0 1 0 0 0; 0 0 0 0 1 0];
[position,positionCovariance] = getTrackPositions(tracks,positionSelector)

% Copyright 2017 The MathWorks, Inc.