Main Content

cvmeasmscjac

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

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.

ThetrackingEKFandtrackingMSCEKFfilters require a definition of theMeasurementJacobianFcnproperty. Thecvmeasmscjacfunction can be used as theMeasurementJacobianFcn. To use thisMeasurementFcnwithtrackerGNNandtrackerTOMHT, you can use thetrackingMSCEKFfilter.

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. Thelaxesinput is a 3-by-3 matrix with each column specifying the direction of localx,y, andzaxes in the sensor coordinate system. The default forlaxesis [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 thecvmeasmscjacfunction, 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×657.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×6105× -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 usingmeasurementParameters.

cvmeasmscjac(mscState,struct('Frame','rectangular'))
ans =3×6105× -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,stateused by the function isxT - xO.

球坐标的2 d版本修改(MSC) is also referred to as the modified polar coordinates (MPC). In the case of:

  • 2-D space –– State equals [azazRate1/rvr/r].

  • 3-D space –– State equals [azomegaelelRate1/rvr/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 injacobianrepresent the Jacobian of the measurements with respect tox,y, andzposition of the target in the sensor's Cartesian frame. If using the'spherical'frame, the two rows present injacobianrepresent 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 localx,y, andzaxes in the scenario, specified as a 3-by-3 matrix. Each column of the matrix specifies the direction of the localx,y, andzaxes in the sensor coordinate system. If not specified, thelaxesis equal to[1 0 0;0 1 0;0 0 1].

Data Types:double

Measurement parameters, specified as a structure or an array of structures. The fields of the structure are:

Field Description Example
Frame

Frame used to report measurements, specified as one of these values:

  • 'rectangular'— Detections are reported in rectangular coordinates.

  • 'spherical'— Detections are reported in spherical coordinates.

'spherical'
OriginPosition Position offset of the origin of the frame relative to the parent frame, specified as an[x y z]real-valued vector. [0 0 0]
OriginVelocity Velocity offset of the origin of the frame relative to the parent frame, specified as a[vx vy vz]real-valued vector. [0 0 0]
Orientation Frame rotation matrix, specified as a 3-by-3 real-valued orthonormal matrix. [1 0 0; 0 1 0; 0 0 1]
HasAzimuth Logical scalar indicating if azimuth is included in the measurement. 1
HasElevation Logical scalar indicating if elevation is included in the measurement. For measurements reported in a rectangular frame, and ifHasElevationis false, the reported measurements assume 0 degrees of elevation. 1
HasRange Logical scalar indicating if range is included in the measurement. 1
HasVelocity Logical scalar indicating if the reported detections include velocity measurements. For measurements reported in the rectangular frame, ifHasVelocityis false, the measurements are reported as[x y z]. IfHasVelocityistrue, measurements are reported as[x y z vx vy vz]. 1
IsParentToChild Logical scalar indicating ifOrientationperforms a frame rotation from the parent coordinate frame to the child coordinate frame. WhenIsParentToChildisfalse,nOrientationperforms a frame rotation from the child coordinate frame to the parent coordinate frame. 0

If you only want to perform one coordinate transformation, such as a transformation from the body frame to the sensor frame, you only need to specify a measurement parameter structure. If you want to perform multiple coordinate transformations, you need to specify an array of measurement parameter structures. To learn how to perform multiple transformations, see theConvert Detections to objectDetection Formatexample.

Data Types:struct

Output Arguments

collapse all

Target measurement in MSC frame, returned as a:

  • One-row matrix –– WhenHasElevationis set tofalse.

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

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

Extended Capabilities

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

Version History

Introduced in R2018b

See Also

Objects

Functions