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
1 vote
0 answers
26 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
277 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
150 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
232 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
166 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
83 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
160 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
56 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
713 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
  • 121
3 votes
1 answer
345 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
  • 121
0 votes
1 answer
76 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
147 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
301 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
  • 61
0 votes
0 answers
108 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
170 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
741 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
149 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
4 votes
2 answers
256 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
64 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
267 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
305 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
592 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
170 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
865 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
  • 69
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
272 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
225 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
387 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
186 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
53 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
276 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
309 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
734 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
343 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
310 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.5k
3 votes
1 answer
628 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
630 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
245 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
5 votes
1 answer
622 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
180 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
809 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
749 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
  • 763
3 votes
2 answers
319 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
  • 763
2 votes
1 answer
236 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
2 votes
0 answers
197 views

Cartesian vectors to keplerian orbital elements of binary system

I am looking to code a a function that converts my 3d position and 3d velocity of a binary system into keplerian orbital elements of the system. I have seen a few other posts on this but they always ...
Warrenmovic 's user avatar
4 votes
0 answers
207 views

How to get lunar L, B, C parameters from the Moon's 3x3 rotation matrix from the Python package Skyfield?

Answers to What are the “Moon L, B, C” angles shown in this solar eclipse simulation? explain that L and B (or "l" and "b") are the "selenographic coordinates of the Moon's apparent center" (latitude ...
uhoh's user avatar
  • 149k
6 votes
4 answers
2k views

Python Libraries: Numerical Propagators and Access Calculations

I have written some of my own code in Matlab that performs two body unperturbed as well as J2 perturbed orbit propagation. I am shifting to a new environment that requires the use of Python, and can't ...
S moran's user avatar
  • 425
1 vote
1 answer
154 views

What are the data mining platform does Space agencies such as Nasa or SpaceX use?

What are the data mining platform does Space agencies such as Nasa or SpaceX use? Just a few would be helpful. This is for data mining and data analysis purpose. In general, i was looking something ...
goofyui's user avatar
  • 111
7 votes
1 answer
662 views

How can I plot satellite's trajectory from three different TLEs to detect any deviation on path with time?

I have obtained TLE information of a satellite from space-track.org for three different times. I am trying to study any deviation of the satellite trajectory from its usual path. Here I am comparing ...
sudeep's user avatar
  • 71
2 votes
1 answer
193 views

Controlling suicide burn landing location in a python simulation?

I recently asked a question in stackoverflow about Simulation of suicide burn in openai-gym's LunarLander. Sadly most of my assumptions about suicide burn implementaion were wrong but the answer given ...
Eka's user avatar
  • 121