limit elevation angles for a phased array on a platform/aircraft to satellite

13 views (last 30 days)
except I do not know how to limit the elevation angles to the satellite such as can be done with a ground station very easily as in the ground station code below:
% Create a satellite scenario with AutoSimulate set to false
sc = satelliteScenario('AutoSimulate', false);
% Define the satellite with a higher orbit
semiMajorAxis = 7000e3; % Semi-major axis in meters (higher orbit)
eccentricity = 0.001; % Eccentricity
inclination = 90; % Inclination in degrees (adjusted for closer pass)
rightAscension = 164.5; % 105 Right ascension of the ascending node in degrees (adjusted for longitude)
argumentOfPeriapsis = 0; % Argument of periapsis in degrees
trueAnomaly = 0; % True anomaly in degrees
sat = satellite(sc, semiMajorAxis, eccentricity, inclination, ...
rightAscension, argumentOfPeriapsis, trueAnomaly);
% Set the elevation range
minElevation = 37; % Minimum elevation in degrees
maxElevation = 90; % Maximum elevation in degrees
% Define the ground station (representing the aircraft)
gs = groundStation(sc, 'Name', 'MyAircraft', 'Latitude', 40.0150,...
'Longitude', -105.2705, 'Altitude', 10000, 'MinElevationAngle',minElevation);
It is a built in property of the grounStation function. How can I use the above example, but limit the elevation angles like in the groundStation property?
This is some of the aircraft code:
waypoints = [... % Latitude (deg), Longitude (deg), Altitude (meters)
40.6289,-73.7738,3;...
40.6325,-73.7819,3;...
40.6341,-73.7852,44;...
40.6400,-73.7974,265;...
40.6171,-73.8618,1012;...
40.5787,-73.8585,1698;...
39.1452,-71.6083,11270;...
34.2281,-66.0839,11264;...
32.4248,-64.4389,970;...
32.3476,-64.4565,574;...
32.3320,-64.4915,452;...
32.3459,-64.5712,453;...
32.3610,-64.6612,18;...
32.3621,-64.6678,3;...
32.3639,-64.6777,3];
timeOfArrival = duration([... % time (HH:mm:ss)
"00:00:00";...
"00:00:20";...
"00:00:27";...
"00:00:43";...
"00:01:47";...
"00:02:21";...
"00:21:25";...
"01:32:39";...
"01:54:27";...
"01:55:47";...
"01:56:27";...
"01:57:48";...
"01:59:49";...
"01:59:55";...
"02:00:15"]);
trajectory = geoTrajectory(waypoints,seconds(timeOfArrival),'SampleRate',sampleTime,...
'SamplesPerFrame', 10, AutoPitch=true,AutoBank=true);
minElevationAngle = 30; % degrees
aircraft = platform(sc,trajectory, Name="Aircraft", Visual3DModel="airplane.glb");
The limits I want to impose on the simulation and viewing are from elevation = 90 to 30.
Thank you for the help

Answers (1)

Shishir Reddy
Shishir Reddy on 28 Aug 2024
Edited: Shishir Reddy on 28 Aug 2024
Hey Mike
Ground stations have fixed locations on Earth. This makes the calculation of elevation angles relatively straightforward since the ground station's position doesn't change over time.
Unlike a ground station, an aircraft moves along a trajectory. This dynamic movement means the position relative to a satellite changes continuously, requiring real-time calculation of elevation angles throughout the simulation.
The elevation angle can be calculated based on the positions of aircraft and satellite as follows.
function elevationAngle = calculateElevationAngle(aircraftPos, satPos)
[lat1, lon1, alt1] = aircraftPos;
[lat2, lon2, alt2] = satPos;
lat1 = deg2rad(lat1);
lon1 = deg2rad(lon1);
lat2 = deg2rad(lat2);
lon2 = deg2rad(lon2);
dLat = lat2 - lat1;
dLon = lon2 - lon1;
a = sin(dLat/2)^2 + cos(lat1) * cos(lat2) * sin(dLon/2)^2;
% This is a simplified calculation for spherical Earth
c = 2 * atan2(sqrt(a), sqrt(1-a));
distance = 6371000 * c; % Earth radius
elevationAngle = atan2((alt2 - alt1), distance);
elevationAngle = rad2deg(elevationAngle);
end
Using the above script which computes the elevation angle, the restrictions can be imposed by using simple ‘if’ statement as follows.
minElevationAngle = 30;
maxElevationAngle = 90;
for t = 1:length(timeOfArrival)
elevationAngle = calculateElevationAngle(aircraftPos, satPos);
if elevationAngle < minElevationAngle || elevationAngle > maxElevationAngle
% aircraftPos, satPos are positions at time t.
fprintf('Invalid elevation angle at time %s: %f degrees\n', timeOfArrival(t), elevationAngle);
break;
end
end
I hope this helps.
  1 Comment
Mike Susedik
Mike Susedik on 28 Aug 2024
Hello Shashir, thank you for your well explained answer and code.
I can calculate EL and AZ values and filter them, even using the AER report provided by Matlab. If I use the example as-is, the visualization shows the aircraft attaching to more satellites than possible considering the limited to the elevation angles acceptable. The ground station function does limit the number of satellites available and the . I do understand there are a lot more to the calculation of the look angle for an aircraft, including items like the roll, pitch, yaw. For both the toolboxes I listed, Satellite and Aerospace there is a function called an AER report which provides the required angles and ranges.
The problem is the visualization and knowing the satellites it has connected. i need to do a link budget to these satellites addiationally and ideally change the RF parameters of the satellites to varying performance values to determine statistical performance. When there is an enough satellites connected, it is a real mess.... I need to be able to limit the elevation angles at a minimum for the visualization and access calculations.
Thank you, but I need additional help.

Sign in to comment.

Categories

Find more on Reference Applications in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!