initekfimm
Description
Examples
Detection with Position Measurement in Rectangular Frame
A 3-D position measurement in rectangular frame is provided. For example, x = 1, y = 3, and z = 0. Use a 3-D position measurement noise [1 0.4 0; 0.4 4 0; 0 0 1].
detection = objectDetection(0, [1;3;0], 'MeasurementNoise', [1 0.4 0; 0.4 4 0; 0 0 1]);
Use initekfimm
to create a trackingIMM
filter initialized at the provided position and using the measurement noise defined above.
imm = initekfimm(detection);
Check the values of the state and measurement noise. Verify that the filter state, imm.State
, has the same position components as detection measurement, detection.Measurement
.
imm.State
ans = 6×1
1
0
3
0
0
0
Verify that the filter measurement noise, imm.MeasurementNoise
, is the same as the detection.MeasurementNoise
values.
imm.MeasurementNoise
ans = 3×3
1.0000 0.4000 0
0.4000 4.0000 0
0 0 1.0000
Detection with Position Measurement in Spherical Frame
A 3-D position measurement in spherical frame is provided. For example: az = 40
, el = 6
, r = 100
, rr = 5
. Measurement noise is diag([2.5, 2.5, 0.5, 1].^2)
.
meas = [40;6;100;5]; measNoise = diag([2.5,2.5,0.5,1].^2);
Use the MeasurementParameters
to define the frame. You can leave out other fields of the MeasurementParameters
struct, and they will be completed by default values. In this example, sensor position, sensor velocity, orientation, elevation, and range rate flags are default.
measParams = struct('Frame','spherical'); detection = objectDetection(0,meas,'MeasurementNoise',measNoise,... 'MeasurementParameters', measParams);
Use initekfimm
to create a trackingIMM
filter initialized at the provided position and using the measurement noise defined above.
imm = initekfimm(detection)
imm = trackingIMM with properties: State: [6x1 double] StateCovariance: [6x6 double] TrackingFilters: {3x1 cell} HasMeasurementWrapping: [1 1 1] MeasurementNoise: [4x4 double] ModelConversionFcn: @switchimm TransitionProbabilities: [3x3 double] ModelProbabilities: [3x1 double] MaxNumOOSMSteps: 0 EnableSmoothing: 0
Input Arguments
detection
— Detection report
objectDetection
object
Detection report, specified as an objectDetection
object.
Example: detection = objectDetection(0,[1;4.5;3],'MeasurementNoise', [1.0 0 0;
0 2.0 0; 0 0 1.5])
Output Arguments
imm
— trackingIMM object
trackingIMM
object
Constant velocity (CV), constant acceleration (CA), and a constant turn (CT)
trackingIMM
(imm
) object based on information
provided in detection
, returned as a trackingIMM
object.
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Version History
Introduced in R2018b
Open Example
You have a modified version of this example. Do you want to open this example with your edits?
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)