Main Content

evaluateBatch

Compute track error metrics for recorded data

Since R2023b

Description

[cumTrackErrorMetrics,cumTruthErrorMetrics,trackErrorHistory,truthErrorHistory] = evaluateBatch(errorMetrics,tracklog,truthlog,assignHistory) computes cumulative and historical error metrics from recorded data.

example

Examples

collapse all

First, load the stored track data.

load trackmetricex tracklog truthlog

Create a trackAssignmentMetric object.

tam = trackAssignmentMetrics;

Use the evaluateBatch object function to obtain the track summary, the truth summary, and the assignment history.

[trackSummary,truthSummary,assignHistory] = evaluateBatch(tam,tracklog,truthlog)
trackSummary = struct with fields:
            TotalNumTracks: 4
            NumFalseTracks: 0
              MaxSwapCount: 3
            TotalSwapCount: 5
        MaxDivergenceCount: 8
      TotalDivergenceCount: 17
       MaxDivergenceLength: 314
     TotalDivergenceLength: 434
        MaxRedundancyCount: 1
      TotalRedundancyCount: 3
       MaxRedundancyLength: 169
     TotalRedundancyLength: 199
     MaxTimeBetweenReports: 0.0187
    MeanTimeBetweenReports: 0.0187

truthSummary = struct with fields:
              TotalNumTruths: 2
            NumMissingTruths: 0
      MaxEstablishmentLength: 84
    TotalEstablishmentLength: 140
               MaxBreakCount: 4
             TotalBreakCount: 7
              MaxBreakLength: 645
            TotalBreakLength: 813
       MaxTimeBetweenReports: 0.0187
      MeanTimeBetweenReports: 0.0187

assignHistory=2678×1 struct array with fields:
    Time
    TrackIDs
    TruthIDs

Next, create a trackErrorMetrics object.

tem = trackErrorMetrics;

Use the evaluateBatch object function to obtain the cumulative track and truth error metric tables as well as the track and truth error history tables.

[cumTrackError,cumTruthError,trackErrorHistory,truthErrorHistory] = evaluateBatch(tem,tracklog,truthlog,assignHistory)
cumTrackError=4×5 table
    TrackID    posRMS    velRMS    posANEES    velANEES
    _______    ______    ______    ________    ________

       1       117.69    43.951    0.58338     0.44127 
       2        129.7      42.8    0.81094     0.42509 
       6       371.35    87.083     4.5208      1.6952 
       8       130.45    53.914     1.0448     0.44813 

cumTruthError=2×5 table
    TruthID    posRMS    velRMS    posANEES    velANEES
    _______    ______    ______    ________    ________

       2       258.21    65.078     2.2514     0.93359 
       3       134.41    48.253    0.96314     0.49183 

trackErrorHistory=4600×6 table
     Time     TrackID    posRMS    velRMS    posANEES    velANEES
    ______    _______    ______    ______    ________    ________

     1.064       1       30.104    12.092    0.049206    0.024983
    1.0827       1       29.996    12.092    0.035699    0.022217
    1.1013       1        29.89    12.092    0.035276    0.022217
      1.12       1       29.785    12.092    0.034862    0.022217
    1.1387       1       29.681    12.092    0.034458    0.022217
    1.1573       1       29.579    12.092    0.034065    0.022217
     1.176       1       29.478    12.092    0.033682    0.022217
    1.1947       1       29.379    12.092     0.03331    0.022217
    1.2133       1       29.281    12.092    0.032948    0.022217
     1.232       1       29.184    12.092    0.032597    0.022217
    1.2507       1       29.089    12.092    0.032257    0.022217
    1.2693       1       28.995    12.092    0.031927    0.022217
     1.288       1       28.902    12.092    0.031608    0.022217
    1.3067       1       28.812    12.092      0.0313    0.022217
    1.3253       1       28.722    12.092    0.031003    0.022217
     1.344       1       28.634    12.092    0.030715    0.022217
      ⋮

truthErrorHistory=4403×6 table
     Time     TruthID    posRMS    velRMS    posANEES    velANEES
    ______    _______    ______    ______    ________    ________

     1.064       2       30.104    12.092    0.049206    0.024983
    1.0827       2       29.996    12.092    0.035699    0.022217
    1.1013       2        29.89    12.092    0.035276    0.022217
      1.12       2       29.785    12.092    0.034862    0.022217
    1.1387       2       29.681    12.092    0.034458    0.022217
    1.1573       2       29.579    12.092    0.034065    0.022217
     1.176       2       29.478    12.092    0.033682    0.022217
    1.1947       2       29.379    12.092     0.03331    0.022217
    1.2133       2       29.281    12.092    0.032948    0.022217
     1.232       2       29.184    12.092    0.032597    0.022217
    1.2507       2       29.089    12.092    0.032257    0.022217
    1.2693       2       28.995    12.092    0.031927    0.022217
     1.288       2       28.902    12.092    0.031608    0.022217
    1.3067       2       28.812    12.092      0.0313    0.022217
    1.3253       2       28.722    12.092    0.031003    0.022217
     1.344       2       28.634    12.092    0.030715    0.022217
      ⋮

Input Arguments

collapse all

Error metrics object, specified as a trackErrorMetrics System object™.

Recorded track log, specified as an array of objects or structures. Alternately, you can specify it as a cell array of objects or structures. Each object or structure must have an UpdateTime property or field, respectively.

If the ErrorFunctionFormat property is specified as 'built-in', each object must be an objectTrack object and each structure must be a track structure. The fields of the track structure should be the same as the properties of the objectTrack object. The track structure must have at least the State, StateCovariance, TrackID, and UpdateTime fields.

Note

You cannot specify tracklog as a cell array that has a mixture of objects and structures.

Recorded truth log, specified as an array of structures, a cell array of structures, or a trackingScenarioRecording object. Each structure must have a Time field.

If the ErrorFunctionFormat property is specified as 'built-in', each structure must at least have these fields.

FieldDescription
TimeTime of the truth, specified as a nonnegative scalar.
PlatformID

Unique identifier for the platform, specified as a positive integer. This is a required field with no default value.

Position

Position of platform in scenario coordinates, specified as a real-valued 1-by-3 row vector.

  • If the coordinateSystem argument is specified as 'Cartesian', Position is the 3-element vector of Cartesian position coordinates in meters.

  • If the coordinateSystem argument is specified as 'Geodetic', Position is the 3-element vector of geodetic coordinates: latitude in degrees, longitude in degrees, and altitude in meters.

Velocity

Velocity of platform in scenario coordinates, specified as a real-valued 1-by-3 row vector. Units are meters per second. The default value is [0 0 0].

You can use the platformPoses function of the trackingScenario object to generate this structure except the Time field, which you can obtain via the SimulationTime property of the trackingScenario object.

Assignment history, specified as an array of structures. Each structure has these fields.

FieldDescription
TimeTime of assignment, specified as a nonnegative scalar.
TrackIDsIDs of tracks, specified as a vector of track IDs.
TruthIDsIDs of truths, specified as a vector of truth IDs.

The corresponding tracks and truths from the TrackIDs and TruthIDs fields are assigned to each other.

Tip

You can use the evaluateBatch function of the trackAssignmentMetrics object to obtain the assignment history between recorded tracks and truths.

Data Types: struct

Output Arguments

collapse all

Cumulative track error metrics, returned as a table. The definition of the table is same as the output of the cumulativeTrackMetrics function.

Cumulative truth error metrics, returned as a table. The definition of the table is same as the output of the cumulativeTruthMetrics function.

Track error history, returned as a table. The definition of the table is same as the output of the currentTrackMetrics function.

Truth error history, returned as a table. The definition of the table is same as the output of the currentTruthMetrics function.

Version History

Introduced in R2023b

expand all