Skip to content

Latest commit

 

History

History
89 lines (65 loc) · 3.42 KB

README.md

File metadata and controls

89 lines (65 loc) · 3.42 KB

Installation Instructions

pip3.5 install --user poliastro

How to Use

First you import all the modules needed for this project;

import numpy as np
from astropy import units as u
from poliastro.bodies import Earth, Sun
from poliastro.twobody import Orbit
from matplotlib import pylab as plt

Next you need the data for Mars at J2000 from JPL HORIZONS which is;

a = 1.523679 * u.AU,
ecc = 0.093315 * u.one,
inc = 1.85 * u.deg,
raan = 49.562 * u.deg,
argp = 286.537 * u.deg,
nu = 23.33 * u.deg.

After you complete that, you have to define Mars:

mars = Orbit.from_classical(Sun, a, ecc, inc, raan, argp, nu)
#then plot
from poliastro.plotting import OrbitPlotter
op = OrbitPlotter()
op.plot(mars, label="Mars")

Then redefine the elements;

a = 1.0779 * u.AU
ecc = 0.8268 * u.one
inc = 22.852 * u.deg
raan = 88.0822 * u.deg
argp = 31.297 * u.deg
nu = 346.34 * u.deg

Now you define a new orbit;

icarus = Orbit.from_classical(Sun, a, ecc, inc, raan, argp, nu)

Next plot icarus and Mars

op = OrbitPlotter()
op.plot(mars, label="Mars")
op.plot(icarus,label="Icarus")
plt.show()
plt.savefig('asteroids.png')

Your code should print out two different images.

HuntAsteroids Original Project Description

There's over 700,000 discovered asteroids in our solar system. Because they are so small, and occupy a region so vast, it's often difficult to depict them visually. If asteroids are shown orbiting the Sun next to the planets, often the sizes of the asteroids have to be greatly exaggerated in order to be seen. This makes space seem more crowded then it actually is. A very popular asteroid depiction is by Scott Manley: https://www.youtube.com/watch?v=BKKg4lZ_o-Y

Active researchers struggle with this problem, as do science communicators trying to help others understand the layout of our solar system. Create one solution by depict the asteroids in our solar system. You can choose to try to show all the asteroids, or a small portion of them.

Tips:

  • Eventually it would be great to create a movie, but start with a single image.
  • With 700,000 asteroids, these plots can take a while to make. Start small while you're figuring things out, with just a few asteroids, and add the rest in later.

Data Resources