📄 gpscalculate.txt
字号:
% GPSCalculate.m
% Author: Jim Connor (jimconnor99@hotmail.com)
% The rest of the code is processing for display in the MATLAB command window
% The data I chose to display is CEP and mean LAT, LONG and Height
CEP=sprintf(' %f %c',r,'m');
CEP
disp('The mean Latitude, Longitude and Height are:')
if(lat_ref>0) dirLat='N';else dirLat='S';end % Chose correct direction
lat_ref=abs(lat_ref);
deg=floor(lat_ref);
min=(lat_ref-deg)*60; % Calculate DD MM SS from the decimal value
sec=(min -floor(min))*60;
Lat=sprintf(' %d %d %f %c',deg,floor(min),sec,dirLat); % Display Latitude
Lat
if(long_ref>0) dirLong='E';else dirLong='W';end % Chose correct direction
long_ref=abs(long_ref);
deg=floor(long_ref);
min=(long_ref-deg)*60; % Calculate DD MM SS from the decimal value
sec=(min -floor(min))*60;
Long=sprintf(' %d %d %f %c',deg,floor(min),sec,dirLong); % Display Longitude
Long
Height=sprintf(' %f %c',height_ref,'m'); % Display height above sea level
Height
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -