veciecef.m
来自「GPS TOOLBOX包含以下内容: 1、GPS相关常量和转换因子; 2、角」· M 代码 · 共 31 行
M
31 行
% veciecef.m
% Scope: This MATLAB macro performs the transformation from ECI (Earth
% Centered Inertial) to ECEF coordinates for a given position vector
% and time elapsed since reference time; WGS-84 earth's rotation
% rate constant is used.
% Usage: pecef = veciecef(peci,dtime)
% Description of parameters:
% peci - input, ECI position vector (with components in meters)
% dtime - input, time elapsed since reference time in seconds
% pecef - output, ECEF position vector, with components in
% same units as the input ECI position vector
% Remarks: The ECI to ECEF transformation takes into account only Earth's
% rotation, i.e. no Earth's precession and mutation effects.
% External Matlab macros used: wgs84con
% Last update: 04/05/00
% Copyright (C) 1997-00 by LL Consulting. All Rights Reserved.
function pecef = veciecef(peci,dtime)
wgs84con;
% global constants used: rot_rate (WGS-84 earth's rotation rate, in rad/sec)
swie = sin(rot_rate*dtime);
cwie = cos(rot_rate*dtime);
pecef = zeros(3,1);
pecef(1) = peci(1) * cwie + peci(2) * swie;
pecef(2) = peci(1) * swie - peci(2) * cwie;
pecef(3) = peci(3);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?