Satellite Scenario around other planets

47 visualizzazioni (ultimi 30 giorni)
Keaton
Keaton il 27 Ott 2025 alle 1:57
Commentato: Umar il 30 Ott 2025 alle 4:42
Is there any way for the satellie scenario and scenario viewer tools to view trajectories/orbits around other planets? If so, how?
I've seen orbits only around earth and the moon visualized in the scenario viewer (In this example), but no other celestial bodies.
Thank you!
  1 Commento
Umar
Umar il 29 Ott 2025 alle 6:36

Hi @Keaton, Have you made any progress or still have any questions or clarification required, please feel free to reach out

Accedi per commentare.

Risposta accettata

Keaton
Keaton il 27 Ott 2025 alle 17:49
Thank you so much! I've looked at the documentation and release notes, but I do not really understand the satellie scenario. Here's what I could come up with using my very basic understanding of MATLAB:
clc; clear;
% Define Mars as the central body
centralBodyOpts = Aero.spacecraft.CentralBodyOptions(CentralBody="Mars");
% Set up numerical propagator with Mars
numericalPropOpts = Aero.spacecraft.NumericalPropagatorOptions( ...
CentralBodyOptions=centralBodyOpts, ...
GravitationalPotentialModel="point-mass");
%Time (Start: 1/1/2000 End: 1/2/2000)
startTime = datetime(2000,1,01,12,0,0);
stopTime = startTime + days(1);
sampleTime = 60;
% Create time vector
time = startTime : seconds(sampleTime) : stopTime;
%Propogator
[positions, velocities] = propagateOrbit( ...
time, 4000000, 0, 0, 0, 0, 0, ... % 4,000,000m semi-major axis, all other orbital parameters are zero (circular equatorial)
PropModel="numerical", ...
NumericalPropagatorOptions=numericalPropOpts);
sc = satelliteScenario(startTime, stopTime, sampleTime, ...
centralBodyOpts, numericalPropOpts);
play(sc);
I am trying to visualize a spacecraft in a circular equatorial orbit around mars with a semi-major axis of 4,000,000m.
Any advice or corrections would be greatly appreciated.
Thanks again!
  5 Commenti
Umar
Umar circa 16 ore fa

Hi @Keaton,

Sorry it took so long. Firstly, thank you you for your thorough testing and for sharing your findings. After carefully reviewing your comments and examining the official MATLAB R2025b documentation, I can confirm that your analysis is entirely correct.

You've identified the core issue precisely. When you attempted to use `centralBodyOptions(sc, CentralBody="Mars")`, MATLAB returned an error stating that the only valid argument names are 'UseEarthOrientationParameters' or 'EarthOrientationParameterFile'. This tells us exactly what the `centralBodyOptions()` function actually does - it manages Earth Orientation Parameters for the scenario, not the central body itself. My suggestion earlier while well-intentioned, was based on a misunderstanding of this function's purpose.

So, looking at the official documentation carefully, what I missed was the `CentralBodyOptions` property of the `satelliteScenario` object which is explicitly marked as "Read-only". This means that once a satellite scenario is created, you cannot modify which celestial body sits at its center. The property exists, but it cannot be changed after instantiation, and there is no constructor parameter available to set it to Mars during creation.

Your observation about the " intersects with the Earth's surface" error is particularly telling. When you increased the semi-major axis from 4,000,000 meters to 40,000,000 meters, you eliminated that error because you moved the orbit far enough from Earth's surface. However, the visualization still rendered the spacecraft orbiting Earth, not Mars. This confirms that while your `propagateOrbit()` function is correctly computing the orbital mechanics around Mars using the `Aero.spacecraft.CentralBodyOptions` class, the `satelliteScenario` and `satelliteScenarioViewer` tools remain fundamentally Earth-centric.

The coordinate system used by these visualization tools is based on Earth-centered reference frames - GCRF (Geocentric Celestial Reference Frame), ITRF (International Terrestrial Reference Frame), and ECEF (Earth-Centered Earth-Fixed). The entire architecture assumes Earth is at the origin. There is no mechanism in R2025b to shift this origin to Mars or any other planetary body.

Your conclusion that " we can propagate orbits around other planets just fine, but might not yet have the capability in the satellite scenario and satellite scenario viewer tools to visualize them" is absolutely accurate. The Aerospace Toolbox has robust support for multi-body orbital mechanics through `propagateOrbit()` and related functions, but the 3D visualization infrastructure has not yet been extended to support non-Earth central bodies.

I've reviewed the R2025b release notes and searched through the available documentation, and there is no indication of when this feature might be added to future releases. MathWorks has not published a roadmap item for multi-body visualization support in `satelliteScenario`.

My recommendation would be to file an enhancement request with MathWorks Technical Support. Given that the underlying propagation mathematics already supports multiple central bodies, extending the visualization system would be a logical next step. In the meantime, your Mars orbit data from `propagateOrbit()` is valid and accurate - you simply need to use alternative visualization methods if you require 3D representation of the trajectory.

You don't need to upload anything else. Your code is correct, your analysis is sound, and you've discovered a genuine limitation in the current version of the toolbox. This isn't a problem with your implementation; it's a feature that hasn't been implemented yet in the visualization components.

Well done on the systematic debugging and for reading the error messages carefully. That's exactly the right approach to identifying where the actual limitations lie.

Accedi per commentare.

Più risposte (1)

Umar
Umar il 27 Ott 2025 alle 3:16

Hi @Keaton,

Yeah, actually you can visualize orbits around other planets now! It's a newer feature so that's probably why you haven't seen many examples floating around yet. MathWorks added support for non-Earth central bodies starting with R2024b and expanded it in R2025a.

Basically, you need to use the Aero.spacecraft.CentralBodyOptions class to specify which planet you want. The supported bodies are Sun, Moon, Mercury, Venus, Mars, Jupiter, Saturn, Uranus, and Neptune. The way you do it is by creating a central body options object and passing it to your propagator.Here's a quick example of how you'd set up a Mars orbit:

% Define Mars as the central body
centralBodyOpts = Aero.spacecraft.CentralBodyOptions(CentralBody="Mars");
% Set up your numerical propagator with Mars
numericalPropOpts = Aero.spacecraft.NumericalPropagatorOptions( ...
  CentralBodyOptions=centralBodyOpts, ...
  GravitationalPotentialModel="point-mass");
% Then propagate your orbit
[positions, velocities] = propagateOrbit( ...
  time, rEpoch, vEpoch, ...
  PropModel="numerical", ...
  CentralBodyOptions=centralBodyOpts, ...
  NumericalPropagatorOptions=numericalPropOpts);

For the satelliteScenario object itself, there's a CentralBodyOptions property that you can configure to use planets other than Earth. The scenario viewer should render the planet you select, though it might not be as detailed as the Earth rendering.

One thing to watch out for - if you're using TLE data or the SGP4/SDP4 propagators, those only work with Earth as the central body. For other planets you'll need to stick with numerical propagation or two-body Keplerian models.

Also worth noting that spherical harmonics gravity models (the more accurate ones) are currently only available for Earth, Moon, Mars, and custom bodies. For the other planets you'll be using point-mass or oblate ellipsoid (J2) models.

If you're working in Simulink, the Spacecraft Dynamics block also supports all these central bodies now, which is pretty handy.

You might want to check out the propagateOrbit documentation on the MathWorks site - they updated it recently with info about the CentralBodyOptions parameter. The release notes for R2024b and R2025a also have some details about these new capabilities.

Hope this helps! Let me know if you run into any issues setting it up.

References:

 *MathWorks Documentation: propagateOrbit function  <https://www.mathworks.com/help/aerotbx/ug/propagateorbit.html>
 *Aero.spacecraft.CentralBodyOptions class documentation
 *R2024b/R2025a Release Notes for Aerospace Toolbox

Categorie

Scopri di più su Reference Applications in Help Center e File Exchange

Prodotti


Release

R2025b

Community Treasure Hunt

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

Start Hunting!

Translated by