⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 utc2gpst.m

📁 Sky lab calculate position of satellite in GNSS systems and calculate elevation and azimuth them and
💻 M
字号:
function [gpsweek,secs] = utc2gpst (str);%UTC2GPST: Convert time/date string to GPSWEEK / Seconds%% This routine converts a time and date, given as a string in the form of% 'dd-mon-yyyy hh:mm:ss.sss' into the gpsweek and seconds into this% week. If the global variable GPSWEEK (uppercase) is defined, the seconds% will be relative to this week.%% Syntax:%    [gpsweek,secs] = utc2gpst (str);%% Input arguments:%    str    : Date/time string in the form: 'dd-mon-yyyy hh:mm:ss.sss'%% Output arguments:%    gpsweek: gpsweek number%    secs   : Seconds relative to this week%% ----------------------------------------------------------------------% File.....: utc2gpst.m% Date.....: 27-MAY-1999% Version..: 1.0% Author...: Peter Joosten%            Mathematical Geodesy and Positioning%            Delft University of Technology% ----------------------------------------------------------------------% ---------------------------------------% --- Declare global variable GPSWEEK ---% ---------------------------------------global GPSWEEK;% ----------------------% --- Convert string ---% ----------------------[y m d hh mm ss] = datevec (str);gpst    = mjd2gps(ymd2mjd([y m d]));gpst(2) = gpst(2) + 3600*hh + 60*mm + ss;gpsweek = gpst(1);secs    = gpst(2);% -------------------------------------------------------------% --- if GPSWEEK was defined, adapt the results accordingly ---% -------------------------------------------------------------if length(GPSWEEK) ~= 0;  secs    = secs + (gpsweek - GPSWEEK) * 7*24*3600;  gpsweek = GPSWEEK;end ;% --------------------------------% --- End of function utc2gpst ---% --------------------------------

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -