|
| 1 | +%% IERS Management of IERS time and polar motion data |
| 2 | +% |
| 3 | +% Last modified: 2018/02/01 Meysam Mahooti |
| 4 | +% |
| 5 | +% Meysam Mahooti (2025). |
| 6 | +% ECI2ECEF & ECEF2ECI Transformations |
| 7 | +% https://www.mathworks.com/matlabcentral/fileexchange/61957-eci2ecef-ecef2eci-transformations) |
| 8 | +% MATLAB Central File Exchange. |
| 9 | + |
| 10 | +function [x_pole,y_pole,UT1_UTC,LOD,dpsi,deps,dx_pole,dy_pole,TAI_UTC] = IERS(eop,Mjd_UTC,interp) |
| 11 | +arguments |
| 12 | + eop (13,:) {mustBeReal} |
| 13 | + Mjd_UTC (1,1) {mustBeReal, mustBePositive, mustBeFinite} |
| 14 | + interp {mustBeTextScalar} = 'n' |
| 15 | +end |
| 16 | + |
| 17 | +Arcs = 3600*180/pi; |
| 18 | + |
| 19 | +mjd = floor(Mjd_UTC); |
| 20 | +i = find(mjd==eop(4,:),1,'first'); |
| 21 | + |
| 22 | +switch interp |
| 23 | + case 'l' |
| 24 | + % linear interpolation |
| 25 | + preeop = eop(:,i); |
| 26 | + nexteop = eop(:,i+1); |
| 27 | + fixf = Mjd_UTC-floor(Mjd_UTC); |
| 28 | + % Setting of IERS Earth rotation parameters |
| 29 | + % (UT1-UTC [s], TAI-UTC [s], x ["], y ["]) |
| 30 | + x_pole = preeop(5)+(nexteop(5)-preeop(5))*fixf; |
| 31 | + y_pole = preeop(6)+(nexteop(6)-preeop(6))*fixf; |
| 32 | + UT1_UTC = preeop(7)+(nexteop(7)-preeop(7))*fixf; |
| 33 | + LOD = preeop(8)+(nexteop(8)-preeop(8))*fixf; |
| 34 | + dpsi = preeop(9)+(nexteop(9)-preeop(9))*fixf; |
| 35 | + deps = preeop(10)+(nexteop(10)-preeop(10))*fixf; |
| 36 | + dx_pole = preeop(11)+(nexteop(11)-preeop(11))*fixf; |
| 37 | + dy_pole = preeop(12)+(nexteop(12)-preeop(12))*fixf; |
| 38 | + TAI_UTC = preeop(13); |
| 39 | + |
| 40 | + x_pole = x_pole/Arcs; % Pole coordinate [rad] |
| 41 | + y_pole = y_pole/Arcs; % Pole coordinate [rad] |
| 42 | + dpsi = dpsi/Arcs; |
| 43 | + deps = deps/Arcs; |
| 44 | + dx_pole = dx_pole/Arcs; % Pole coordinate [rad] |
| 45 | + dy_pole = dy_pole/Arcs; % Pole coordinate [rad] |
| 46 | + case 'n' |
| 47 | + eop = eop(:,i); |
| 48 | + % Setting of IERS Earth rotation parameters |
| 49 | + % (UT1-UTC [s], TAI-UTC [s], x ["], y ["]) |
| 50 | + x_pole = eop(5)/Arcs; % Pole coordinate [rad] |
| 51 | + y_pole = eop(6)/Arcs; % Pole coordinate [rad] |
| 52 | + UT1_UTC = eop(7); % UT1-UTC time difference [s] |
| 53 | + LOD = eop(8); % Length of day [s] |
| 54 | + dpsi = eop(9)/Arcs; |
| 55 | + deps = eop(10)/Arcs; |
| 56 | + dx_pole = eop(11)/Arcs; % Pole coordinate [rad] |
| 57 | + dy_pole = eop(12)/Arcs; % Pole coordinate [rad] |
| 58 | + TAI_UTC = eop(13); % TAI-UTC time difference [s] |
| 59 | +end |
| 60 | + |
| 61 | +end |
0 commit comments