%% Find Position of 3-D Constant-Acceleration Object
% Create an extended Kalman filter tracker for 3-D constant-acceleration motion.

tracker = multiObjectTracker('FilterInitializationFcn',@initcaekf);

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

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

%
% Obtain the position vector from the track state.

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

% Copyright 2020 The MathWorks, Inc.