Questions tagged [orbital-mechanics]

Objects revolving around each other. Most commonly 3D objects under the (mutual) influence of gravitational pull.

89 questions
85 views

Finding the true anomaly from state vectors

I'm attempting to convert from state vectors (position and speed) into Kepler elements, however I'm running into problems where a negative velocity or position will give me wrong results when trying ...
282 views

Numerical approximation of planetary orbit

New day new Problem... I did it the way Eric said and I created a method for the Acceleration! It looks like this: static Vector2 AccelerationOfTheMoon(Vector2 position) { double Mm = 7....
33 views

planetary obliquity, trace rotation axis along orbit with python

I'm trying to make a simple simulation of a planet that is being orbited by a moon. So far I have a 2 body problem that solves the planet and moon orbit. Now I would like to add a fixed rotation axis ...
29 views

How to draw an orbit from Orbital Elements using Transform3DGroup

I am trying to draw an orbit using the Transform3DGroup class in the C# .NET framework. I have orbital elements a, e, i, RAAN, ArgPer, trueAnom. The algorithm that spits these out for me also gives me ...
19 views

How to have three scales on a plot MatPlotLib [duplicate]

I am trying to plot Kinetic, Potential and Total energy on a graph using MatPlotLib, and have managed to get the three lines to appear on the graph, however, I can only get two scales to show. I don't ...
50 views

Can't see line on Matplotlib, can see points

I am trying to model an orbit using a 4th order Runge-Kutta method, which works and gives a good numerical output. My issue is that when I try and plot the orbit around a fixed point, I can only see ...
46 views

Python animation, line connecting two moving points and stopping at stationary line intersection

I'm making a program to simulate the retrograde motion of mars visible from Earth. So it's a plan view of Earth and Mars orbiting the sun There is also a line going from Earth to Mars. However, I need ...
98 views

Matlab - plot speed vector of a satellite in Keplerian orbit

I have to plot the speed vector of an object orbiting around a central body. This is a Keplerian context. The trajectory of object is deduced from the classical formula ( r = p/(1+e*cos(theta)) with e=...
50 views

Randomised solar system simulation collision detection issue

So I've developed a fairly stable simulation of a solar system with randomised planets, using basic equations of motion and Newtonian mechanics and using OpenGL with C. I also have some collision ...
87 views

Calculating satellite apparent magnitude

I'm trying to make an application that calculates ISS flyovers. I figured out how to actually get the flyover, but I am struggling with figuring out how to calculate the apparent magnitude of the ...
67 views

How to move an obriting body around an elliptical orbit path and changing the path

I have searched for a answer and have not found one yet. I have a elliptical Orbit path, and I'm wanting to move the orbiting body around the path in 3D space. Current attempts have not worked right. (...
78 views

I'm trying to create an orbital simulator using vpython but when I run it I just get a black screen

I used a youtube video for the basis of my code and adjusted it to include classes and object. The original code from the video works perfectly. My version of the code returns a black screen and even ...
68 views

Problem in creating leapfrog algorithm for 3-body problem using Python

I'm trying to write a code for 3-body problem with leapfrog algorithm. I'm using "Moving Stars Around" by Piet Hut & Jun Makino as a guide. The codes in the guide are written in C, but I'm trying ...
70 views

Orbital mechanisms in unity

it's been a week since I've been trying to create, with the unity engine, an orbital system. I have found different solutions and methods but they don't satisfy the result I would like to see. Can ...
130 views

Calculate an intercept to an orbit for a given speed.

Background: Attempting to write a game where 'FTL' travel is unaffected by gravity and acceleration is instant. How do I calculate where a planet will be, given the Kepler orbit for the planet and a ...
181 views

Calculate RA DEC/AZ EL of Lagrange Points seen from a location on earth

I would like to calculate the position of the five Lagrange points in the sky (L1 - L5) as RA/DEC or AZ/EL when provided with a UTC timestamp and a Lat/Lon/Alt observer location on earth. I was ...
25 views

How do I simulate a satellite that spins around an axis that is parallel to the direction of motion (i.e the ram direction) in NASA's GMAT software?

In NASA's General Mission Analysis Tool (GMAT) software, I am trying to simulate a small satellite going around the earth; one that is continuously pointing in the direction of motion. This satellite ...
168 views

Wrong longitude calculation in pyorbital

While playing a bit with pyorbital I noticed that the function get_lonlatalt() does not seem to return a correct longitude value to me. So I have compared the returned Lon/Lat/Alt to other tracking ...
718 views

Python 3.x Runge Kutta simple orbit

I am in the early stages of creating a program to plot orbits using the Runge-Kutta method, and would like to plot the orbit in 2D, however, no matter what the initial conditions are, i get a straight ...
72 views

C# Vector3D Operator '-' cannot be applied t type 'Vector3D' and double

The kind folks over at Space Exploration Beta have been helping me with calculating orbital elements but i have been stuck on applying one formula in C# for a bit of time and require a bit of advise. ...
125 views

How to install SGP4 V 1.4 package in Python 3.6

First post hear and relatively new coder. Trying to get this package: https://pypi.python.org/pypi/sgp4/ to work, only I have no idea what I'm doing. I'm not familiar with the file extension (.tar.gz) ...
247 views

Does anybody know how should I use animatedline in order to draw me an orbit immediately?

This is the main code %%%%%%%%%%%% Valori pentru Rcsc %%%%Pozitiile si vitezele pe cele 3 axe y0(1,1)= 743322.3616 ; y0(2,1)= -6346021.219 ; ...
683 views

How to write data in a .dat file Python new line multiple lists Satellite Orbit

I created a function to generate and propagate a satellite orbit. Now, I want to save all my data in a .dat file. I'm not sure how many for loops I need or quite how to do it. I want time, latitude, ...
341 views

Python OrbitalPy Traceback error Cartesian State Vectors Position and Velocity from Keplerian Elements

I am trying to get the cartesian position and velocity vectors for each propagation step in my orbit. I am using OrbitalPy http://pythonhosted.org/OrbitalPy/ to generate the orbit with classical ...
779 views

Plotting Elliptical Orbits

I am trying to plot elliptical orbits using python. Using formula r=a(1-e^2)/(1+ecos(theta)). The data points needed to be plotted are: values of a: 0.39, 0.72, 1.00, 1.52 values of e: 0.205, 0.007, ...
75 views

Optimizing Fly Overs in STK 10

I'm trying to do the math to find the the orbit which will fly over the greatest amount Observatories anywhere in the world. in STK 10, I'm plotting as many observatories as I can and then seeing ...
362 views

Simulating Orbits

So I'm trying to simulate the earth travelling around the sun where the velocity of the earth is determined by the angle its at to the origin and the horizontal. I did this by creating a function that ...
655 views

How can I solve Earth&Moon orbit in python in numerical simulation without vpython?

I have to calculate 2 body gravity system (Earth & Moon) without vpython. Purpose of this code is practicing numerical calculation and there is my code. import numpy as np from math import * ...
361 views

Matlab: Orbits of Planetary Bodies

The below code is something that I am cooking up. I am plotting the orbits of the Sun, Mercury, Earth and the Moon. I have gotten this far into the project but the orbit of Mercury is terrifyingly ...
34 views

Pseudo Force on a block kept on a turntable

Let us consider two cases : A block kept on a turntable and an observer standing by the block. ( as shown in Fig. 1 ) In this case, pseudo force on the block will be acting radially outwards so ...
504 views

Pygame orbit simulation issue

I have recently been making a orbit simulator using this equation: Here is my code: import pygame, math from pygame.locals import * from random import randint pygame.init() screen = pygame.display....
691 views

Python 2.7 Runge Kutta Orbit GUI

I'm trying to create a GUI in Python using Tkinter that plots the orbital path of a mass using the Runge-Kutta method. My GUI works fine but my issue is that it only plots a straight line no matter ...
91 views

Given acceleration from a accelerometer, how to modelize the position in space of the module?

I am getting the 3dimensional values of a grove pi module, acc_vector = (accX, accY, accZ) each 100 milliseconds . What I want is, using java, diplaying the movement that I make with the module......
318 views

Ground longitude/latitude under a satellite (cartesian coordinates) at a specfic epoch

The script I'm wanting to develop uses the cartesian coordinates (XYZ) from a satellite, and in conjunction with the range, elevation and azimuth from a location, I then take a satellite’s orbital ...
164 views

Satellite elevation angles negative

Until recently, the code I used to calculate the elevation and azimuth of a satellite from one particular site appeared to work. Then I used a different file from a site, not in the northern but in ...
408 views

Satellite position computation using Runge-Kutta 4

my issue is related to Runge-Kutta 4 (RK4) method and the correct iteration steps required for the state vector of an orbiting satellite. The below code (in Python) describes the motion based on the ...
344 views

Integrating differential equations of motion for orbit in Runge Kutta in C

I'm attempting to integrate the differential equations for planetary orbit using fourth order runge-kutta in C. The first equation that I attempted to integrate was for the position, dr/dt = sqrt((2/...
1k views

Rotate around an object to its direction of velocity (C#) (Unity3D)

(For Unity 5.3.5f1) Right now I am working on a 3D camera that is orbiting horizontally around the player. The player is a RigidBody rolling sphere. The player can freely rotate the axis horizontally ...
425 views

Earth pulling Sun in 2d Physics Engine

I'm creating a basic physics engine in python and I've managed to create a simple "planet" class to handle the maths. I've also created a basic working scenario when a small planet orbits a larger one ...
495 views

Find the distance between a 3D point and an Orientated Ellipse in 3D space (C++)

To give some background to this question, I'm creating a game that needs to know whether the 'Orbit' of an object is within tolerance to another Orbit. To show this, I plot a Torus-shape with a given ...
237 views

Finding true anomaly without ambiguity

I'm doing some computations on GPS parameters using Matlab. I have developed two equations for the true anomaly (orbital parameter). Where "vk" is what I am trying to obtain; "e" is the eccentricity ...
4k views

ThreeJS orbit controls set target without lookAt

I am trying to make a 3D viewer for building models. We have the model loaded and are trying to make some sort of interaction with the model. Therefor we are using OrbiControls for rotating, panning ...
322 views

outputs not matching from sgp4 in C++, pyephem and Heavens Above

I am trying to predict calculate the positions and predict passes of a LEO satellite from a TLE file. For convenience I just take the international space station. What I did so far, is to download ...
1k views

Java planetary orbit simulation: centering planets

I've created a simple planetary simulation where a planet orbits a star. The code for the orbit is this: a = a + vel * delta; planetX = Math.cos(a) * orbitRadius + parentStar.getX(); ...
1k views

Two-body orbit modelling problems

Skip to Update 2 below, if you don't want to read too much background. I'm trying to implement a model for simple orbital simulations (two body). However, when I try to use the code I've written, ...
514 views

Physical Moon Earth Sun System

http://pastebin.com/ccck8LjE Hello i've written this code to try and simulate the moon earth sun system. I get a circular orbit for the earth but the moon goes mad. Is there a better way to try and ...
46 views

Why is my camera orbit flying off in the negative z?

I lifted most of this code from a year-old unity thread. Whenever I run it, my camera goes running off in the negative z direction very quickly. I've been poking at the variables all day, but nothing ...
1k views

MATLAB orbit of earth and moon about the sun

We are trying to plot the orbit of the moon around the earth, which in turn is orbiting the sun. We are employing the Euler-Cromer method. This code works for a simulation of the planets. And it ... 