主要内容

trackingScenarioRecording

Create trackingScenarioRecording object from truth data

Since R2025a

    Description

    tsRecording = trackingScenarioRecording(importer,source) returns a trackingScenarioRecording object based on the source input.

    example

    [tsRecording,info] = trackingScenarioRecording(importer,source) also returns info, which contains the platform IDs and class IDs mapping tables.

    Examples

    collapse all

    Loads a saved truth TrackingTruthDataImporter object and displays the object properties. For more information on the creation of the TrackingTruthDataImporter object, see the Import Data Using Tracking Data Importer App example.

    load truthImporterFile.mat;
    truthImporter
    truthImporter = 
    TrackingTruthDataImporter with configurations:
    
    Converter Name: FlightLog1
    Input File Format: spreadsheet
    Input Data Information: 
            Category:  Flight Log
          Frame Type:  Local NED
    
    Elements and Mapping: 
         State Element     Unit       Original Column     Unit(Format)                         
         -------------     ------     ---------------     -------------------------------------     
         Date Time         sec        time                datetime string(dd-MMM-yyyy HH:mm:ss)
         Latitude          degree     latitude            degree                               
         Longitude         degree     longitude           degree                               
         Altitude          m          altitude            ft                                   
         Speed             m/s        speed               mi/h                                 
         Course            degree     course              degree                               
         Climb Rate        m/s        climbrate           ft/m                                 
    
    Output Data Information: 
          Coordinate Type:  Cartesian
               Frame Type:  ECEF
    
    Usage: 
          trackingScenarioRecording:  Export as a trackingScenarioRecording object for playing and metric evaluation
                           truthlog:  Export as a truth log structure for metric evaluation
                         tuningData:  Export as a tuning data structure for tracking filter turning
                     convertedTable:  Export converted table
    
    

    Apply the truthImporter object to a flight log named LAToBostonFlightLog.xlsx, to get a trackingScenarioRecording object.

    trackingScenarioRecording(truthImporter,"LAToBostonFlightLog.xlsx")
    ans = 
      trackingScenarioRecording with properties:
    
        RecordedData: [592×1 struct]
         CurrentTime: 0
         CurrentStep: 0
    
    

    Input Arguments

    collapse all

    Tracking truth data importer, specified as a TrackingTruthDataImporter object. You can use the Tracking Data Importer app to create these objects.

    Data source to read, specified as a string scalar representing the path to a data file, or as a MATLAB table or timetable from workspace.

    For details on the exact format requirements for the file or table, see the display of the importer object.

    Example: "./flight_log.csv"

    Output Arguments

    collapse all

    Tracking scenario recording, returned as a trackingScenarioRecording object. You can use the play function to play these recordings.

    Tip

    For optimal playback capability, export the data to a fixed North-East-Down (NED) frame.

    Platform IDs and class IDs mapping information, returned as a structure that contains two fields:

    • PlatformIDMapping — Mapping relationship between platform IDs in the source and exported platform IDs, returned as a dictionary object.

    • ClassIDMapping — Mapping relationship between class IDs in the source and exported class IDs, returned as a dictionary object.

    Version History

    Introduced in R2025a