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
0 votes
0 answers
35 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
69 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
74 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
  • 43
1 vote
0 answers
37 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
0 answers
226 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
81 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
76 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
373 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
499 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
238 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
269 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
109 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
1 answer
213 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
68 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
1k 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
664 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
80 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
193 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
343 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
126 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
220 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
162 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
  • 148k
4 votes
2 answers
337 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
74 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
274 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
351 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
  • 148k
1 vote
0 answers
902 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
179 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
  • 148k
3 votes
3 answers
1k 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
4 votes
2 answers
2k 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
  • 41
2 votes
0 answers
342 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
268 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
487 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 ...
brethvoice's user avatar
2 votes
0 answers
199 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
58 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,262
4 votes
1 answer
304 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
342 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
  • 148k
5 votes
2 answers
933 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
411 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
339 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
  • 48.8k
3 votes
1 answer
704 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
666 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
  • 148k
1 vote
0 answers
269 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
6 votes
1 answer
699 views

Get dates when a satellite has performed maneuver from historical TLE data (python)?

I have been recently acquainted with orbital mechanics and am trying to do some analysis on the subject. Since I don't have subject matter expertise, I am at a crossroads with trying to decide that ...
aashay shah's user avatar
3 votes
2 answers
189 views

Simulating engine burn with scipy ode solve

I'm using ODE solver to calculate complex trajectories. A simplified setup is like this: ...
Boris Brodski's user avatar
1 vote
2 answers
976 views

Visualising orbits from different viewpoints in Python

I have a python program that I use to visualise a planetary orbital system. I convert the orbits to xyz coordinates and then have a basic orrery that views the system from 'above', by simply plotting ...
deMangler's user avatar
  • 143
1 vote
0 answers
899 views

How to change RAAN with 250 m/s DV?

I'm performing a transfer between 2 orbits with different RAAN (other orbital parameters are same). The perigee altitude of the orbits is 1000km, the apogee is <...
Leeloo's user avatar
  • 803
3 votes
2 answers
406 views

Lambert method for in-plane transfer

I'm trying to solve the transfer between a circular orbit with 200km radius and an orbit with 200km perigee and 8000km apogee. The optimal transfer is hoffman, however, izzo.lambert from poliastro ...
Leeloo's user avatar
  • 803
2 votes
1 answer
250 views

Need javascript to solve xyz for a kepler

I have a python program that I use to calculate the xyz positions of a point in a kepler orbit. https://github.com/sczesla/PyAstronomy/blob/master/src/pyasl/asl/keplerOrbit.py It takes the following ...
deMangler's user avatar
  • 143