cvmeasmsc

Measurement based on constant velocity (CV) model in MSC frame

Description

measurement = cvmeasmsc(state) provides the angular measurement (azimuth and elevation) of the state in the sensor frame described by the state.

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

example

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

measurement = cvmeasmsc(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 observer's Cartesian frame. The default for laxes is [1 0 0;0 1 0;0 0 1].

example

measurement = cvmeasmsc(state,measurementParameters) specifies the measurement parameters as a scalar struct or an array of struct.

Examples

collapse all

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

Spherical Frame

Obtain the azimuth and elevation measurements from an MSC state.

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

   28.6479
   17.1887

Rectangular Frame

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

cvmeasmsc(mscState,'rectangular')
ans = 3×1

  838.3866
  458.0127
  295.5202

Alternatively, you can specify the frame using measurementParameters.

cvmeasmsc(mscState,struct('Frame','rectangular'))
ans = 3×1

  838.3866
  458.0127
  295.5202

Input Arguments

collapse all

State that is defined relative to an observer in modified spherical coordinates, specified as a vector or a 2-D matrix. For example, if there is a constant velocity target state, xT, and a constant velocity observer state, xO, then the state is defined as xT - xO transformed in modified spherical coordinates.

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

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

  • 3-D space –– State is equal to [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 input state is specified as a matrix, states must be concatenated along columns, where each column represents a state following the convention specified above. The output is a matrix with the same number of columns as the input, where each column represents the measurement from the corresponding state.

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 elements present in the measurement represent x, y, and z position of the target in the observer's Cartesian frame. If using the 'spherical' frame, the two elements present in the measurement represent azimuth and elevation measurement of the target. If not specified, the function provides the measurements in 'spherical' frame.

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

Data Types: double

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

  • Frame –– Either 'rectangular' or 'spherical' or an enumeration 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-element vector –– When HasElevation is set to false, the vector contains azimuth as the only measurement.

  • Two-element vector –– When the frame is set to 'spherical', the function measures the azimuth and elevation measurements from an MSC state.

  • Three-element vector –– When the frame is set to 'rectangular', the function measures the position measurement from an MSC state.

Extended Capabilities

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

Introduced in R2018b