cvmeasmscjac

Jacobian of measurement using constant velocity (CV) model in MSC frame

Syntax

jacobian = cvmeasmscjac(state)
jacobian = cvmeasmscjac(state,frame)
jacobian = cvmeasmscjac(state,frame,laxes)
jacobian = cvmeasmscjac(state,measurementParameters)

Description

jacobian = cvmeasmscjac(state) calculates the Jacobian with respect to angular measurement (azimuth and elevation) of the state in the sensor frame. The motion can be either in 2-D or 3-D space. If motion model is in 2-D space, values corresponding to elevation are assumed to be zero.

The trackingEKF and trackingMSCEKF filters require a definition of the MeasurementJacobianFcn property. The cvmeasmscjac function can be used as the MeasurementJacobianFcn. To use this MeasurementFcn with trackerGNN and trackerTOMHT, you can use the trackingMSCEKF filter.

example

jacobian = cvmeasmscjac(state,frame) provides the Jacobian measurement in the frame specified. The allowed values for frame are 'rectangular' and 'spherical'.

jacobian = cvmeasmscjac(state,frame,laxes) specifies the axes of the sensor's coordinate system. The laxes input is a 3-by-3 matrix with each column specifying the direction of local x, y, and z axes in the sensor coordinate system. The default for laxes is [1 0 0;0 1 0;0 0 1].

example

jacobian = cvmeasmscjac(state,measurementParameters) specifies the measurement parameters as a struct.

Examples

collapse all

Using the cvmeasmscjac function, you can obtain the jacobian of the state measurements in the spherical and the rectangular frames.

Spherical Frame

Obtain the Jacobian of the azimuth and elevation measurements from an MSC state.

mscState = [0.5;0;0.3;0;1e-3;1e-2];
cvmeasmscjac(mscState)
ans = 2×6

   57.2958         0         0         0         0         0
         0         0   57.2958         0         0         0

Rectangular Frame

Obtain the Jacobian of the position measurement from an MSC state. Specify the frame as a second input.

cvmeasmscjac(mscState,'rectangular')
ans = 3×6
105 ×

   -0.0046         0   -0.0026         0   -8.3839         0
    0.0084         0   -0.0014         0   -4.5801         0
         0         0    0.0096         0   -2.9552         0

Alternatively, you can specify the frame using measurementParameters.

cvmeasmscjac(mscState,struct('Frame','rectangular'))
ans = 3×6
105 ×

   -0.0046         0   -0.0026         0   -8.3839         0
    0.0084         0   -0.0014         0   -4.5801         0
         0         0    0.0096         0   -2.9552         0

Input Arguments

collapse all

State that is defined relative to an observer in modified spherical coordinates, as a vector. For example, if there is a target state, xT, and an observer state, xO, the state used by the function is xT - xO.

The 2-D version of modified spherical coordinates (MSC) is also referred to as the modified polar coordinates (MPC). In the case of:

  • 2-D space –– State equals [az azRate 1/r vr/r].

  • 3-D space –– State equals [az omega el elRate 1/r vr/r].

The variables used in the convention are:

  • az –– Azimuth angle (rad)

  • el –– Elevation angle (rad)

  • azRate –– Azimuth rate (rad/s)

  • elRate –– Elevation rate (rad/s)

  • omega –– azRate × cos(el) (rad/s)

  • 1/r –– 1/range (1/m)

  • vr/r –– range-rate/range or inverse time-to-go (1/s)

If the motion model is in 2-D space, values corresponding to elevation are assumed to be zero if elevation is requested as an output.

Data Types: single | double

Measurement frame, specified as 'spherical' or 'rectangular'. If using the 'rectangular' frame, the three rows present in jacobian represent the Jacobian of the measurements with respect to x, y, and z position of the target in the sensor's Cartesian frame. If using the 'spherical' frame, the two rows present in jacobian represent the Jacobian of the azimuth and elevation measurements of the target. If not specified, the function provides the Jacobian of the measurements in the 'spherical' frame.

Direction of local x, y, and z axes in the scenario, specified as a 3-by-3 matrix. Each column of the matrix specifies the direction of the local x, y, and z axes in the sensor coordinate system. If not specified, the laxes is equal to [1 0 0;0 1 0;0 0 1].

Data Types: double

Measurement parameters, specified as a struct. The structure must have the following fields (or a subset of them):

  • Frame –– Either 'rectangular' or 'spherical' or an enum with the same values. Default: 'spherical'.

  • Orientation –– A 3-by-3 laxes matrix.

  • HasElevation –– A logical scalar, true if elevation is measured. Default: true if state is in 3-D space, false if state is in 2-D space.

  • IsParentToChild –– A logical scalar, true if the orientation is given as a parent to child frame rotation.

Data Types: struct

Output Arguments

collapse all

Target measurement in MSC frame, returned as a:

  • One-row matrix –– When HasElevation is set to false.

  • Two-row matrix –– When the frame is set to 'spherical', the function measures the azimuth and elevation measurements from a MSC state.

  • Three-row matrix –– When the frame is set to 'rectangular', the function measures the position measurement from a MSC state.

Extended Capabilities

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

Introduced in R2018b