calc_azimuth_elevation.m
来自「gps导航工具包」· M 代码 · 共 29 行
M
29 行
%This Function Compute Azimuth and Elevation of satellite from reciever
%CopyRight By Moein Mehrtash
%************************************************************************
% Written by Moein Mehrtash, Concordia University, 3/21/2008 *
% Email: moeinmehrtash@yahoo.com *
%************************************************************************
% ==================================================================
% Input : *
% Pos_Rcv : XYZ position of reciever (Meter) *
% Pos_SV : XYZ matrix position of GPS satellites (Meter) *
% Output: *
% E :Elevation (Rad) *
% A :Azimuth (Rad) *
%************************************************************************
function [E,A]=Calc_Azimuth_Elevation(Pos_Rcv,Pos_SV);
R=Pos_SV-Pos_Rcv; %vector from Reciever to Satellite
GPS = ECEF2GPS(Pos_Rcv); %Lattitude and Longitude of Reciever
Lat=GPS(1);Lon=GPS(2);
ENU=XYZ2ENU(R,Lat,Lon);
Elevation=asin(ENU(3)/norm(ENU));
Azimuth=atan2(ENU(1)/norm(ENU),ENU(2)/norm(ENU));
E=Elevation;
A=Azimuth;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?