%% Create Measurement from Constant-Velocity Object in Translated Spherical Frame
% Define the state of an object in 2-D constant-velocity motion. The state consists of position and velocity in each spatial dimension. The measurements are in spherical coordinates with respect to a frame located at (20;40;0) meters.

state = [1;10;2;20];
measurement = cvmeas(state,'spherical',[20;40;0])

% The elevation of the measurement is zero and the range rate is negative. These results indicate that the object is moving toward the sensor.
% Copyright 2017 The MathWorks, Inc.