📄 timetr.m
字号:
% timetr.m
% Scope: This MATLAB macro computes GPS time of transmission from time of
% measurement (reception) for a satellite pseudorange measurement;
% WGS-84 constants are used.
% Usage: xoutput = timetr(tmeas,toc,af,pr)
% Description of parameters:
% tmeas - input, time of measurement (reception), in seconds
% toc - input, reference time of clock (from ephemeris data), in
% seconds
% af - input, array containing ephemeris satellite clock
% parameters af0 --> af(1), af1 --> af(2) and af2 --> af(3)
% pr - input, satellite pseudorange, in meters
% xoutput - output, time of transmission, in seconds
% Remark: The relativistic correction term given by
% delta_tr = F * e * sqrt(a) * sin(Ek)
% where
% F = -4.442807633*10^(-10) sec/(meters)^0.5 in WGS-84
% e is the satellite eccentricity
% a is the satellite semi-major axis
% Ek is ecentric anomaly (time dependent)
% can be added to delta_ts to improved the computational accuracy.
% External Matlab macros used: wgs84con
% Last update: 04/16/00
% Copyright (C) 2000 by LL Consulting. All Rights Reserved.
function xoutput = timetr(tmeas,toc,af,pr)
wgs84con;
% global constants used: c_speed
% Compute the predicted satellite clock error at time of measurement
% (reception)
temp = tmeas - toc;
delta_ts = af(1) + (af(2) + af(3)*temp)*temp;
% Compute the time of transmission
xoutput = tmeas - pr/c - delta_ts;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -