TrackingTruthDataImporter
Description
A TrackingTruthDataImporter
object imports truth data from a XLS, XLSX, TXT, or
CSV file, as well as a MATLAB® table or timetable. You can use its object functions to convert the imported
data into different formats.
Creation
To create an TrackingTruthDataImporter
object, use the Tracking Data Importer app and follow
these steps:
Import truth data.
Define a converter and convert the truth data.
Export an
TrackingTruthDataImporter
object.
Object Functions
trackingScenarioRecording | Create trackingScenarioRecording object from truth
data |
tuningData | Create truth table for tuning from truth data |
truthlog | Create truth log for metric evaluation from truth data |
convertedTable | Create converted table from truth data |
Examples
The Tracking Data Importer enables you to import truth data, convert data units, formats and coordinate systems, visualize the data on a map, and exporting the data in formats compatible with the Sensor Fusion and Tracking Toolbox™.
Launch Tracking Data Importer
To launch the application, either select it from the app gallery:
or, use the command:
>> trackingDataImporter
The app opens and prompts you to import truth data to start.
Import Flight Log File
Import a flight log file named IncheonToNewYorkFlight.xlsx
. The file has seven columns:
time — Flight time, written in the
dd-MMM-yyyy
HH:mm:ss
format.latitude — Flight latitude in degrees.
longitude — Flight longitude in degrees.
altitude — Flight altitude in feet.
speed — Flight speed in miles per hour.
course — Flight course in degrees.
climbrate: Flight climbrate in feet per minute.
Click the Import button and select Import
from
file
. For more information on the import options, see Import. Then, follow the prompts to import the XLSX file from the example folder.
Create New Converter and Convert
Click New Converter and then select Flight
Log
. For more information on different pre-built converters, see New Converter and Converter Options. You can modify the Name, Model Option, and Time Option for the converter.
Map the imported Table to the data elements and select appropriate units.
Click Convert, and the app converts the Imported Table to a Converted Table based on the current converter.
Visualize Data on Globe
You can optionally visualize the converted table data on a globe. Click Visualize and the app displays the trajectory of interest. You can change the camera direction and height of the view by using your mouse. You can highlight data points by clicking any row in either the Imported Table or Converted Table.
Export Truth Data
Once the data conversion is complete, the app enables the Export button on the toolstrip. Click the button and then select Truth Log. Follow the prompts to export the truth log to the workspace. For more information on the export options, see Export and Export Options.
Export TrackingTruthDataImporter
Object
In addition, you can export a TrackingTruthDataImporter
object that holds the core algorithms of the converter and mapping for processing tracking data belonging to the same format.
Loads a saved TrackingTruthDataImporter
object and displays the object properties.
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 tuning data 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 different file, LAToBostonFlightLog.xlsx
, to get a trackingScenarioRecording
.
trackingScenarioRecording(truthImporter,"LAToBostonFlightLog.xlsx")
ans = trackingScenarioRecording with properties: RecordedData: [592×1 struct] CurrentTime: 0 CurrentStep: 0
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
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 tuningData
.
tuningData(truthImporter,"LAToBostonFlightLog.xlsx")
ans=592×6 timetable
Time Position Velocity Acceleration Orientation AngularVelocity AngularAcceleration
_______ _________________________________________ _____________________________ ____________ ______________ _______________ ___________________
0 sec -2.5218e+06 -4.6577e+06 3.5416e+06 -77.713 28.953 -7.9217 0 0 0 1×1 quaternion 0 0 0 0 0 0
16 sec -2.5231e+06 -4.6572e+06 3.5415e+06 -82.176 34.499 -7.7281 0 0 0 1×1 quaternion 0 0 0 0 0 0
32 sec -2.5245e+06 -4.6566e+06 3.5414e+06 -96.133 43.037 -6.7114 0 0 0 1×1 quaternion 0 0 0 0 0 0
48 sec -2.5263e+06 -4.6558e+06 3.5413e+06 -105.19 50.628 -1.2789 0 0 0 1×1 quaternion 0 0 0 0 0 0
65 sec -2.5282e+06 -4.6549e+06 3.5412e+06 -117.73 46.527 -15.043 0 0 0 1×1 quaternion 0 0 0 0 0 0
81 sec -2.53e+06 -4.6544e+06 3.5407e+06 -117.85 12.691 -58.024 0 0 0 1×1 quaternion 0 0 0 0 0 0
99 sec -2.5319e+06 -4.6548e+06 3.539e+06 -72.435 -48.246 -105.09 0 0 0 1×1 quaternion 0 0 0 0 0 0
116 sec -2.5327e+06 -4.6558e+06 3.5373e+06 -34.67 -75.455 -114.39 0 0 0 1×1 quaternion 0 0 0 0 0 0
143 sec -2.5334e+06 -4.658e+06 3.5342e+06 -21.839 -85.468 -117.26 0 0 0 1×1 quaternion 0 0 0 0 0 0
173 sec -2.5342e+06 -4.6607e+06 3.5304e+06 -25.746 -83.519 -118.95 0 0 0 1×1 quaternion 0 0 0 0 0 0
203 sec -2.535e+06 -4.6631e+06 3.527e+06 -31.983 -81.359 -125.45 0 0 0 1×1 quaternion 0 0 0 0 0 0
233 sec -2.5359e+06 -4.6657e+06 3.5229e+06 -19.871 -99.914 -141.51 0 0 0 1×1 quaternion 0 0 0 0 0 0
249 sec -2.5359e+06 -4.6677e+06 3.5205e+06 33.803 -126.8 -136.2 0 0 0 1×1 quaternion 0 0 0 0 0 0
267 sec -2.5346e+06 -4.6699e+06 3.5185e+06 108.5 -138.29 -97.007 0 0 0 1×1 quaternion 0 0 0 0 0 0
288 sec -2.5319e+06 -4.6727e+06 3.517e+06 150.58 -131.16 -57.892 0 0 0 1×1 quaternion 0 0 0 0 0 0
323 sec -2.5261e+06 -4.6773e+06 3.5153e+06 172.24 -124.7 -35.015 0 0 0 1×1 quaternion 0 0 0 0 0 0
⋮
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 truthlog
.
truthlog(truthImporter,"LAToBostonFlightLog.xlsx")
ans=592×1 cell array
{1×1 struct}
{1×1 struct}
{1×1 struct}
{1×1 struct}
{1×1 struct}
{1×1 struct}
{1×1 struct}
{1×1 struct}
{1×1 struct}
{1×1 struct}
{1×1 struct}
{1×1 struct}
{1×1 struct}
{1×1 struct}
{1×1 struct}
{1×1 struct}
⋮
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 convertedTable
.
convertedTable(truthImporter,"LAToBostonFlightLog.xlsx")
ans=592×7 table
Date Time Latitude(degree) Longitude(degree) Altitude(m) Speed(m/s) Course(degree) Climb Rate(m/s)
___________________ ________________ _________________ ___________ __________ ______________ _______________
2024-10-01 00:00:00 33.947 -118.43 67.455 83.15 -99.005 5.1484
2024-10-01 00:00:16 33.945 -118.45 134.76 89.408 -97.281 2.9937
2024-10-01 00:00:32 33.944 -118.46 171.94 105.5 -95.453 2.8752
2024-10-01 00:00:48 33.942 -118.48 232.27 116.68 -92.076 3.9885
2024-10-01 00:01:05 33.941 -118.51 304.33 127.41 -99.498 4.2966
2024-10-01 00:01:21 33.935 -118.53 374 131.88 -123.79 5.0531
2024-10-01 00:01:39 33.917 -118.54 483.17 136.35 -162.69 5.2546
2024-10-01 00:01:56 33.897 -118.55 562.15 141.26 177.73 4.9735
2024-10-01 00:02:23 33.862 -118.54 708.45 146.63 171.51 5.6726
2024-10-01 00:02:53 33.82 -118.53 887.31 147.52 173.27 4.9681
2024-10-01 00:03:23 33.782 -118.53 1015.1 152.89 175.96 2.3517
2024-10-01 00:03:53 33.738 -118.52 1063.8 174.35 170.01 2.3006
2024-10-01 00:04:09 33.711 -118.51 1119.5 189.1 151.5 3.6634
2024-10-01 00:04:27 33.689 -118.49 1189.2 200.72 126.51 4.2575
2024-10-01 00:04:48 33.672 -118.45 1289.1 207.87 110.37 4.1762
2024-10-01 00:05:23 33.653 -118.37 1416.8 215.47 101.94 3.7983
⋮
Version History
Introduced in R2025a
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)