Skip to main content

Questions tagged [python]

Questions about the use of the Python programming language for projects directly related to Space Exploration as defined in the help center.

Filter by
Sorted by
Tagged with
4 votes
0 answers
61 views

Incorrect limb points from SPICE 'limbpt' routine?

I'm encountering a baffling problem with the SPICE routine limbpt (as implemented in SpiceyPy) and I'm not sure how to fix it, so I'm hoping one of you might know ...
Zed Taylor's user avatar
2 votes
0 answers
67 views

Finding satellite visibility with ephemeris state vectors instead of TLE

I have been using Python excellent skyfield module to compute Earth satellite events from a given point (ie. visibility—rise, culmination, and set, as well as ...
M2FKXY's user avatar
  • 183
5 votes
2 answers
194 views

Where does this formula for the argument of periapsis come from?

I was looking at Poliastro/Hapsira python code determining orbital elements from the position and velocity vector. On this line, argp or $\omega$ is determined as (...
TheWanderer's user avatar
1 vote
0 answers
124 views

Any ideas?: Calculating wet-mass and burn altitude for a Mars landing, using a Python simulation

In this post, I will explain the problem, provide some detailed context, and finally explain what I am searching for (what my question is basically). First of all, this should be quite a fun but ...
AvanD's user avatar
  • 21
0 votes
0 answers
76 views

How can I plot ground tracks on the surface of the Moon?

I'm curious if there's a module or Python library capable of plotting ground tracks on the Moon's surface, similar to how Skyfield or Astropy functions. I understand that Two-Line Elements (TLEs) are ...
ed190's user avatar
  • 63
2 votes
0 answers
134 views

Calculating trajectory of Voyager 1 Python

I want to calculate the trajectory of the voyager 1 probe using python and Kepler equation. I know there are already various program to calculate it but I need to do it on my own via these ...
Gabriele's user avatar
0 votes
0 answers
71 views

Eclipse/sunlight detection for LEO satellites

I am trying to use poliastro to obtain the positions of the propagated spacecraft and the lighting conditions at each position. The documentation in poliastro page shows an example of the shadow ...
Spiros Makris's user avatar
1 vote
0 answers
83 views

How to maintain minimum distance between satellites for duration of their orbits

I am working on a simulation in python that involves propagating hundreds of satellites over time. For simplicity, let's assume I have satellites at only a single inclination separated into multiple ...
Luca Petrescu's user avatar
1 vote
0 answers
189 views

How to convert Geocentric Coordinates to ECEF using Skyfield?

I'm trying to obtain ECEF coordinates from geocentric coordinates and then plot the ground track using the subpoint function. Any advice? My objective is to create an accurate ground track. Additional ...
ed190's user avatar
  • 63
1 vote
1 answer
145 views

Accessing propagation results when running a GMAT script with Python API

I am using the GMAT Python API to run scripts, fx the Ex_R2022a_TLE_Propagation.script can be used as an example, as this is included in GMAT/samples. ...
Rosanna's user avatar
  • 11
0 votes
1 answer
859 views

Setting up and using Python interface in GMAT?

I have managed to successfully setup and use the MATLAB interface in GMAT, with a combination of the documentation and this helpful video, which gave me all the information I needed. Alas, that is not ...
Johan Sondberg's user avatar
1 vote
1 answer
155 views

How to get contact locator events in GMAT using Python

I am trying to write a python script for GMAT to detect contacts between a satellite and a ground station. I have declared the contact locator as such: ...
aeroengineer's user avatar
1 vote
0 answers
130 views

How to perform a Burn Operation in GMAT via python api

'm testing the python api of GMAT (2022). I'm able to instantiate a satellite object and do propagation in steps. I would like to include an instant burn operation in the simulation, but the code just ...
Michal Mlaticek's user avatar
3 votes
1 answer
440 views

Calculating and Drawing the orbit of a body in a 2D gravity simulation in python

I'm making a space exploration game and its in a 2d plane so no z axis, and I'm using Newton's law of universal gravity, I would really like to calculate anddraw the predicted trajectory of a body, ...
B2-B's user avatar
  • 31
3 votes
1 answer
972 views

TEME state vector to TLE orbital elements

I was looking at time series of some TLE parameter(semimajor axis, inclination, etc..) and I wanted to how those parameters evolve between measured time points. So i decided to feed TLE element to ...
klobaska soslaninou's user avatar
3 votes
0 answers
239 views

How is this estimation so off?

Based on the recent NASA's DART mission, I wrote some code to calculate the satellite's distance and relative velocity based on the the size of Dismorphos (the target asteroid) on the camera frame. ...
808kalli's user avatar
3 votes
0 answers
365 views

Running STK scenario with Python integration

I have created a scenario in STK 12.4 with a couple of satellites that will pass over a target location. I want to have a function that is called while the scenario is running. Does the Python API ...
Quaxton Hale's user avatar
3 votes
1 answer
125 views

Python - Beyond Orbit raises TleParseError for valid TLE [closed]

I've been using the example script for ground track from the beyond library documentation. I've been using TLEs from Celestrak's set of NOAA satellite TLEs, located here. This was working fine until I ...
confused_about_beyond's user avatar
0 votes
2 answers
372 views

Keplerian Orbital Elements to Cartesian Coordinates issue with inclination, and possibly other stuff

this is the first time I am asking for help on this site, so if I format badly, or need to add/change something, let me know. I am currently trying to make a game using python (python powered board ...
finnnosam's user avatar
2 votes
0 answers
79 views

Visualizing halo orbits

I'd like to visualize JWST's orbit (or any halo orbit that resembles it) preferably in Python. Does anyone have any code or resource I could read? Thanks in advance!
Alvaro's user avatar
  • 21
4 votes
1 answer
2k views

Python orbit simulation using TLE-tools and poliastro

I have a source of satellite TLE data - similar to space-track.org. For testing purposes I would like to create a simulation that doesnt rely on the real source of data. I was able to download a json ...
wolf72's user avatar
  • 141
4 votes
1 answer
1k views

Modelling ISS orbit in GMAT

I am a complete newbie in all things space related. I am trying to work out how I can model the orbit of the ISS in the NASA open source tool GMAT. I can get the TLE for ISS (ZAYRA) from space-track....
wolf72's user avatar
  • 141
0 votes
1 answer
89 views

iod.lambert method does not work in poliastro 0.14.0 and 0.16.3 in Windows 10 (?) [closed]

I try to reproduce the "Analyzing the Parker Solar Probe flybys" example from the page https://docs.poliastro.space/en/latest/examples/Analyzing%20the%20Parker%20Solar%20Probe%20flybys.html, ...
Peter Nazarenko's user avatar
3 votes
1 answer
240 views

GMAT Python API No Convergence

I’m currently using the GMAT Python API in order to set and run my GMAT scripts, but am running into a problem where my scripts do not converge based on certain inputs. Is there a way in the Python ...
dec's user avatar
  • 31
1 vote
0 answers
382 views

Is there a python library to determine the position of a satellite at a given time from TLE data excluding the Satellite catalog number?

Or perhaps some simple code or formula that achieves this. I've used pyephem but it requires a Satellite catalog number.
Imp's user avatar
  • 71
0 votes
0 answers
147 views

TLE Need help in understanding the position vector

I tried to take a TLE of an elliptical orbit and tried to calculate the position of the satellite for the next 16 hours. I understood that the position is an (x,y,z) vector which I can get in a ...
deep_rugs's user avatar
  • 101
2 votes
0 answers
281 views

GMAT: How to Access startup file variables such as PYTHON_MODULE_PATH?

I use the python interface quite frequently and read-in tables of control variables created by another standalone module. I need to be sure that a file created by the standalone python module can be ...
Colin Helms's user avatar
3 votes
1 answer
1k views

satellite ground track calculation

I'm trying to calculate the ground track of an earth-orbiting satellite (Longitude, latitude) I found this handy way on the documentation but it's good when trying to find a single point what if I'm ...
abdalla's user avatar
  • 63
5 votes
1 answer
174 views

How might an "imminent Starlink reentry in your area" alerting script work?

The video below Space debris over Puerto Rico (2/7/2022) SAC seems likely to show one or more reentering Starlink satellites from the 40 "Starlost" lost to atmospheric heating due to a ...
uhoh's user avatar
  • 149k
5 votes
2 answers
471 views

How is an input card for SGP4/other astro standards packages crafted?

I've read through the SGP4 documentation at least 5 times, and I swear the only reference it makes to the construction of an input card is "just look at the examples". For Sgp4Prop, it ...
orbit-stuff's user avatar
1 vote
0 answers
92 views

Python: Satellite and/or payload class

I am very familiar with the python package poliastro and am wondering if there are any Python packages out there that have a "satellite" type class already? My thought is if someone wants to ...
scm.tf's user avatar
  • 11
4 votes
1 answer
282 views

When will the jwst python library have live data for the general public to work with in its data pipelines?

The Space Science Telescope Institute has put out a python library called JWST for science observations from James Webb Space Telescope. When will the general public be able to look at "live"...
user1068636's user avatar
3 votes
2 answers
399 views

Why can n2yo somehow interpret this TLE but Skyfield can't? Why does it return nans and zeros for position?

@Rafa pointed out that there is at least one officially released TLE for the JWST mission after it left Earth orbit, and here's the latest one at n2yo.com: ...
uhoh's user avatar
  • 149k
1 vote
0 answers
1k views

calculating satellite position and velocity from TLE

I'm trying to calculate satellite orbit from the TLE set at first, I used several libraries including SGP4, Skyfiled to get the initial position and velocity of the satellite at the epoch time I know ...
abdalla's user avatar
  • 63
1 vote
1 answer
197 views

How can I find the old reference orbit for JWST (from 2014) and get AltAz positions from Earth without learning Spice? Can Horizons do it? Can Python?

In this ancient 2017 answer to What happens to JWST after it runs out of propellant? I've plotted an eleven year long reference orbit for JWST that was available form Horizons at the time. Now that ...
uhoh's user avatar
  • 149k
3 votes
3 answers
2k views

Failing at getting apogee and perigee from TLE

At Celestrak, the current orbit for ISS is currently listed as 423x417 km, but if I'm getting the TLE data from Celestrak and use orb.get_lonlatalt(now) from ...
Claudiu's user avatar
  • 79
5 votes
2 answers
3k views

Track a satellite using python

I tried tracking a satellite - or rather confirming the data I got from the AMSAT pass prediction web page - using python, more precisly the sgp4 and navpy packages. Now I don't really now what I'm ...
RadaD's user avatar
  • 51
2 votes
0 answers
393 views

Calculating Which Satellite Passes are Visible - Need help

I am a beginner Python programmer. I am trying to get the code in the article "Calculating which satellites are visible" to function without success. My plan is to identify satellites that ...
Jeff's user avatar
  • 21
3 votes
0 answers
364 views

How to calculate the phase angle between satellite and sun with the use of skyfield

With the discussion that took place on answer(s) to How to calculate cone angle between two satellites given their look angles? I would like to ask if my proposal solving that question works like ...
mworion's user avatar
  • 31
1 vote
1 answer
591 views

Has Skyfield or any other SGP4-capable open-source Python package yet wrapped/implemented the new, improved SGP4 (version 8+)?

The first release on Github was in 2014. I have noticed Brandon Rhodes has contributed quite a bit to the Skyfield source code, so I will tag him here and in a comment. EDIT: I changed the title to ...
tdMJN6B2JtUe's user avatar
2 votes
0 answers
215 views

Alfonso Gonzalezs Orbital mechanics simulation

I basically copied all the code on Orbital Mechanics Series of Alfonso Gonzalez (because I really don't have any experience with coding, but would like to in the future) on Youtube (for a school ...
Jerry57's user avatar
  • 29
0 votes
0 answers
67 views

GMAT compilation does not generate gui

I am compiling GMAT 2020a on opensuse linux from source code downloaded from sourceforge. I have gotten the compilation completed. Ran ok, except the /bin ...
tckosvic's user avatar
  • 2,302
4 votes
1 answer
342 views

Coordinate systems for state vectors

I am currently working on a project from this book. In appendix D, they provide a few projects that can be coded as a review of all the material in the book. I finished the first project, Site/Track ...
chrishorton's user avatar
1 vote
1 answer
371 views

Why did my vis-viva math solution get so close despite being wrong? Under what conditions would it have been a good approximation?

I tried to answer Equation for Velocity and distance from Sun of a solar sail powered spacecraft but I'm missing something. I set up a math solution and got about 0.4 year to reach zero velocity based ...
uhoh's user avatar
  • 149k
5 votes
2 answers
1k views

GMAT - Locating inter-spacecraft contact instead of spacecraft to ground station

GMAT implements two "event locators" that find eclipse times and line of sight intervals. However, this only lets you analyse data between a ground station and a spacecraft. Is there a way ...
Spiros Makris's user avatar
2 votes
1 answer
513 views

Local observer coordinate system at satellite panel (LVLH coordinate system)

In skyfield I want to calculate alt-az distance from one reference satellite to next (for antenna pointing simulation). My current workaround is to create the reference observer at sat1 height and ...
matbru's user avatar
  • 161
3 votes
2 answers
347 views

Skyfield, how to use https:// instead of ftp://?

Using skyfield I get the error : OSError: cannot get ftp://cddis.nasa.gov/products/iers/deltat.data because <urlopen error ftp error: TimeoutError(10060, 'Ein Verbindungsversuch ist fehlgeschlagen, ...
Uwe's user avatar
  • 49.3k
3 votes
1 answer
765 views

How to solve the two-body problem in the ECI frame through numerical integration?

I need to know how to solve two-body problem by solving a system of first order equation derived from the equation below. $$\ddot{\mathbf{r}} = -\frac{\mu}{r^3}\mathbf{r}$$ How do I go about this, and ...
spreadsheet_wiz's user avatar
2 votes
1 answer
704 views

How much delta-v have I used here? What's the "official" equation for delta-v from parametric thrust?

I took a break from Stack Exchange, jumped in my spacecar and flew the following squiggle: $$a_x = \cos(10 \ t)$$ $$a_y = \sin(5 \ t)$$ $$a_z = \cos(2 \ t)$$ starting at ...
uhoh's user avatar
  • 149k
1 vote
0 answers
290 views

Keplerian to cartesian elements issue

I am trying to convert between keplerian orbital elements to cartesian position and velocity but something is going wrong. The issue is that I (as a check) compute some keplerian orbital elements with ...
Warrenmovic 's user avatar