Skip to content

Instantly share code, notes, and snippets.

View jorgepiloto's full-sized avatar
🐺
Indomable

Jorge Martínez jorgepiloto

🐺
Indomable
View GitHub Profile
@jorgepiloto
jorgepiloto / .vimrc
Last active May 1, 2019 19:54
My vim configuration
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"
"
" CUSTON CONFIGURATION FOR VIM
" Author: Jorge Martínez
"
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
""""""""""""""""""""""""""""""""""""""""""""""""""" VIM General: Configuration
set nocompatible " required
@jorgepiloto
jorgepiloto / groundtrack.py
Last active May 4, 2019 12:32
This gist holds the groundtrack plotter function
""" This script holds the function for plotting the groundtracks. """
# Poliastro modules
from poliastro.twobody import Orbit
from poliastro.bodies import Earth
# Astropy modules
from astropy import coordinates as coord
from astropy import units as u
Σ Φ Ψ Ξ Δ λ Ψ Δ Λ Σ Φ Δ λ Ψ ξ Δ ϗ Ξ Δ Φ Ψ Ξ ϑ λ Ψ Λ Σ Θ ϑ Ξ ϗ Φ ϑ λ Ψ Σ Ξ Ψ λ ϑ Ξ Ψ ζ β Σ φ Δ Ψ Σ Φ Ψ Σ Ξ Ψ ξ Λ ϗ Ξ Ξ ϑ Ψ ϖ Σ Ξ Ψ Π Σ ϖ Λ Σ φ Δ Ξ Ψ Ω Ψ Π Λ Σ Φ ϖ ϗ ϖ ϑ Ψ Δ Ψ Ξ Δ Ψ Θ Δ φ ϗ Δ Ψ ϖ Σ Ψ Ξ ϑ λ Ψ Γ Δ Θ ϗ Φ ϑ λ Ψ Σ Ξ Ψ Δ Λ Λ ϗ Σ Λ ϑ Ψ α Δ Ψ Σ Ξ Ψ Δ Λ Λ ϗ Σ Λ ϑ Ψ α Δ Ψ Σ λ Ψ ξ Δ Φ ϖ Σ Λ Δ Ψ ϖ Σ Ψ Φ ϗ Σ ξ Ξ Δ Ψ λ β Ψ Π ϑ Φ Γ Ρ ϑ Ψ Δ Ξ Ψ α ϗ Σ Φ μ ϑ Ψ Ξ ϑ Ψ λ Δ Ξ β ϖ Δ Φ Ψ Ξ Δ λ Ψ ε Ξ Δ β μ Δ λ Ψ ϖ Σ Ξ Ψ Π Δ ζ ϑ Φ Δ Ξ Ψ Ω Ψ Δ Φ ϗ Θ Δ Φ ϖ ϑ Ψ Ξ Δ Ψ μ Λ ϑ Π Δ Ψ Π Δ Λ Ψ Σ λ ϑ λ Ψ Γ Σ Λ Λ ϑ λ Ψ Σ Ξ Ψ Δ Λ Λ ϗ Σ Λ ϑ Ψ α Δ Ψ Σ Ξ Ψ Δ Λ Λ ϗ Σ Λ ϑ Ψ α Δ Ψ Ξ Δ λ Ψ Π Σ Φ Δ λ Ψ Ω Ψ Ξ Δ λ Ψ α Δ η β ϗ μ Δ λ Ψ λ Σ Ψ α Δ Φ Ψ Π Δ Λ Ψ Ξ Δ Ψ Θ ϗ λ Θ Δ Ψ λ Σ Φ ϖ Δ Ψ Ξ Δ λ Ψ Π Σ Φ Δ λ Ψ λ ϑ Φ Ψ ϖ Σ Ψ Φ ϑ λ ϑ μ Λ ϑ λ Ψ Ξ Δ λ Ψ α Δ η β ϗ μ Δ λ Ψ λ ϑ Φ Ψ Δ ζ Σ Φ Δ λ
import numpy as np
from astropy import units as u
from poliastro.bodies import Earth
from poliastro.core.angles import (
E_to_nu,
_kepler_equation,
_kepler_equation_prime,
nu_to_M,
)
from astropy import units as u
from poliastro.bodies import Earth
from poliastro.twobody import Orbit
from poliastro.twobody.propagation import cowell, kepler_improved
def test_near_parabolic_orbit():
""" Compares Cowell and Kepler improved propagators for bug in #474. """
r = [8.0e3, 1.0e3, 0.0] * u.km
import matplotlib.pyplot as plt
from astropy import units as u
from astropy.time import Time
from poliastro.bodies import Earth
from poliastro.frames import GeocentricSolarEcliptic
from poliastro.plotting.static import StaticOrbitPlotter
from poliastro.twobody import Orbit
EPOCH = Time("2018-02-19")
import matplotlib.pyplot as plt
from astropy import units as u
from astropy.time import Time
from poliastro.bodies import Earth, Mars
from poliastro.maneuver import Maneuver
from poliastro.plotting.static import StaticOrbitPlotter
from poliastro.twobody import Orbit
# Departure and time of flight for the mission
@jorgepiloto
jorgepiloto / units_nu_to_M.py
Created August 8, 2019 10:14
poliastro issue #751
from astropy import units as u
from poliastro.twobody.angles import nu_to_M
from poliastro.core.angles import nu_to_M as nu_to_M_core
nu = 150 * u.deg
ecc = 0.08 * u.one
# If making use of radians in high-level function
M = nu_to_M(nu.to(u.rad), ecc)
print("\nHigh level function radian input results")
@jorgepiloto
jorgepiloto / atmosphere_tables.py
Created August 8, 2019 10:30
Creates atmospheric tables
from astropy.io import ascii
from astropy import units as u
from poliastro.atmosphere.models import COESA62
from prettytable import PrettyTable
import numpy as np
coesa62 = COESA62()
t = PrettyTable()
t.align='l'
@jorgepiloto
jorgepiloto / plot_sin.py
Created December 22, 2019 12:31
plot_sin.py
# -*- coding: utf-8 -*-
"""
Introductory example - Plotting sin
===================================
This is a general example demonstrating a Matplotlib plot output, embedded
rST, the use of math notation and cross-linking to other examples. It would be
useful to compare the :download:`source Python file <plot_0_sin.py>` with the
output below.