how do I use LOS2?

3 次查看(过去 30 天)
Keihan
Keihan 2016-6-27
I'm trying to see if there is line of sight between an aircraft (UA) and a satellite (I5) using LOS. I used the following script:
clear all;
close all;
%satellite coordiantes
I5_lat = 0;
I5_long = 62.2;
I5_alt = 35786000; %m
effectiveradius = 4/3*earthRadius;
actualradius = earthRadius;
%Aircraft Coordinates
UA_lat = 88;
UA_long = -5;
UA_alt = 0;
%region of interest
lat=54:0.1:89.5;
long = -17.1:0.1:43.3;
latlim = [54 89.5];
lonlim = [-17.1 43.3];
layers = wmsfind('nasa.network*elev', 'SearchField', 'serverurl');
layers = wmsupdate(layers);
aster = layers.refine('earthaster', 'SearchField', 'layername');
cellSize = dms2degrees([0,6,0]);
%obtain elevation data for region of interest
[ZA, RA] = wmsread(aster, 'Latlim', latlim, 'Lonlim', lonlim, ...
'CellSize', cellSize, 'ImageFormat', 'image/bil');
%determine if there is Line of sight
vis = los2(double(ZA),RA,UA_lat,UA_long,I5_lat,I5_long,UA_alt,I5_alt,'MSL', ...
'MSL',earthRadius,4/3*earthRadius)
I don't expect there to be line of sight between the aircraft and the satellite when the aircraft is at lat=88deg N and long = 5 deg west, but the LOS2 function returns a '1'. Can you what is wrong with the script?
Thanks, Keihan

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Reference Applications 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by