Last active
November 26, 2021 09:17
-
-
Save JHay0112/f7c003eddb4a58eea3b7796b18080824 to your computer and use it in GitHub Desktop.
ISS Simulation 500x Realtime with jmath.physics.simulation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
jmath ISS Simulation. | |
500x real spead. | |
Simulated over half second intervals. | |
Author: Jordan Hay | |
Date: 26/11/2021 | |
''' | |
# - Imports | |
from jmath.physics.simulation import GraphEnv, GraphObj | |
from jmath.linearalgebra import Vector | |
from jmath.graphics.shapes import Circle | |
# - Main | |
# Simulation Environment | |
env = GraphEnv("Earth Sim", 800, 800, 1/20e3) | |
# Simulation objects | |
earth = GraphObj(env, Circle(6371e3, fill = "blue"), env.centre(), Vector(0, 0), 5.972e24) | |
iss = GraphObj(env, Circle(50000, fill = "black"), env.centre() + Vector(0, 6371e3 + 420e3), Vector(7.66e3, 0), 420e3) | |
# Simulate at 0.5s interval at 500x realtime | |
env.start(0.5, 500) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment