Loading satellite TLE data into MATLAB using satellite function (2024)

98 views (last 30 days)

Show older comments

John Nolan on 18 Jul 2024 at 17:55

  • Link

    Direct link to this question

    https://ms-www.mathworks.com/matlabcentral/answers/2138556-loading-satellite-tle-data-into-matlab-using-satellite-function

  • Link

    Direct link to this question

    https://ms-www.mathworks.com/matlabcentral/answers/2138556-loading-satellite-tle-data-into-matlab-using-satellite-function

Commented: Umar on 24 Jul 2024 at 6:29

Accepted Answer: Sam Chak

Open in MATLAB Online

Using TLE data from an online database, MATLAB throws the error "The specified initial conditions will cause the orbit of 'STARLINK-2438' to intersect the Earth's surface." when using this function:

clc

clearvars

close all

format long

G = 3.986004418e14;

% Create a satellite scenario and add ground stations from latitudes and longitudes.

startTime = datetime(2024,7,18,13,00,41);

stopTime = startTime + days(1);

sampleTime = 60*1;

sc = satelliteScenario(startTime,stopTime,sampleTime);

sat = satellite(sc,'test_tle.txt')

The TLE data in "test_tle.txt" is as follows:

STARLINK-2438

1 48103U 21027M 24199.52200852 .27610719 12343-4 29456-2 0 9995

2 48103 53.0228 234.3624 0004658 334.7729 174.1970 16.36724891183121

when manually importing the values into the function, I dont receive the error:

% Mean Motion Line2 Field 8

semiMajorAxis = (G)^(1/3)/((2*pi*(16.36724891183121)/86400)^(2/3)); % ref : https://space.stackexchange.com/questions/18289/how-to-get-semi-major-axis-from-tle

% Eccentricity Line2 Field 5

eccentricity = 0.0004658;

% Inclination Line2 Field 3

inclination = 53.0228;

% Right Ascension of the asending node Line2 Field 4

rightAscensionOfAscendingNode = 234.3624;

% Argument of perigee Line2 Field 6

argumentOfPeriapsis = 334.7729;

% Mean Anomaly Line2 Field 7

trueAnomaly = 174.1970;

sat = satellite(sc,semiMajorAxis,eccentricity,inclination, ...

rightAscensionOfAscendingNode,argumentOfPeriapsis,trueAnomaly);

5 Comments

Show 3 older commentsHide 3 older comments

Umar on 18 Jul 2024 at 21:39

Direct link to this comment

https://ms-www.mathworks.com/matlabcentral/answers/2138556-loading-satellite-tle-data-into-matlab-using-satellite-function#comment_3215261

  • Link

    Direct link to this comment

    https://ms-www.mathworks.com/matlabcentral/answers/2138556-loading-satellite-tle-data-into-matlab-using-satellite-function#comment_3215261

Hi John,

I wanted to help you out. In the attached screenshot, it displays an error but ignore that. Try passing the data in your code as shown in attached and execute the code, tell me what happened. The reason I am asking is because txt file formatting might have to do something with your code.

Loading satellite TLE data into MATLAB using satellite function (3)

sun on 22 Jul 2024 at 16:16

Direct link to this comment

https://ms-www.mathworks.com/matlabcentral/answers/2138556-loading-satellite-tle-data-into-matlab-using-satellite-function#comment_3217651

  • Link

    Direct link to this comment

    https://ms-www.mathworks.com/matlabcentral/answers/2138556-loading-satellite-tle-data-into-matlab-using-satellite-function#comment_3217651

I have the same problem and I don't know if the blogger has already solved it?

John Nolan on 22 Jul 2024 at 17:36

Direct link to this comment

https://ms-www.mathworks.com/matlabcentral/answers/2138556-loading-satellite-tle-data-into-matlab-using-satellite-function#comment_3217766

  • Link

    Direct link to this comment

    https://ms-www.mathworks.com/matlabcentral/answers/2138556-loading-satellite-tle-data-into-matlab-using-satellite-function#comment_3217766

The text files are taken directly from a online database. Whats strange is that only some of the satellites in the textfile trigger the error, not all of them do it.

