Skip to content
This repository has been archived by the owner on Aug 26, 2024. It is now read-only.

Additional examples for thesis #101

Merged
merged 10 commits into from
Mar 31, 2017
Prev Previous commit
Add hohmann example
  • Loading branch information
ChristopherRabotin committed Mar 31, 2017
commit c7af9bd133c5cf94e6b2ca422f3674e6be75bb5e
1 change: 1 addition & 0 deletions examples/imd/galileo/catalog-galileo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"version":"1.0","name":"galileo","items":[{"class":"spacecraft","name":"galileo-0","startTime":"1992-12-09 12:00:00 +0000 UTC","endTime":"1996-03-22 12:00:00 +0000 UTC","center":"Sun","trajectoryFrame":"EclipticJ2000","trajectory":{"type":"InterpolatedStates","source":"prop-galileo-0.xyzv"},"label":{"color":[0.1,0.1,1],"fadeSize":1000000,"showText":true},"trajectoryPlot":{"color":[0.1,0.1,1],"lineWidth":1,"duration":"1200 d","lead":"0 d","sampleCount":10}}]}
16 changes: 16 additions & 0 deletions examples/mrohohmann/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package main

import (
"fmt"

"github.com/ChristopherRabotin/smd"
)

func main() {
for i, a := range []float64{290 + smd.Earth.Radius, 39300 + smd.Earth.Radius} {
initOrbit := smd.NewOrbitFromOE(a, 0, 0.0, 0, 0, 180, smd.Earth)
tgtOrbit := smd.NewOrbitFromOE(smd.Earth.SOI, 0, 0.0, 0, 0, 180, smd.Earth)
_, _, tof := smd.Hohmann(initOrbit.RNorm(), initOrbit.VNorm(), tgtOrbit.RNorm(), tgtOrbit.VNorm(), smd.Earth)
fmt.Printf("[%d] %s (~ %f days)\n", i, tof, tof.Hours()/24)
}
}