Contenuto principale

Import Multi-Domain Truth Data Using Tracking Data Importer

R2026b
Since R2026b

This example shows how to import multi-domain truth data from marine, ground, and aerial platforms using the Tracking Data Importer app. The imported data sets span different file types, time formats, and coordinate reference frames.

The general workflow is as follows:

  1. Import — Import truth data files in the form of spreadsheet, text file, or CSV file.

  2. Convert — Convert the truth data to a standard format via modeling and mapping.

  3. Visualize — Validate the imported and converted data by visualizing trajectories on a globe.

  4. Export — Export the data in a format of choice. You can also export a standalone reader object for processing similar truth data files outside of the app.

Scenario Overview

The data represents a 2-hour environmental monitoring operation at Moss Landing Harbor, California. During a quarterly ecological survey, multiple sensor systems log platform positions simultaneously:

  • An AIS/VTS receiver logs marine vessel positions to an Excel spreadsheet with Unix epoch timestamps.

  • A fleet GPS system logs ground vehicle positions to text files with datetime strings.

  • A drone telemetry downlink logs UAV position to a CSV file with ISO 8601 timestamps.

To bring these data sources into a unified data set, use the Tracking Data Importer app.

Download Data

Download the support data from https://ssd.mathworks.com/supportfiles/fusion/data/Multi_Domain_Tracking_Truth_Dataset.zip . The data set includes marine vessel AIS positions, ground vehicle GPS logs, and drone NED telemetry across four files. Use the helperDownloadSupportFiles supporting function to download and extract the data files to your current working directory.

dataFolder = helperDownloadSupportFiles();
Downloading Multi_Domain_Tracking_Truth_Dataset.zip ...

Data Files

The example includes four data files. Each file uses a different format and timestamp convention.

File

Domain

Platforms

Rows

Rate

Data Time Format

vessels_marine_geodetic.xlsx

Marine

14

20,174

0.2 Hz

Unix epoch (s)

ground_ops_fleet_geodetic.txt

Ground (Ops)

4

288,004

10 Hz

yyyy/MM/dd HH:mm:ss.SSS

ground_harbor_traffic_geodetic.txt

Ground (Traffic)

8

576,008

10 Hz

yyyy/MM/dd HH:mm:ss.SSS

drone_survey_ned.csv

Aerial

1

7,201

1 Hz

yyyy-MM-dd'T'HH:mm:ss'Z'

The marine and ground vehicle files contain geodetic (latitude/longitude/altitude) position data. The drone file contains North-East-Down (NED) position data relative to a fixed origin. The drone NED frame has its origin altitude set to −80 m below mean sea level (MSL). This offset ensures that the drone trajectory appears at approximately +80 m above MSL in the visualization because the Down axis points toward the Earth.

Open the App

Navigate to the example folder, then launch the Tracking Data Importer app.

trackingDataImporter

Import Marine Vessel AIS Feed (XLSX)

Import File

Click the Import button on the toolstrip and select Import from file. Navigate to and select vessels_marine_geodetic.xlsx. The app loads the file and displays the raw columns in the Raw Table.

Define Converter

Click the New Converter button and choose GPS. The GPS converter accepts geodetic position data (latitude, longitude, altitude) and is a natural fit for AIS/VTS vessel logs. After creating the converter, the Source Table shows the source-to-converter association and the conversion status. Click Confirm to proceed.

Map DateTime Data Element

In the Mapping Table, configure the time parsing:

  • Match To → Epoch_s

  • Data Type → Numeric

  • Units → Seconds

  • Start From → posix (1970-01-01 00:00:00 UTC)

This file stores time as a numeric Unix epoch. The value 1745394600.0 corresponds to 2026-04-23 07:30:00 UTC.

Map Other Data Elements

Select MMSI from the PlatformID dropdown. MMSI (Maritime Mobile Service Identity) is the standard vessel identifier in AIS data.

Map the geodetic position columns and Local NED velocity:

  • Latitude → Lat_deg, Longitude → Lon_deg, Altitude → Alt_m

  • Vx → Vnorth_mps, Vy → Veast_mps, Vz → Vdown_mps

Convert and Visualize

The Source Table shows the source as ready to convert. Click Convert. The app parses the Unix epoch values and displays 20,174 rows across 14 vessels at 5-second intervals (0.2 Hz) in the Converted Table.

Click Visualize to open the tracking globe viewer and see the marine vessel trajectories at sea level.

Import Ground Vehicle Fleet GPS (TXT)

Two files contain the ground vehicle data: an operations fleet file (4 vehicles) and a harbor traffic file (8 vehicles).

Import Files

Click Import and select both ground_ops_fleet_geodetic.txt and ground_harbor_traffic_geodetic.txt.

Define Converter

Right-click the marine GPS converter in the Source Table and select Duplicate. This creates a copy with the same GPS settings. Drag the two ground sources onto the duplicated converter to assign them. Optionally, right-click the converter to rename it for clarity.

Map Columns

In the Mapping Table, configure the column mapping for the ground sources:

  • Match To → Timestamp, Data Type → DateTimeString, Format → yyyy/MM/dd HH:mm:ss.SSS

  • PlatformID → VehicleID

  • Latitude → Lat_deg, Longitude → Lon_deg, Altitude → Alt_m

  • Vx → Vnorth_mps, Vy → Veast_mps, Vz → Vdown_mps

