Azzera filtri
Azzera filtri

How to add Galileo almanac (xml) to satellite?

51 visualizzazioni (ultimi 30 giorni)
Babar
Babar il 9 Lug 2024 alle 19:31
Risposto: Shubham il 11 Lug 2024 alle 12: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

Risposte (1)

Shubham
Shubham il 11 Lug 2024 alle 12: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:

Categorie

Scopri di più su Satellite Mission Analysis in Help Center e File Exchange

Tag

Prodotti


Release

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by