%% Create Measurement Jacobian of Accelerating Object Using Measurement Parameters
% Define the state of an object in 2-D constant-acceleration motion. The state is the position, velocity, and acceleration in both dimensions. Compute the measurement Jacobian in spherical coordinates with respect to an origin at (5;-20;0) meters.

state2d = [1,10,3,2,20,5].';
sensorpos = [5,-20,0].';
frame = 'spherical';
sensorvel = [0;8;0];
laxes = eye(3);
measurementjac = cameasjac(state2d,frame,sensorpos,sensorvel,laxes)

%
% Put the measurement parameters in a structure and use the alternative syntax.

measparm = struct('Frame',frame,'OriginPosition',sensorpos,'OriginVelocity',sensorvel, ...
    'Orientation',laxes);
measurementjac = cameasjac(state2d,measparm)

% Copyright 2017 The MathWorks, Inc.