The .SSS field is critical for this file. Without it, the app truncates sub-second precision and collapses 10 Hz data (one sample every 100 ms) into 1 Hz—losing 90% of the data points.

Convert and Visualize

The Source Table shows the sources as ready to convert. Click Convert. The app parses the datetime strings with millisecond precision and displays 864,012 rows across 12 platforms in the Converted Table.

Click Visualize to update the globe. The ground vehicle trajectories now appear at road surface altitude alongside the marine vessels.

Import Drone Telemetry (CSV)

Import File

Click Import and select drone_survey_ned.csv. The app loads the file and displays the raw columns in the Raw Table.

Define Converter

Click New Converter and select Custom. In the model options, set Coordinate Type to Cartesian, Frame Type to Fixed NED, and Target Extent to Point. This converter accepts North-East-Down coordinates relative to a fixed origin.

Set the NED reference origin:

  • Latitude: 36.8060

  • Longitude: -121.7910

  • Altitude: -80

The origin altitude of −80 m places the NED frame below MSL. Since the drone flies at approximately Down = −80 m in this frame, its trajectory appears at roughly +80 m above MSL in the visualization.

Map Columns

In the Mapping Table, configure the column mapping:

  • Match To → Timestamp_ISO8601, Data Type → DateTimeString, Format → yyyy-MM-dd'T'HH:mm:ss'Z'

  • PlatformID → DroneID

  • X → North_m, Y → East_m, Z → Down_m

  • Vx → Vnorth_mps, Vy → Veast_mps, Vz → Vdown_mps

Convert and Visualize

The Source Table shows the source as ready to convert. Click Convert. The app parses the ISO 8601 timestamps and displays 7,201 rows for one platform in the Converted Table.

Click Visualize to update the globe with all platforms.

Visualize All Platforms on Globe

The tracking globe viewer now renders all platform trajectories simultaneously with natural altitude separation:

  • Marine vessel trajectories at sea level (0 m), tracing paths through the harbor channel and offshore.

  • Ground vehicle trajectories at road surface (2 m), following Highway 1, Jetty Road, Sandholdt Road, and Moss Landing Road.

  • The drone trajectory at survey altitude (80 m), repeating surveillance loops over the harbor.

To inspect individual trajectories, right-click any timestamp in the Converted Table and select Highlight all platform poses at this time. Click Visualize to see the selected poses marked in red with their platform IDs, making it easy to identify specific platforms among overlapping paths.

Export Truth Data

Once you convert all sources, the app enables the Export button on the toolstrip. The app offers four export formats:

Format

Description

trackingScenarioRecording

Replay the scenario in sensor simulations and tracker development

Tuning Data

Timetable format for sensor fusion filter tuning and parameter estimation

Truth Log

Struct array for tracking performance metric evaluation (OSPA, GOSPA)

Converted Table

MATLAB table for general analysis and custom workflows

Select Truth Log, then specify a variable name (for example, truthLog). Set Coordinate Type to Geodetic and Frame Type to Local NED. You can also export a Reader object to reuse the configured converters and column mappings on new data files without repeating the import workflow. Use Export ID Conversion Information to save the platform ID mapping for reference. Click Export to save the truth log to the MATLAB workspace.

Summary

In this example, you used the Tracking Data Importer app to import multi-domain truth data from three independent sensor systems. You learned how to:

  • Import multiple files with different formats (CSV, TXT, XLSX).

  • Configure timestamp parsing for Unix epoch numeric values, millisecond-precision datetime strings, and ISO 8601 strings.

  • Map position and velocity columns to GPS and Fixed NED coordinate schemas.

  • Duplicate and manage converters for sources that share the same format.

  • Visualize platform trajectories incrementally on the tracking globe viewer.

  • Export the unified data set as a Truth Log for tracking performance evaluation.

The Tracking Data Importer handles data heterogeneity transparently. It unifies different file formats, timestamp conventions, sample rates, and coordinate systems into a single coherent multi-platform data set ready for tracking algorithm development and evaluation.

Helper Function

helperDownloadSupportFiles downloads and extracts the support data files for this example.

function dataFolder = helperDownloadSupportFiles()
% Download support files for the Import Multi-Domain Truth Data example.
dataFolder = pwd;
dataFileName = "Multi_Domain_Tracking_Truth_Dataset.zip";
url = "https://ssd.mathworks.com/supportfiles/fusion/data/" + dataFileName;
filePath = fullfile(dataFolder,dataFileName);

requiredFiles = ["vessels_marine_geodetic.xlsx", ...
    "ground_ops_fleet_geodetic.txt", ...
    "ground_harbor_traffic_geodetic.txt", ...
    "drone_survey_ned.csv"];
missingFiles = ~arrayfun(@(f) exist(fullfile(dataFolder,f),"file"), requiredFiles);
if any(missingFiles)
    disp("Downloading " + dataFileName + " ...");
    websave(filePath,url);
    unzip(filePath,dataFolder);
    delete(filePath);
end
end

See Also

Apps

Topics