📄 displaytrack.m
字号:
function DisplayTrack(port)
% DISPLAYTRACK Display track log data from GPS on the given serial port
% A program that uses the serial port follows a five-part pattern:
% 1. Create a serial port object.
% 2. Connect the serial port object to a device.
% 3. Optionally set device properties.
% 4. Communicate with the device (read and write data)
% 5. Disconnect from the device and clean up
% Connect to the GPS. This function implements parts 1-3 of the serial
% object usage pattern.
[gps, pid, version, text, protocols] = OpenGPS(port);
% Get the track log data from the GPS (this is part 4 of the pattern)
tracks = ReadTracks(gps);
% Close the connection and clean up (part 5 of the pattern)
CloseGPS(gps);
% Analyze and display the track log data. Not part of the pattern, but a
% program that reads data and does nothing with isn't very interesting.
AnalyzeTracks(tracks);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -