Normal view
- Is it coincidence that the earth's rotation and revolution are in the same direction? โ astronomy.stackexchange.comIn a reference system where the sun is static, the rotation and revolution of the earth are, when viewed from above the north pole, both counterclockwise. Is it a coincidence that they agree? Or does ...
- Why are orbits around a black hole not circles? โ space.stackexchange.comMost of the pictures of a black hole are like this: Source: https://cdn.mos.cms.futurecdn.net/HsDtpFEHbDpae6wBuW5wQo-970-80.jpg.webp Why are the orbits around it not circles? Is there any other force ...
Why are orbits around a black hole not circles? โ space.stackexchange.com
- Why does everyone say that it is better to launch a satellite into polar orbit from the pole than from the equator? โ space.stackexchange.comIf the Earth were spherical, I would agree with this. But the Earth is not spherical. And at the equator, the radius of the Earth is 21 km greater than at the poles. By convention, the altitude of the ...
Why does everyone say that it is better to launch a satellite into polar orbit from the pole than from the equator? โ space.stackexchange.com
- Unable to reproduce graphs using my python script for conversion of Keplerian elements to state vectorsI have a script which converts Keplerian orbital elements to cartesian state vectors. Units are Years, AU and radians. Here is my code: def f_mean_anomaly(time_since_perihelion, semi_major_axis): orbital_period = math.sqrt(semi_major_axis**3) mean_anomaly = (2 * math.pi * time_since_perihelion) / orbital_period return mean_anomaly def f_apoapsis(semi_major_axis, eccentricity): return semi_major_axis * (1 + eccentricity) def f_periapsis(semi_major_axis, eccentricity): retu
Unable to reproduce graphs using my python script for conversion of Keplerian elements to state vectors
I have a script which converts Keplerian orbital elements to cartesian state vectors. Units are Years, AU and radians.
Here is my code:
def f_mean_anomaly(time_since_perihelion, semi_major_axis):
orbital_period = math.sqrt(semi_major_axis**3)
mean_anomaly = (2 * math.pi * time_since_perihelion) / orbital_period
return mean_anomaly
def f_apoapsis(semi_major_axis, eccentricity):
return semi_major_axis * (1 + eccentricity)
def f_periapsis(semi_major_axis, eccentricity):
return semi_major_axis * (1 - eccentricity)
def true_anomaly(mean_anomaly, eccentricity):
mean_anomaly -= math.floor(mean_anomaly / (2 * math.pi)) * (2 * math.pi)
if eccentricity > 0.5:
eccentric_anomaly = math.pi
else:
eccentric_anomaly = mean_anomaly
while True:
delta = (mean_anomaly - (eccentric_anomaly - eccentricity * math.sin(eccentric_anomaly))) / (1.0 - eccentricity * math.cos(eccentric_anomaly))
eccentric_anomaly += delta
if abs(delta) <= 1e-15 * eccentric_anomaly:
break
true_anomaly = 2.0 * math.atan(math.sqrt((1.0 - eccentricity) / (1.0 + eccentricity)) * math.tan(eccentric_anomaly / 2))
if true_anomaly < 0.0:
true_anomaly += (2 * math.pi)
return true_anomaly
def eccentric_anomaly(mean_anomaly, eccentricity):
mean_anomaly -= math.floor(mean_anomaly / (2 * math.pi)) * (2 * math.pi)
if eccentricity > 0.5:
eccentric_anomaly = math.pi
else:
eccentric_anomaly = mean_anomaly
while True:
delta = (mean_anomaly - (eccentric_anomaly - eccentricity * math.sin(eccentric_anomaly))) / (1.0 - eccentricity * math.cos(eccentric_anomaly))
eccentric_anomaly += delta
if abs(delta) <= 1e-15 * eccentric_anomaly:
break
nu = 2.0 * math.atan(math.sqrt((1.0 + eccentricity) / (1.0 - eccentricity)) * math.tan(0.5 * eccentric_anomaly))
if nu < 0.0:
nu += (2 * math.pi)
return eccentric_anomaly
def kepler_to_cartesian(true_anomaly, semi_major_axis, eccentricity, longitude_of_ascending_node, argument_periapsis, inclination):
phi = true_anomaly
a = semi_major_axis
e = eccentricity
omega = longitude_of_ascending_node
omega_prime = argument_periapsis
i = inclination
radius = a * ((1 - e**2) / (1 + e * math.cos(phi)))
r = radius
x_value = r * (math.cos(omega) * math.cos(omega_prime + phi) - math.sin(omega) * math.sin(omega_prime + phi) * math.cos(i))
y_value = r * (math.sin(omega) * math.cos(omega_prime + phi) + math.cos(omega) * math.sin(omega_prime + phi) * math.cos(i))
z_value = r * (math.sin(omega_prime + phi) * math.sin(i))
return x_value, y_value, z_value
and this is what I am trying to reproduce using the table below:
When I plot the RA using RA = x_value / (0.04 * parsec) # conversion from RA to x in the galactic center. This is what I get for
data = { 2023: (717.1470698197126, 3877.424985077577, 3755.4666153429635), 2021: (-4621.544894435808, -1177.926886174313, 3665.413967770432), 2020: (-3740.6813990975033, -3035.6632272995867, 529.702793927504), 2018: (62.25366882760013, -2147.079670435817, -2580.91000905229), 2015: (2876.854950728359, 2638.4632388430355, -51.787629080512914), 2012: (-4010.5553090894045, 480.7554395841735, 4939.903684859025), }
Is there something wrong with my conversion because this is nowhere close to what I am going for?
References used: https://downloads.rene-schwarz.com/download/M001-Keplerian_Orbit_Elements_to_Cartesian_State_Vectors.pdf, space.stackexchange.com/questions/60006/, space.stackexchange.com/a/19335/48051, space.stackexchange.com/a/8915/48051, space.stackexchange.com/a/59600/48051
- Is there a way to increase the orbital period of a tidally locked moon without changing the distance to its parent? โ worldbuilding.stackexchange.comThe internet tells me that the orbital period of a planet is calculated via Kepler's third law which, to my understanding, says Orbital period = semi-major axis3 I have a gas giant (radius of 1 ...
Is there a way to increase the orbital period of a tidally locked moon without changing the distance to its parent? โ worldbuilding.stackexchange.com
- Orbits permanently in shadow โ space.stackexchange.comThe James Webb telescope is parked at L2 of the Earth-Sun pair to minimise solar interference. I'm told that this is too far to be in full shade. How much radiation is blocked at this distance? Is ...
Orbits permanently in shadow โ space.stackexchange.com
- Can a meteor shower have a period of less than 1 year? โ space.stackexchange.comThis question is inspired by the SE question Can a meteor shower have a interval greater than 1 year? Most meteor showers repeat yearly (or natural multiples of 1 year). Can a meteor shower have a ...
Can a meteor shower have a period of less than 1 year? โ space.stackexchange.com
- What would it take for a space craft to travel to the sun's nadir and stop? โ worldbuilding.stackexchange.comIn a science fiction future universe, space craft routinely travel from a distance "above" a star's north or south pole to rendezvous with planets orbiting in the star system's orbital ...
What would it take for a space craft to travel to the sun's nadir and stop? โ worldbuilding.stackexchange.com
- Earth re-entry from orbit by a sequence of upper-atmosphere dips to reduce kinetic energy? โ space.stackexchange.comThere are quite a few questions on this sort of theme here, and I've also read one or two other things, like non-ballistic re-entry. So this might be a duplicate, but I don't think so. To clarify: I'm ...
Earth re-entry from orbit by a sequence of upper-atmosphere dips to reduce kinetic energy? โ space.stackexchange.com
- What assumptions were made about the sphericity of the Moon for the Apollo program? โ space.stackexchange.comI've just been reading about the Apollo program. Apollo 8 seems to have gone into a fairly circular lunar orbit 69 miles at perigee. Apollo 10 was pretty much similar, although they dipped down with ...
What assumptions were made about the sphericity of the Moon for the Apollo program? โ space.stackexchange.com
- Under which conditions could a planet's massive moon's orbit get closer to the planet? โ astronomy.stackexchange.comThe recent question How do we know the Moon was much closer than it is now? has piqued my interest. The answers are numerous and clear. But I started to wonder. The question includes the following ...
Under which conditions could a planet's massive moon's orbit get closer to the planet? โ astronomy.stackexchange.com
- Concerning a binary system of stars/planets/black holes could one of them be ejected before eventually merging or colliding? โ astronomy.stackexchange.comI was having a discussion with an undergraduate student of physics about binaries and their interactions with external celestial bodies (which could cause the ejection of one of the members in the ...
Concerning a binary system of stars/planets/black holes could one of them be ejected before eventually merging or colliding? โ astronomy.stackexchange.com
- What is the shape of orbit assuming gravity does not depend on distance? โ astronomy.stackexchange.comWe know that the orbit of the earth is elliptical considering the force of gravity is inversely proportional to the square of the distance. But assume that, gravity does not depend on distance. ...