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

📄 trajs.m

📁 GPS TOOLBOX包含以下内容: 1、GPS相关常量和转换因子; 2、角度变换; 3、坐标系转换: &#61656 点变换; &#61656 矩阵变换; &#61656 向量变换
💻 M
字号:
%                                trajs.m
%  Scope:   This MATLAB macro computes the vehicle trajectory with the 
%           following characteristics: straight segment with constant
%           speed in ENU frame; the trajectory is specified in ECEF and
%           ENU frames. WGS-84 constants are used.
%  Usage:   [trajecef,trajenu] = trajs(user0xyz,v0enu,deltat,nsteps)
%  Description of parameters:
%           user0xyz - input, user's initial ECEF position, the components 
%                      are in meters
%           v0enu    - input, ENU velocity vector, the components are in 
%                      meters/second
%           deltat   - input, time step, in seconds
%           nsteps   - input, number of step desired
%           trajecef - output, ECEF position, the components are in meters;
%                      trajecef(k+1,:) is the k-th time step value
%           trajenu  - output, ENU position, the components are in meters;
%                      trajenu(k+1,:) is the k-th time step value; the 
%                      origin is the initial user's position
%  External Matlab macros used:  tecefgd, venuecef, wgs84con
%  Last update:  05/29/00
%  Copyright (C) 1999-00 by LL Consulting. All Rights Reserved.

function  [trajecef,trajenu] = trajs(user0xyz,v0enu,deltat,nsteps)

%  Initialization

[lat,lon,alt] = tecefgd(user0xyz);

trajenu = zeros(nsteps+1,3);
trajecef = zeros(nsteps+1,3);
trajecef(1,:) = user0xyz;

%  Compute ECEF and ENU position at each time step

for k = 1:nsteps
   temp = trajenu(k,:) + v0enu * deltat;
   trajenu(k+1,:) = temp;
   trajecef(k+1,:) = user0xyz + (venuecef(temp,lat,lon))';
end   

⌨️ 快捷键说明

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