184 questions
0
votes
0
answers
26
views
Why different files produce same GNSS plots in my Python code?
I wrote a piece of Python code to read different GPS observation files (.24o) and navigation files (.24p), and generate polar plots of satellite trajectories. It is hoped that the RINEX file can be ...
0
votes
0
answers
65
views
How to use the B star term present in a Two Line Element data for extracting Ballistic Coefficient of a spacecraft?
I'm writing a Python script to calculate the effect of atmospheric drag on a spacecraft in LEO by evaluating the change in the square root of the semi-major axis over time. The governing equation I'm ...
1
vote
1
answer
72
views
How to integrate two objects of differing dimension alongside each other?
I am trying to integrate orbits in Python, and when considering only the 6x1 state vector x (3 spatial dimensions + 3 velocities), this is fairly easy and even easier when passing it to something like ...
1
vote
0
answers
104
views
Orbital motion predictor is only accurate when satellite starts on a specific side of the planet
I created a script that simulates gravity between satellites and a planet and predicts the orbit of the satellite based on the orbital elements calculated by the satellite's velocity and position ...
1
vote
1
answer
90
views
Problem Updating Angular Velocity and Angles in Binary Star Orbit Simulation (Python, Matplotlib)
I'm creating a simulation for a binary star system in python using matplotlib. I want it to change based on the users inputs through sliders I've provided. When I first created this without any real ...
0
votes
0
answers
61
views
Manim: ValueTracker which dynamically updates itself with its current value
I am trying to animate 2D mechanics problem (ball going into a vertical loop)
the equation of motion in my case is
v=sqrt{v_i^2+2gR(cos theta - cos theta_i)}
and theta increases by value v* dt/R
I ...
1
vote
1
answer
107
views
Why does my planetary orbit simulation produce a straight line instead of an elliptical orbit?
I'm trying to simulate the orbit of a planet using the compute_orbit method, but when I plot the resulting positions, I get a straight line instead of an expected elliptical orbit. Below are the ...
3
votes
0
answers
265
views
Plotting planet position as a function of time
I've been trying to make a simulation of planets and asteroids moving around the sun, and I found this link:
How do I plot a planet's orbit as a function of time on an already plotted ellipse?
I ...
1
vote
2
answers
573
views
Integrations for Two Body Problem in python
I am trying to create as the first stage of a larger project goal a two body Sim in python with pygame to display on screen the objects.
My main problem at the moment is that the orbiting satellite is ...
0
votes
0
answers
68
views
Issue with transitioning code for computing stellar orbit around a black hole to solve_ivp in Python
I've been working on a Python code to compute the orbit of a star around a black hole at the center of our Galaxy. The code includes an implementation of a gaseous disc with hydrodynamical drag force ...
0
votes
1
answer
67
views
How to efficiently determine if certain azimuth heading is crossed during satellite pass in SkyField
I am trying to determine if an upcoming satellite pass in SkyField will cross a certain azimuth heading, say 0.0 deg north. Right now I iterate in 1 sec steps "manually" over the entire pass ...
2
votes
0
answers
102
views
Is there a range of launch velocities that would get my satellite as close to Mars as possible?
Introduction
Hi, I am trying to send a satellite which has a mass of 1062kg from Earth to Mars. My aim is to get it as close as possible to Mars but not orbit it. I am looking for a range of possible ...
1
vote
0
answers
63
views
How do I Decrease Orbit Size in My Python Code?
I'm working on a project where my end goal is for the two orbiting stars to collide; I have some code from my class that I've been utilizing, and while I was successful in getting two objects to orbit ...
0
votes
1
answer
82
views
How to convert 2D State Vector + Gravitational Parameter into Apoapsis, Periapsis, Argument of Periapsis and Time in Unity C#
I have asked a question similar to this before but have not been able to find an answer so im going to provide a bit more detail and hope that someone knows what im talking about.
I have a series of ...
0
votes
1
answer
1k
views
Plotting ground Tracks with python only using trigonometry
I'm trying to plot a ground track in Python from a TLE file without using explicit astropy or other packages. I've encountered a problem with the code that I can't figure out. The issue pertains to ...
1
vote
1
answer
254
views
Struggling to convert cartesian elements into orbital elements in Unity2D + keplerian solution to the two-body problem
Im building a game where i simulate planetary orbits in Unity 2D C#. I previously used newtons laws of gravitation but quickly discovered that rounding errors in floats can lead to massive orbital ...
-2
votes
2
answers
980
views
GEO Station Keeping in GMAT [closed]
I am currently trying to implement station keeping maneuvers for a geosynchronous satellite in orbit around Earth using the General Mission Analysis Tool (GMAT) but I am not managing.
I know there are ...
0
votes
1
answer
357
views
Newton-Raphson method on the hyperbolic Kepler's equation
I'm here once again because I can't figure this out. I'm building an orbit simulator and currently working on placing the ship on a hyperbolic trajectory upon entering the SoI of a body. (I'm using ...
1
vote
1
answer
160
views
Iterating the hyperbolic version of Kepler's equation does not converge
I'm creating an orbit simulator using Java. I have elliptical orbits working great, and now I'm trying to do hyperbolic orbits. The problem I'm having is that when the ship enters the orbit at ...
-2
votes
1
answer
161
views
How can have multiple plots output from python, one 2D, one 3D
I want to make a plot of an orbit and it's energy with respect to time. I want to have the program output a 3D figure of the orbit, and a 2D figure of the total energy against time. I have been trying ...
2
votes
0
answers
106
views
How to calculate orbit info (a, e, time to apo, time to peri, T) from pos and vel of object?
Im trying to make small 2d solar system orbit simulator as hobby project and im having some issues with finding orbital info. (a, e, time to apo, time to peri, T).
I have readen some infos, articles, ...
0
votes
4
answers
161
views
Why is RK4 not updating values for my simulation of the Earth's orbit?
I am trying to use a Runge Kutta method to simulate the motion of the Earth around the Sun in C, I cannot see why but my code does not update the values for position or velocity and just keeps the ...
0
votes
1
answer
86
views
Calculating force vectors between N bodies returns incorrect values?
I'm trying to write a function that calculates the force vectors acting on a body from N bodies using F = GMm/r^2 (given the masses and initial positions in .txt files), and stores the values in a ...
-1
votes
1
answer
378
views
Simulating orbit of planet around the sun with RK4
I am trying to simulate a planet going around the sun with the RK4 algorithm.
This is my code that i tried:
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
def calcvec(x1,...
1
vote
1
answer
106
views
Using Star size and temperature to determine habitable zone JS
So I went online to find out how you can calculate the temperature of a planetary body based on the size and temperature of its star, and the body's distance from its star. That brought about this ...
-1
votes
1
answer
161
views
How to speed up the world in LibGDX without altering delta time
This is not a duplicate of this question because I need a way to speed up my world without changing deltaTime and have everything happen faster. Why can't I use deltaTime or change it? I'm using the ...
2
votes
1
answer
811
views
Unity player movement on moving planet
I am making a game involving orbital physics. I was successfully able to implement this with a slightly modified version of Brackeys gravity tutorial https://youtu.be/Ouu3D_VHx9o, this is the code:
...
1
vote
2
answers
886
views
Planet position by time
I want to implement a gravity system in shadertoy without using any storage/buffer. So I can't save any variable and my animations must be a function of time. Is it possible to make a function of time ...
1
vote
0
answers
361
views
Orbit spirals using 4th order Yoshida integration
I am attempting to use the 4th order Yoshida integration technique to model the orbit of satellites in circular orbits around the Earth.
However, the orbits I achieve spiral away quite quickly. The ...
1
vote
1
answer
822
views
Black Hole Physics ( 2D ) in unity
I'm trying to have a black hole like physics that will attract any object that will go close to it, then put it into the black hole orbit and like a vortex make it go to then center and disappear.
I ...
1
vote
1
answer
255
views
Does the pyorbital.get_position function output position vectors in the ECEF or ECI frame?
The documentation for this function surprisingly doesn't mention the coordinate frame. Does anyone know which it is? Thanks!
https://pyorbital.readthedocs.io/en/latest/#pyorbital.orbital.Orbital....
0
votes
0
answers
83
views
Whats wrong with my RK4 Orbital Propagator?
I am working in a RK4 orbital propagator, and I have followed the basic structure of:
k1=dt×f(tn,yn)
k2=dt×f(tn+dt/2,yn+k1/2)
k3=dt×f(tn+dt/2,yn+k2/2)
k4=dt×f(tn+dt,yn+k3)
yn+1=yn+...
0
votes
1
answer
224
views
Calculate eccentricity vector of planetary ring particles
I wish to set-up an initially circular (e=0) system of planetary rings which I can later perturb over time and see how the eccentricity changes. However, my calculation of the eccentricity vector ...
0
votes
1
answer
1k
views
Calculating 2D Orbital Paths in Newtonian Gravity Simulation
I am currently working on a project (for fun) for simulating Newtonian gravity and want to be able to visualize the future path of an object orbiting around a single attractor. At any given simulation ...
2
votes
1
answer
171
views
constrain the initial and final values of a GEKKO ```Var``` to a data-based curve
I am trying to solve a low thrust optimal control problem for Earth orbits, i.e. going from one orbit to another. The formulation of the problem includes six states (r_1, r_2, r_3, v_1, v_2, v_3) and ...
0
votes
1
answer
98
views
Getting a planet's speed to scale with the inverse square of it's distance?
Following this excellent tutorial on making a procedural solar system, and so far it's coming along nicely. My only problem with it is that the orbit speeds aren't as accurate as I'd like. I want the ...
2
votes
2
answers
3k
views
Plotting an orbit in 3D space around the earth with a TLE
Im trying to create a 3D scene in JS/React where I can plot the orbit of the ISS around earth, I've currently forked this repo https://github.com/dsuarezv/satellite-tracker
Ive noticed that this only ...
2
votes
0
answers
1k
views
Which integration method is best for n-body gravity-simulations (speed vs. accuracy)?
I am currently implementing a n-body-simulation (gravity/3D) for big n (depending on how things go > 1Mio. particles) and am wondering, what integration-method to use. I guess it should have ...
0
votes
0
answers
119
views
I need to determine the velocity change that allows for an orbital rendezvous between two orbiting spacecraft
I need to perform an exercise with Fortran90 that has as its objective what is written in the title. I have a starting system formed by second degree equations with certain boundary conditions. I ...
0
votes
1
answer
282
views
How do I plot the position of a body in orbit using polar coordinates in python
Trying to plot the position of body in elliptical motion by solving Kepler's laws. I have a function for r (distance between focal point and body) and Theta (Angle between line connecting focal and ...
0
votes
1
answer
293
views
Why is the Argument of Periapsis necessary to specify Orbital Motion?
As I understand it, 6 numbers are needed to completely specify elliptical motion of satellites. This is so that we can constrain the exact shape and position of the object moving in this elliptical ...
2
votes
2
answers
198
views
Physics/Vectors Question - Solar System Movement, Vectors and Scalar calculations
I'm dealing with a question for class that is asking me to mimic the movements of planets/moons/asteroids within a solar system in a 3D space. We started early the semester with vectors, masses, and ...
2
votes
2
answers
610
views
Vectorized coupled ODE’s for a N body Problem in python
I’m trying to solve a n-Body problem using hamilton equations of motion; here is what I’v done:
1.) First I define random initial values for momentums and the vectors positions:
import numpy as np
...
2
votes
0
answers
184
views
Barnes-Hut algoritm insertion center of mass shift
I'm having trouble understanding how inserting into a Barnes-Hut quadtree works. If the root represents the center of mass and all of nodes within the quadtree, what happens if you insert something ...
1
vote
0
answers
212
views
How to convert static plot to animation (poliastro)?
I have plotted an orbit, but I need it as an animation, not a static plot
import poliastro
from poliastro.bodies import Earth
from poliastro.twobody import Orbit
r = [-8045, -3490, 2500] * u.km
v = [-...
1
vote
0
answers
137
views
Barnes Hut Algorithm sub-quadrants
I'm trying to implement the Barnes-Hut algorithm. My current pseudocode for inserting is:
if node is empty, place an object into it (object being a particle/planet)
if node is a leaf, swap it with a ...
1
vote
2
answers
93
views
Runing matlab code gives that not enough inputs have been given and that there is something wrong with our RHS function
the goal with this code is to simulate numerically the movement of three
bodies in three dimensions. All of the bodies have a constant masses.
We are going to determinate the evolution of the position ...
1
vote
1
answer
306
views
VPython Orbital Motion Bugging
I've tried to visualise the orbits of the solar system and then include an exoplanet orbit using the vpython library.
It works well but at the start of the program and occasionally the orbits will ...
1
vote
1
answer
2k
views
How can I plot a Hohmann Transfer Orbit in MATLAB using ode45?
In my code below I have vectors r and v, r = [r1, 0, 0] v = [0, sqrt(mu/r1), 0] which define the initial position and velocity of the spacecraft. I want to use ode45 on r(double dot)=-(mu)*r/rmag^3 ...
0
votes
1
answer
55
views
only size-1 arrays can be converted to Python scalars: Trying to plot circular orbit with equation of. circle
I'm relatively new to python so forgive me for any nonsense in my code. I am trying to program a circular orbit of a planet (I just used the mass of Uranus and the Sun) in python using equations from ...