Documentation

### This is machine translation

Mouseover text to see original. Click the button below to return to the English version of the page.

# cameasjac

Jacobian of measurement function for constant-acceleration motion

## Syntax

``measurementjac = cameasjac(state)``
``measurementjac = cameasjac(state,frame)``
``measurementjac = cameasjac(state,frame,sensorpos)``
``measurementjac = cameasjac(state,frame,sensorpos,sensorvel)``
``measurementjac = cameasjac(state,frame,sensorpos,sensorvel,laxes)``
``measurementjac = cameasjac(state,measurementParameters)``

## Description

example

````measurementjac = cameasjac(state)` returns the measurement Jacobian, for constant-acceleration Kalman filter motion model in rectangular coordinates. The `state` argument specifies the current state of the filter.```

example

````measurementjac = cameasjac(state,frame)` also specifies the measurement coordinate system, `frame`.```

example

````measurementjac = cameasjac(state,frame,sensorpos)` also specifies the sensor position, `sensorpos`.```
````measurementjac = cameasjac(state,frame,sensorpos,sensorvel)` also specifies the sensor velocity, `sensorvel`.```
````measurementjac = cameasjac(state,frame,sensorpos,sensorvel,laxes)` also specifies the local sensor axes orientation, `laxes`.```

example

````measurementjac = cameasjac(state,measurementParameters)` specifies the measurement parameters, `measurementParameters`.```

## Examples

collapse all

Define the state of an object in 2-D constant-acceleration motion. The state is the position, velocity, and acceleration in both dimensions. Construct the measurement Jacobian in rectangular coordinates.

```state = [1,10,3,2,20,5].'; jacobian = cameasjac(state)```
```jacobian = 3×6 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 ```

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.

```state = [1;10;3;2;20;5]; measurementjac = cameasjac(state,'spherical')```
```measurementjac = 4×6 -22.9183 0 0 11.4592 0 0 0 0 0 0 0 0 0.4472 0 0 0.8944 0 0 0.0000 0.4472 0 0.0000 0.8944 0 ```

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.

```state = [1,10,3,2,20,5].'; sensorpos = [5,-20,0].'; measurementjac = cameasjac(state,'spherical',sensorpos)```
```measurementjac = 4×6 -2.5210 0 0 -0.4584 0 0 0 0 0 0 0 0 -0.1789 0 0 0.9839 0 0 0.5903 -0.1789 0 0.1073 0.9839 0 ```

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)```
```measurementjac = 4×6 -2.5210 0 0 -0.4584 0 0 0 0 0 0 0 0 -0.1789 0 0 0.9839 0 0 0.5274 -0.1789 0 0.0959 0.9839 0 ```

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)```
```measurementjac = 4×6 -2.5210 0 0 -0.4584 0 0 0 0 0 0 0 0 -0.1789 0 0 0.9839 0 0 0.5274 -0.1789 0 0.0959 0.9839 0 ```

## Input Arguments

collapse all

Kalman filter state vector for constant-acceleration motion, specified as a real-valued 3N-element vector. N is the number of spatial degrees of freedom of motion. For each spatial degree of motion, the state vector takes the form shown in this table.

Spatial DimensionsState Vector Structure
1-D`[x;vx;ax]`
2-D`[x;vx;ax;y;vy;ay]`
3-D`[x;vx;ax;y;vy;ay;z;vz;az]`

For example, `x` represents the x-coordinate, `vx` represents the velocity in the x-direction, and `ax` represents the acceleration in the x-direction. If the motion model is in one-dimensional space, the y- and z-axes are assumed to be zero. If the motion model is in two-dimensional space, values along the z-axis are assumed to be zero. Position coordinates are in meters. Velocity coordinates are in meters/second. Acceleration coordinates are in meters/second2.

Example: `[5;0.1;0.01;0;-0.2;-0.01;-3;0.05;0]`

Data Types: `double`

Measurement frame, specified as `'rectangular'` or `'spherical'`. When the frame is `'rectangular'`, a measurement consists of the x, y, and z Cartesian coordinates of the tracked object. When specified as `'spherical'`, a measurement consists of the azimuth, elevation, range, and range rate of the tracked object.

Data Types: `char`

Sensor position with respect to the global coordinate system, specified as a real-valued 3-by-1 column vector. Units are in meters.

Data Types: `double`

Sensor velocity with respect to the global coordinate system, specified as a real-valued 3-by-1 column vector. Units are in meters/second.

Data Types: `double`

Local sensor coordinate axes, specified as a 3-by-3 orthogonal matrix. Each column specifies the direction of the local x-, y-, and z-axes, respectively, with respect to the global coordinate system.

Data Types: `double`

Measurement parameters, specified as a structure. The fields of the structure are:

measurementParameters struct

ParameterDefinitionDefault
`OriginPosition`Sensor position with respect to the global coordinate system, specified as a real-valued 3-by-1 column vector. Units are in meters.`[0;0;0]`
`OriginVelocity`Sensor velocity with respect to the global coordinate system, specified as a real-valued 3-by-1 column vector. Units are in m/s.`[0;0;0]`
`Orientation`Local sensor coordinate axes, specified as a 3-by-3 orthogonal matrix. Each column specifies the direction of the local x-, y-, and z-axes, respectively, with respect to the global coordinate system.`eye(3)`
`HasVelocity`Indicates whether measurements contain velocity or range rate components, specified as `true` or `false`.`false` when `frame` argument is `'rectangular'` and `true` when `frame` argument is `'spherical'`
`HasElevation`Indicates whether measurements contain elevation components, specified as `true` or `false`.`true`

Data Types: `struct`

## Output Arguments

collapse all

Measurement Jacobian, specified as a real-valued 3-by-N or 4-by-N matrix. N is the dimension of the state vector. The interpretation of the rows and columns depends on the `frame` argument, as described in this table.

FrameMeasurement Jacobian
`'rectangular'`Jacobian of the measurements `[x;y;z]` with respect to the state vector. The measurement vector is with respect to the local coordinate system. Coordinates are in meters.
`'spherical'`Jacobian of the measurement vector `[az;el;r;rr]` with respect to the state vector. Measurement vector components specify the azimuth angle, elevation angle, range, and range rate of the object with respect to the local sensor coordinate system. Angle units are in degrees. Range units are in meters and range rate units are in meters/second.

collapse all

### Azimuth and Elevation Angle Definitions

Define the azimuth and elevation angles used in Sensor Fusion and Tracking Toolbox™.

The azimuth angle of a vector is the angle between the x-axis and its orthogonal projection onto the xy plane. The angle is positive in going from the x axis toward the y axis. Azimuth angles lie between –180 and 180 degrees. The elevation angle is the angle between the vector and its orthogonal projection onto the xy-plane. The angle is positive when going toward the positive z-axis from the xy plane. ## Extended Capabilities

### C/C++ Code GenerationGenerate C and C++ code using MATLAB® Coder™.

#### Introduced in R2018b

##### Support Get trial now