Main Content


Plot log of true platforms

Since R2023b



plotPlatformLog(viewer,platlog) plots a log of platforms on the tracking globe viewer.

plotPlatformLog(___,frame) specifies the reference frame used to interpret the coordinates of the platforms.


plotPlatformLog(___,Name=Value) specifies options using one or more name-value pair arguments. For example, plotPlatformLog(viewer,platlog,LineWidth=2) specifies the width of the platform trajectory line as 2.


collapse all

Create a trackingGlobeViewer object and set its reference location. Also, set the camera view.

viewer = trackingGlobeViewer(Basemap="darkwater",ReferenceLocation=[42 -71 50]);
campos(viewer,[42.0002 -71 130]);

Create a platform log that contains five platform positions.

plat1log = cell(1,5);
for t=1:5
    plat1log{t} = struct(PlatformID=1,Position=[t*10 -10 0],Time=t);

Plot the platform log on the globe viewer.


Take a snapshot and show the results.


Create a second log of platforms.

plat2log = cell(1,5);
for t=1:5
    plat2log{t} = struct(PlatformID=2,Position=[t*10 10 0],Time=t);

Plot the second log and display only the labels of the first and last platform positions.

sampleTimes = [plat2log{1}.Time plat2log{end}.Time];

Take a snapshot and show the results.


Plot the first and second logs together on the globe viewer.

platslog = [plat1log(:) plat2log(:)];

Take a snapshot and show the results.


Input Arguments

collapse all

Tracking globe viewer, specified as a trackingGlobeViewer object.1

Log of platforms, specified as an array of platform structures or a cell array of platform structures. Each structure must have these fields.

Field NameDescription
PlatformIDUnique platform identifier, specified as a positive integer.
TimeTime of the platform position, specified as a nonnegative scalar in seconds.

Position of the platform, specified as a three-element real-valued vector. Specify the position in the form [x, y, z], in meters, in your specified reference frame.

Reference frame, specified as "NED" for north-east down, "ENU" for east-north-up, or "ECEF" for Earth-centered-Earth-fixed. When specified as "NED" or "ENU", the origin of the reference frame is at the location specified by the ReferenceLocation property of the viewer object.

Data Types: char | string

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Example: plotPlatformLog(viewer,platlog,LineWidth=2)

Label sampling, specified as a vector of nonnegative scalars of time values. Each time value in the vector must be the same as the Time field of at least one platform in the platlog input.

Font size of the platform labels, specified as a positive scalar in point units. One point equals 1/72 inch.

Example: 11

Data Types: single | double

Line width of the platform trajectory line, specified as a nonnegative scalar in point units, where 1 point = 1/72 of an inch.


If you specify the line width as 0, then the plot does not the show trajectory line.

Example: 2

Color of the trajectory line, specified as an RGB triplet.

Version History

Introduced in R2023b

1 Alignment of boundaries and region labels are a presentation of the feature provided by the data vendors and do not imply endorsement by MathWorks®.