Esempio n. 1
0
 def apply(self, satellite: Satellite) -> ManeuverCost:
     satellite.wait_time(self.delta_t)
     return ManeuverCost(delta_t=self.delta_t)
Esempio n. 2
0
ax.scatter3D(0, 0, 0)

# Plot some orbits
geosync = Orbit.circular_with_period(KERBIN, 21549.425 * SECS)
radius = geosync.semimajor_axis
sat = Satellite(KERBIN, radius * Vec3.X, geosync.speed_at(radius) * Vec3.Y)
plot_orbit(sat.orbit)

BoostPrograde(200 * METERS / SECS).apply(sat)
plot_orbit(sat.orbit)

WaitTime(sat.orbit.period / 4).apply(sat)
BoostPrograde(200 * METERS / SECS).apply(sat)
plot_orbit(sat.orbit)

sat.wait_time(sat.orbit.period / 5)
BoostPrograde(-50 * METERS / SECS).apply(sat)
plot_orbit(sat.orbit)

WaitApoapsis().apply(sat)

PlaneChange(math.pi / 6).apply(sat)
plot_orbit(sat.orbit)

PlaneChange(math.pi / 3).apply(sat)
plot_orbit(sat.orbit)

# Plot the satellite
ax.scatter3D(*sat.pos.measure(1000 * METERS))

WaitAngle(math.pi / 2).apply(sat)