How to use pointAt() to point ground stations gimbals at different satellites at different time in satellite constellation to study link margin?
I’m trying to study link budget of ground stations and satellite constellation.
I’ve gone through the exapmle "https://in.mathworks.com/help/satcom/ug/multihop-satellite-communication.html". This example shows one ground station (GS1) pointing at one satellite (sat1) and another ground station (GS2) at another satellite (sat2), and then calculating link margin from GS1 to GS2.
Im trying to extend this example by using satellite constellation where a ground station can use the presently visible satellite and switch to next one after the crossing of the satellite.
I’ve tried it using the below code
sc = satelliteScenario(startTime, stopTime, sampleTime, ‘AutoSimulate’,true);
plotRaditationPattern = true;
% Add ground stations
gsMumbai = groundStation(sc, ‘Name’, ‘BOM GS’, ‘Latitude’, 19.0760, ‘Longitude’, 72.8777); % Mumbai Ground Station
ueBengaluru = groundStation(sc, ‘Name’, ‘BLR UE’, ‘Latitude’, 12.9716, ‘Longitude’, 77.5946); % User Equipment in Bengaluru
% Add LEO satellite constellation (Keplerian elements)
numSatellites = 40;
semiMajorAxis = 7000e3 * ones(1, numSatellites); % Approximate altitude for LEO
eccentricity = zeros(1, numSatellites);
argumentOfPeriapsis = 13*ones(1, numSatellites);
trueAnomaly = linspace(0, 360, numSatellites); % Distribute satellites around the orbit
inclination = 40 * ones(1, numSatellites); % Common inclination for constellations
rightAscensionOfAscendingNode = linspace(0, 360, numSatellites);
[accessIntervalsGS2GS, acessGS2GS] = getSource2TargetPaths(gsMumbai, ueBengaluru, satArray, 1,false);
disp(‘Ground station to Ground Station Access Intervals with max 1 hop:’);
disp(accessIntervalsGS2GS);
sc.AutoSimulate = false;
restart(sc);
disp(sc.SimulationStatus)
% Iterate over the simulation time and dynamically point the gimbal at the correct satellite
while sc.SimulationTime <= sc.StopTime
currentSimTime = sc.SimulationTime; % Get the current simulation time
% Check the access intervals to find the satellite that is visible at this time
for i = 1:height(accessIntervalsGS2GS)
% Get the access interval start and end times
intervalStart = accessIntervalsGS2GS(i, 4);
intervalEnd = accessIntervalsGS2GS(i, 5);
% If the current simulation time is within the access interval
if currentSimTime >= intervalStart.Variables && currentSimTime <= intervalEnd.Variables
% Get the satellite associated with this access interval using acessGS2GS
satID = acessGS2GS(i).Sequence(2); % Source asset ID (Satellite ID)
% Find the corresponding satellite object in satArray using the ID
for j = 1:numel(satArray)
if satArray(j).ID == satID
% Point the gimbal at the satellite
pointAt(gimbalGSMumbaitx, satArray(j));
pointAt(gimbalUErx, satArray(j));
break; % Stop after pointing at the correct satellite
end
end
end
end
% Update the simulation time step
if (sc.SimulationStatus ~= "Completed") && (seconds(sc.StopTime – sc.SimulationTime) > sc.SampleTime)
disp(sc.SimulationTime)
advance(sc);
else
break;
end
end
% restart(sc);
sc.AutoSimulate = true;
[linksIntervalsGS2GS, linksGS2GS] = getSource2TargetPathLinks(gsMumbai, ueBengaluru, satArray, 1, false);
disp(‘Ground station to Ground Station Access Intervals with max 1 hops:’);
disp(linksIntervalsGS2GS);
However the pointAt() function causes the ground stations to point only at the last satellite, so for whole simulation they are pointing at only 1 satellite.
How to dynamically point ground stations to the passing satellites at different times of the simulations.?
This should give us link margin between the two ground stations all the time whenver a satellite connects to both the ground stations.I’m trying to study link budget of ground stations and satellite constellation.
I’ve gone through the exapmle "https://in.mathworks.com/help/satcom/ug/multihop-satellite-communication.html". This example shows one ground station (GS1) pointing at one satellite (sat1) and another ground station (GS2) at another satellite (sat2), and then calculating link margin from GS1 to GS2.
Im trying to extend this example by using satellite constellation where a ground station can use the presently visible satellite and switch to next one after the crossing of the satellite.
I’ve tried it using the below code
sc = satelliteScenario(startTime, stopTime, sampleTime, ‘AutoSimulate’,true);
plotRaditationPattern = true;
% Add ground stations
gsMumbai = groundStation(sc, ‘Name’, ‘BOM GS’, ‘Latitude’, 19.0760, ‘Longitude’, 72.8777); % Mumbai Ground Station
ueBengaluru = groundStation(sc, ‘Name’, ‘BLR UE’, ‘Latitude’, 12.9716, ‘Longitude’, 77.5946); % User Equipment in Bengaluru
% Add LEO satellite constellation (Keplerian elements)
numSatellites = 40;
semiMajorAxis = 7000e3 * ones(1, numSatellites); % Approximate altitude for LEO
eccentricity = zeros(1, numSatellites);
argumentOfPeriapsis = 13*ones(1, numSatellites);
trueAnomaly = linspace(0, 360, numSatellites); % Distribute satellites around the orbit
inclination = 40 * ones(1, numSatellites); % Common inclination for constellations
rightAscensionOfAscendingNode = linspace(0, 360, numSatellites);
[accessIntervalsGS2GS, acessGS2GS] = getSource2TargetPaths(gsMumbai, ueBengaluru, satArray, 1,false);
disp(‘Ground station to Ground Station Access Intervals with max 1 hop:’);
disp(accessIntervalsGS2GS);
sc.AutoSimulate = false;
restart(sc);
disp(sc.SimulationStatus)
% Iterate over the simulation time and dynamically point the gimbal at the correct satellite
while sc.SimulationTime <= sc.StopTime
currentSimTime = sc.SimulationTime; % Get the current simulation time
% Check the access intervals to find the satellite that is visible at this time
for i = 1:height(accessIntervalsGS2GS)
% Get the access interval start and end times
intervalStart = accessIntervalsGS2GS(i, 4);
intervalEnd = accessIntervalsGS2GS(i, 5);
% If the current simulation time is within the access interval
if currentSimTime >= intervalStart.Variables && currentSimTime <= intervalEnd.Variables
% Get the satellite associated with this access interval using acessGS2GS
satID = acessGS2GS(i).Sequence(2); % Source asset ID (Satellite ID)
% Find the corresponding satellite object in satArray using the ID
for j = 1:numel(satArray)
if satArray(j).ID == satID
% Point the gimbal at the satellite
pointAt(gimbalGSMumbaitx, satArray(j));
pointAt(gimbalUErx, satArray(j));
break; % Stop after pointing at the correct satellite
end
end
end
end
% Update the simulation time step
if (sc.SimulationStatus ~= "Completed") && (seconds(sc.StopTime – sc.SimulationTime) > sc.SampleTime)
disp(sc.SimulationTime)
advance(sc);
else
break;
end
end
% restart(sc);
sc.AutoSimulate = true;
[linksIntervalsGS2GS, linksGS2GS] = getSource2TargetPathLinks(gsMumbai, ueBengaluru, satArray, 1, false);
disp(‘Ground station to Ground Station Access Intervals with max 1 hops:’);
disp(linksIntervalsGS2GS);
However the pointAt() function causes the ground stations to point only at the last satellite, so for whole simulation they are pointing at only 1 satellite.
How to dynamically point ground stations to the passing satellites at different times of the simulations.?
This should give us link margin between the two ground stations all the time whenver a satellite connects to both the ground stations. I’m trying to study link budget of ground stations and satellite constellation.
I’ve gone through the exapmle "https://in.mathworks.com/help/satcom/ug/multihop-satellite-communication.html". This example shows one ground station (GS1) pointing at one satellite (sat1) and another ground station (GS2) at another satellite (sat2), and then calculating link margin from GS1 to GS2.
Im trying to extend this example by using satellite constellation where a ground station can use the presently visible satellite and switch to next one after the crossing of the satellite.
I’ve tried it using the below code
sc = satelliteScenario(startTime, stopTime, sampleTime, ‘AutoSimulate’,true);
plotRaditationPattern = true;
% Add ground stations
gsMumbai = groundStation(sc, ‘Name’, ‘BOM GS’, ‘Latitude’, 19.0760, ‘Longitude’, 72.8777); % Mumbai Ground Station
ueBengaluru = groundStation(sc, ‘Name’, ‘BLR UE’, ‘Latitude’, 12.9716, ‘Longitude’, 77.5946); % User Equipment in Bengaluru
% Add LEO satellite constellation (Keplerian elements)
numSatellites = 40;
semiMajorAxis = 7000e3 * ones(1, numSatellites); % Approximate altitude for LEO
eccentricity = zeros(1, numSatellites);
argumentOfPeriapsis = 13*ones(1, numSatellites);
trueAnomaly = linspace(0, 360, numSatellites); % Distribute satellites around the orbit
inclination = 40 * ones(1, numSatellites); % Common inclination for constellations
rightAscensionOfAscendingNode = linspace(0, 360, numSatellites);
[accessIntervalsGS2GS, acessGS2GS] = getSource2TargetPaths(gsMumbai, ueBengaluru, satArray, 1,false);
disp(‘Ground station to Ground Station Access Intervals with max 1 hop:’);
disp(accessIntervalsGS2GS);
sc.AutoSimulate = false;
restart(sc);
disp(sc.SimulationStatus)
% Iterate over the simulation time and dynamically point the gimbal at the correct satellite
while sc.SimulationTime <= sc.StopTime
currentSimTime = sc.SimulationTime; % Get the current simulation time
% Check the access intervals to find the satellite that is visible at this time
for i = 1:height(accessIntervalsGS2GS)
% Get the access interval start and end times
intervalStart = accessIntervalsGS2GS(i, 4);
intervalEnd = accessIntervalsGS2GS(i, 5);
% If the current simulation time is within the access interval
if currentSimTime >= intervalStart.Variables && currentSimTime <= intervalEnd.Variables
% Get the satellite associated with this access interval using acessGS2GS
satID = acessGS2GS(i).Sequence(2); % Source asset ID (Satellite ID)
% Find the corresponding satellite object in satArray using the ID
for j = 1:numel(satArray)
if satArray(j).ID == satID
% Point the gimbal at the satellite
pointAt(gimbalGSMumbaitx, satArray(j));
pointAt(gimbalUErx, satArray(j));
break; % Stop after pointing at the correct satellite
end
end
end
end
% Update the simulation time step
if (sc.SimulationStatus ~= "Completed") && (seconds(sc.StopTime – sc.SimulationTime) > sc.SampleTime)
disp(sc.SimulationTime)
advance(sc);
else
break;
end
end
% restart(sc);
sc.AutoSimulate = true;
[linksIntervalsGS2GS, linksGS2GS] = getSource2TargetPathLinks(gsMumbai, ueBengaluru, satArray, 1, false);
disp(‘Ground station to Ground Station Access Intervals with max 1 hops:’);
disp(linksIntervalsGS2GS);
However the pointAt() function causes the ground stations to point only at the last satellite, so for whole simulation they are pointing at only 1 satellite.
How to dynamically point ground stations to the passing satellites at different times of the simulations.?
This should give us link margin between the two ground stations all the time whenver a satellite connects to both the ground stations. satellite communication, link margin, pointat MATLAB Answers — New Questions