How to add Galileo almanac (xml) to satellite?

12 ビュー (過去 30 日間)
Babar
Babar 2024 年 7 月 9 日
回答済み: Shubham 2024 年 7 月 11 日
Hello
I have to simulate the Galileo constellation using the xml almanacs here: https://www.gsc-europa.eu/gsc-products/almanac.
I am importing the almanacs using the galalmanacread() function, however, when I try to use the satellite() function to add these satellites to the satellite scenario I get the following error:
Error using satelliteScenario/satellite
Unable to add satellite to the satelliteScenario because the specified SEM file is invalid.
Error in Main_Galileo_Outage_4July2024_v1 (line 28)
sat = satellite(sc,SatFileName) % adding GNSS satellites to the scenario
Caused by:
Error using matlabshared.internal.gnss.readSEMAlmanac
Header must contain number of records, GPS week number, and GPS time of applicability.
I am reading the file as an xml galileo almanac, not sure why I am getting the SEM file error.
Can anyone help on adding the satellites from galileo almanac (xml) files?
Thanks

回答 (1 件)

Shubham
Shubham 2024 年 7 月 11 日
Hi Babar,
I understand that you are trying to read a XML almanac from a source and want to simulate Galileo constellation.
The error you are encountering is because you are directly using the output of the "galmanacread" function as the input arguments of the "satellite" function.
The “satellite” object takes Keplerian elements as input argument to add a satellite to “satelliteScenario” object.
A custom function convertXmlFormatted can be used, which converts the data of XML almanac present on the source website to the required structure format to be given as input argument to the “satellite” object.
Below is the MATLAB script file to handle semData:
% Step 1: Read the almanac data
almanacData = galalmanacread('dataSat.xml');
% Step 2: Convert the almanac data to formatted format
semData = convertXmlFormatted(almanacData);
% Extract satellite data from semData
satelliteID = semData.SatelliteID;
eccentricity = double(semData.Eccentricity);
inclination = double(semData.Inclination);
raan = double(semData.RAAN);
argumentOfPerigee = double(semData.ArgumentOfPerigee);
meanAnomaly = double(semData.MeanAnomaly);
semiMajorAxis = double(semData.SemiMajorAxis);
gpsWeek = double(semData.GPSWeek);
gpsTimeOfApplicability = double(semData.GPSTimeOfApplicability);
% Define the Keplerian elements for the satellite
keplerianElements = [semiMajorAxis; eccentricity; inclination; ...
raan; argumentOfPerigee; meanAnomaly];
"keplerianElements" can be used as an input argument to add a "satellite" object in "satelliteScenario".
Attaching the links to documentation, these might help:

カテゴリ

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