plotTrackLog
Description
plotTrackLog(___,
specifies
the reference frame used to interpret the coordinates of the tracks.frame
)
plotTrackLog(___,
specifies options using one or more name-value arguments. For example,
Name=Value
)plotTrackLog(viewer,tracklog,LineWidth=2)
specifies the width of the
track trajectory line as 2.
Examples
Plot Track Log on Tracking Globe Viewer
Create a trackingGlobeViewer
object and set its reference location. Also, set the camera view.
viewer = trackingGlobeViewer(BaseMap="darkwater",ReferenceLocation=[42.366978 -71.022362 50]);
campos(viewer,[42.3670 -71.0220 110]);
Create a track log that contains five tracks.
tracklog1 = cell(1,5); for t = 1:5 tracklog1{t} = objectTrack(State=[0 0 t*10 0 0 0],UpdateTime=t); end
Plot the track log on the globe viewer.
plotTrackLog(viewer,tracklog1,FontSize=12);
Take a snapshot and show the results.
drawnow snapshot(viewer)
Create a second log of tracks.
tracklog2 = cell(1,5); for t = 1:t tracklog2{t} = objectTrack(State=[10 0 t*10 0 0 0],UpdateTime=t,TrackID=2); end
Plot the second log and only show the labels of the first and last tracks.
sampleTimes = [tracklog2{1}.UpdateTime tracklog2{end}.UpdateTime]; plotTrackLog(viewer,tracklog2,LabelSampling=sampleTimes,FontSize=14);
Take a snapshot and show the results.
drawnow snapshot(viewer)
Plot the first and second logs together on the globe viewer.
tracklogs = [tracklog1{:} tracklog2{:}]; plotTrackLog(viewer,tracklogs,LabelSampling=sampleTimes,FontSize=14);
Take a snapshot and show the results.
drawnow snapshot(viewer)
Input Arguments
viewer
— Tracking globe viewer
trackingGlobeViewer
object
Tracking globe viewer, specified as a trackingGlobeViewer
object.1
tracklog
— Log of tracks
array of objectTrack
objects | cell array of objectDetection
objects
Log of tracks, specified as an array of objectTrack
objects or a cell
array of objectTrack
objects.
frame
— Reference frame
"NED"
(default) | "ENU"
| "ECEF"
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: plotTrackLog(viewer,tracklog,LineWidth=2)
LabelSampling
— Label sampling
vector of nonnegative scalars
Label sampling, specified as a vector of nonnegative scalars of time values. Each
time value in the vector must be the same as the UpdateTime
property of at least one track in the tracklog
input.
PositionSelector
— Position selector
[1 0 0 0 0 0 ; 0 0 1 0 0 0; 0 0 0 0 1
0]
(default) | M-by-N matrix of 0
s and
1
s | cell array of position selector matrices
Position selector, specified as an M-by-N
matrix of 0
s and 1
s, where M
is the dimension of the position state and N is the dimension of
the track state. The selector selects the position state from the track state by
premultiplying the track state. The default value [1 0 0 0 0 0 ; 0 0 1 0 0 0;
0 0 0 0 1 0]
selects [x; y;
z] from a six-dimensional state [x;
vx; y;
vy; z;
vz]. See getTrackPositions
for more details.
Data Types: single
| double
FontSize
— Font size
10
(default) | positive scalar
Font size of the track labels, specified as a positive scalar in point units. One point equals 1/72 inch.
Example: 11
Data Types: single
| double
LineWidth
— Line width of track trajectory line
1
(default) | nonnegative scalar
Line width of the track trajectory line, specified as a nonnegative scalar in point units, where 1 point = 1/72 of an inch.
Tip
If you specify the line width as 0
, then the plot does not
show the trajectory line.
Example: 2
Version History
Introduced in R2023b
See Also
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®.
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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)