sun on 24 Jul 2024 at 5:08

Direct link to this comment

https://ms-www.mathworks.com/matlabcentral/answers/2138556-loading-satellite-tle-data-into-matlab-using-satellite-function#comment_3219196

  • Link

    Direct link to this comment

    https://ms-www.mathworks.com/matlabcentral/answers/2138556-loading-satellite-tle-data-into-matlab-using-satellite-function#comment_3219196

Yes, I am the same way. The data running in the code is official data obtained from the official website. Removing the erroneous part of the code can run normally, but obviously this processing method is unreasonable.

Umar on 24 Jul 2024 at 6:29

Direct link to this comment

https://ms-www.mathworks.com/matlabcentral/answers/2138556-loading-satellite-tle-data-into-matlab-using-satellite-function#comment_3219241

  • Link

    Direct link to this comment

    https://ms-www.mathworks.com/matlabcentral/answers/2138556-loading-satellite-tle-data-into-matlab-using-satellite-function#comment_3219241

@sun, could you please suggest a better processing method?

Sign in to comment.

Sign in to answer this question.

Accepted Answer

Sam Chak on 22 Jul 2024 at 19:25

  • Link

    Direct link to this answer

    https://ms-www.mathworks.com/matlabcentral/answers/2138556-loading-satellite-tle-data-into-matlab-using-satellite-function#answer_1489011

  • Link

    Direct link to this answer

    https://ms-www.mathworks.com/matlabcentral/answers/2138556-loading-satellite-tle-data-into-matlab-using-satellite-function#answer_1489011

Moved: Sam Chak on 22 Jul 2024 at 20:26

It had de-orbited about a few days ago. Perhaps the final TLE data suggested that it reentered Earth's atmosphere.

Loading satellite TLE data into MATLAB using satellite function (9)

3 Comments

Show 1 older commentHide 1 older comment

John Nolan on 22 Jul 2024 at 19:46

Direct link to this comment

https://ms-www.mathworks.com/matlabcentral/answers/2138556-loading-satellite-tle-data-into-matlab-using-satellite-function#comment_3217926

  • Link

    Direct link to this comment

    https://ms-www.mathworks.com/matlabcentral/answers/2138556-loading-satellite-tle-data-into-matlab-using-satellite-function#comment_3217926

Moved: Sam Chak on 22 Jul 2024 at 20:27

Ohhh wow. That makes sense. Never considered that. Thanks Sam!

John Nolan on 22 Jul 2024 at 22:48

Direct link to this comment

https://ms-www.mathworks.com/matlabcentral/answers/2138556-loading-satellite-tle-data-into-matlab-using-satellite-function#comment_3218036

  • Link

    Direct link to this comment

    https://ms-www.mathworks.com/matlabcentral/answers/2138556-loading-satellite-tle-data-into-matlab-using-satellite-function#comment_3218036

why would it matter though whether I use the Keplerian elements (ie semiMajorAxis, eccentricity etc) explicitly versus using the text file version of the function? I guess that is still an open question. could it be that the calculations for the orbit are slightly different which can trigger the trajectory into earths atmosphere when using one method vs the other?

Umar on 23 Jul 2024 at 1:17

Direct link to this comment

https://ms-www.mathworks.com/matlabcentral/answers/2138556-loading-satellite-tle-data-into-matlab-using-satellite-function#comment_3218121

  • Link

    Direct link to this comment

    https://ms-www.mathworks.com/matlabcentral/answers/2138556-loading-satellite-tle-data-into-matlab-using-satellite-function#comment_3218121

Hi John,

While both explicit usage of Keplerian elements and text file versions serve as valid methods for orbit calculations, understanding their differences and potential impacts on trajectory predictions is crucial for ensuring accuracy and reliability in orbital simulations. Further exploration and testing may help elucidate any nuances or effects that arise from choosing one method over the other.

Sign in to comment.

More Answers (0)

Sign in to answer this question.

See Also

Categories

AerospaceAerospace BlocksetReference Applications

Find more on Reference Applications in Help Center and File Exchange

