フィルターのクリア

Unable to draw the given inter-satellite path.

150 ビュー (過去 30 日間)
sun
sun 2024 年 7 月 30 日 8:32
コメント済み: sun 2024 年 8 月 6 日 13:25
I wrote a Python script and got a path selection at a certain point as ['Satellite_185', 'Satellite_113', 'Satellite_162', 'Satellite_108', 'Satellite_87', 'Satellite_68', 'Satellite_305', 'Satellite_335', 'Satellite_384']. Then I wrote the following MATLAB code, but it gets stuck at the simulation scene step. I suspect it's because of the time issue, but I can't fix it.
% Create Satellite Scenario
startTime = datetime(2021,12,10,18,27,57); % 10 December 2021, 6:27:57 PM UTC
stopTime = startTime + hours(3); % 10 December 2021, 9:27:57 PM UTC
sampleTime = 60; % Seconds
sc = satelliteScenario(startTime,stopTime,sampleTime,"AutoSimulate",false);
% Load the entire constellation, but we'll only use the specified relay satellites
satellites = satellite(sc,"largeConstellation2.tle");
% Known relay satellite names or identifiers (assuming you have them)
% If you only have indices, you'll need to map them to satellite objects somehow
% Here we assume you have the satellite objects directly
% relaySats = {...}; % This should be filled with the actual satellite objects
% Example: relaySats = {satellites(10), satellites(20), satellites(30)};
% But since you likely have names or other identifiers, you'll need to find them
% Or, if you have indices into the 'satellites' array
relaySatsIndices = [185, 113, 162, 108, 87, 68, 305, 335, 384]; % Example indices
relaySats = satellites(relaySatsIndices);
% Add Ground Stations
gsSource = groundStation(sc,42.3001,-71.3504, "Name","Source Ground Station");
gsTarget = groundStation(sc,17.4351,78.3824, "Name","Target Ground Station");
% Build the path using the known relay satellite sequence
pathNodes = {gsSource, relaySats, gsTarget};
% Visualize Path
sc.AutoSimulate = true;
ac = access(pathNodes{:});
ac.LineColor = "red";
% Determine Intervals When Calculated Path Can Be Used (if needed)
% intvls = accessIntervals(ac); % Uncomment this line if you need the access intervals
% Create satellite scenario viewer
v = satelliteScenarioViewer(sc,"ShowDetails",false);
% Note: Setting MarkerSize directly on the satellites object may not work as expected.
% Instead, adjust the visualization properties in the viewer or use a loop to set markers.
% Play the scenario
play(sc);
This picture is my stuck interface after running in matlab.
  5 件のコメント
Govind KM
Govind KM 2024 年 8 月 2 日 11:19
I am able to reproduce the issue at my end. The code executes properly when other .tle files are used to load the satellite data, such as the .tle file in your linked example. This indicates that your .tle file might contain invalid data, leading to the code stalling at the simulation phase. Kindly review the data in your .tle file for any errors.
sun
sun 2024 年 8 月 6 日 13:25
Thank you very much. Your comments reminded me that my code can run successfully.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeScenario Generation and Visualization についてさらに検索

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by