Values changining after a satellite is initialized.
Show older comments
Hi,
Below is the code which I am using in order to create a satellite scenario. I have defined all the required parameters manually that are required to initialize a satellte, but I am not able to understand why are they getting changed after the satellite is initialized.
startTime = datetime('27-Jun-2024 13:23:02');
stopTime = startTime + seconds(60*100);
sampleTime = 10;
sc = satelliteScenario(startTime,stopTime,sampleTime);
mu = 3.986004418*1e14;
n = 15.06398680175205;
semiMajorAxis = nthroot(mu,3)/(((2*n*pi)/86400)^(2/3)) ;
trueAnomaly = 341.2089;
Eccentricity = 1.249e-04;
Inclination = 53.0534;
RightAscensionOfAscendingNode = 242.3386;
ArgumentOfPeriapsis = 94.5842;
sat = satellite(sc,semiMajorAxis,Eccentricity,Inclination,RightAscensionOfAscendingNode,ArgumentOfPeriapsis,trueAnomaly);
elements = orbitalElements(sat)

I would really appreciate if someone can help me figure out why are the values of RAAN and ArgumentOfPeriapsis getting changed after the satellite is initialized.
Thank you
8 Comments
Amish
on 6 Aug 2024
Hi Raghav,
I used the code snippet provided by you, but I am unable to replicate the issue.
The variables "ArgumentOfPeriapsis" and "RightAscensionOfAscendingNode" show expected behaviour, and their values are "94.5842" and "242.3386" respectively. Could you share more information on the issue?
Raghav Rathi
on 6 Aug 2024
Raghav Rathi
on 6 Aug 2024
Edited: Raghav Rathi
on 6 Aug 2024
Umar
on 6 Aug 2024
Hi @ Raghav Rathi,
The only issue I can think of after analyzing your code and provided data, if the angles provided (RAAN and Argument of Periapsis) are in the correct units and formats expected by the satellite initialization functions. For example, angles like RAAN and Argument of Periapsis are typically specified in degrees, so make sure the values are converted to degrees if they are in radians.Hope, this helps.
Raghav Rathi
on 6 Aug 2024
Walter Roberson
on 6 Aug 2024
Which MATLAB release did you happen to test on?
The poster is using R2023b -- but running the code here in MATLAB Answers, using R2024a, is producing the same result.
Umar
on 6 Aug 2024
Edited: Walter Roberson
on 6 Aug 2024
Hi @ Raghav Rathi,
Also, I have noticed carefully now that TLE information you provided is not directly being used to initialize the satellite, and instead, you are manually defining parameters such as semiMajorAxis, Eccentricity, Inclination, RightAscensionOfAscendingNode, ArgumentOfPeriapsis, and trueAnomaly. So, when you initialize a satellite using the Aerospace Toolbox satellite function with manual parameter inputs, it's possible that these values are being overridden by the TLE-derived elements. So, my approach at this point would be parsing the TLE data and extract the relevant parameters needed to initialize the satellite. This involves converting the TLE data into orbital elements such as semi-major axis, eccentricity, inclination, right ascension of ascending node, argument of periapsis, and mean anomaly. Once you have extracted these values from the TLE, you can then use them to initialize the satellite in your scenario. By doing so, you can ensure that the satellite's parameters are accurately defined based on the TLE information. By incorporating this approach into your code, you can achieve consistency between the manually defined parameters and those derived from the TLE data. This will help in resolving any discrepancies or changes observed after satellite initialization.
Secondly, be aware of potential issues related to data reliability. Data derived from TLEs older than 30 days can become unreliable, and it's recommended to calculate orbital positions using algorithms such as Simplified General Perturbations-4 (SGP4) and Simplified Deep-Space Perturbations-4 (SDP4). To resolve this problem, consider using TLE data directly as input for satellite initialization in MATLAB's Aerospace Toolbox. By obtaining reliable TLE files from sources such as the Space Track website, you can ensure that the orbital elements, including RAAN and Argument of Periapsis, are accurately defined based on current information.
I would also recommend reviewing materials by clicking the following links below.
Hope this helps.
Raghav Rathi
on 6 Aug 2024
Accepted Answer
More Answers (0)
Categories
Find more on Scenario Generation and Visualization 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!