Tags

  • satellite
  • tle

Products

  • Satellite Communications Toolbox

Release

R2021a

Community Treasure Hunt

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

Start Hunting!

An Error Occurred

Unable to complete the action because of changes made to the page. Reload the page to see its updated state.


Loading satellite TLE data into MATLAB using satellite function (13)

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

You can also select a web site from the following list

Americas

  • América Latina (Español)
  • Canada (English)
  • United States (English)

Europe

  • Belgium (English)
  • Denmark (English)
  • Deutschland (Deutsch)
  • España (Español)
  • Finland (English)
  • France (Français)
  • Ireland (English)
  • Italia (Italiano)
  • Luxembourg (English)
  • Netherlands (English)
  • Norway (English)
  • Österreich (Deutsch)
  • Portugal (English)
  • Sweden (English)
  • Switzerland
    • Deutsch
    • English
    • Français
  • United Kingdom(English)

Asia Pacific

  • Australia (English)
  • India (English)
  • New Zealand (English)
  • 中国
  • 日本Japanese (日本語)
  • 한국Korean (한국어)

Contact your local office

Loading satellite TLE data into MATLAB using satellite function (2024)

FAQs

What is the satellite function in Matlab? ›

The satellite function adds satellites to the scenario using two line element (TLE) files or orbital elements. For more details on orbital elements and TLE files, see Two Line Element (TLE) Files. The platform function adds platforms to the scenario using trajectory data or position or velocity data.

How to simulate a satellite in Matlab? ›

Add Satellites to Scenario Using Keplerian Elements

Set the simulation sample time to 60 seconds. startTime = datetime(2020,6,02,8,23,0); stopTime = startTime + days(1); sampleTime = 60; sc = satelliteScenario(startTime,stopTime,sampleTime); Add two satellites to the scenario using their Keplerian elements.

What is the function of the satellite? ›

Some take pictures of other planets, the sun, black holes, dark matter or faraway galaxies. These pictures help scientists better understand the solar system and universe. Still other satellites are used mainly for communications, such as beaming TV signals and phone calls around the world.

What is the command and control function of a satellite? ›

Satellite command and control (C2) is the ability to connect to a space asset, observe real time and historical events, and schedule onboard operations.

How to load a signal into MATLAB? ›

To import signals to Signal Labeler from the MATLAB Workspace, on the Labeler tab, click Import and select From Workspace in the Members list. In the dialog box, select the signals you want to import. Each signal variable is treated as a member of the labeled signal set and can be labeled individually.

How to create simulated data in MATLAB? ›

Commands for Generating Data Using Simulation

To generate input data, use idinput to construct a signal with the desired characteristics, such as a random Gaussian or binary signal or a sinusoid. idinput returns a matrix of input values. The following table lists the commands you can use to simulate output data.

What is a satellite simulator? ›

The simulator provides realistic modelling of the ground stations, the satellite orbit and environment, the operation of the satellite subsystems and payloads and their response to telecommands. The satellite also generates housekeeping telemetry.

What is the communication toolbox in Matlab? ›

Communications Toolbox™ provides algorithms and apps for the design, end-to-end simulation, analysis, and verification of communications systems. The toolbox includes a graphically based app that lets you generate custom- or standard-based waveforms.

What is Raan in Matlab? ›

RAAN (right ascension of ascending node) – This element defines the angle between the xy-plane of the GCRF and the direction of the ascending node, as seen from the Earth's center of mass for each satellite in the range [0,360).

Top Articles
Latest Posts
Article information

Author: Nathanael Baumbach

Last Updated:

Views: 6092

Rating: 4.4 / 5 (55 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Nathanael Baumbach

Birthday: 1998-12-02

Address: Apt. 829 751 Glover View, West Orlando, IN 22436

Phone: +901025288581

Job: Internal IT Coordinator

Hobby: Gunsmithing, Motor sports, Flying, Skiing, Hooping, Lego building, Ice skating

Introduction: My name is Nathanael Baumbach, I am a fantastic, nice, victorious, brave, healthy, cute, glorious person who loves writing and wants to share my knowledge and understanding with you.