/
sc.go
23 lines (20 loc) · 897 Bytes
/
sc.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package main
import "github.com/ChristopherRabotin/smd"
// OutboundHyp returns the spacecraft.
func OutboundHyp(name string) *smd.Spacecraft {
/* Building spacecraft */
eps := smd.NewUnlimitedEPS()
thrusters := []smd.EPThruster{smd.NewGenericEP(5, 5000)} // VASIMR (approx.)
dryMass := 10000.0
fuelMass := 5000.0
return smd.NewSpacecraft(name, dryMass, fuelMass, eps, thrusters, false, []*smd.Cargo{}, OutboundWaypoints())
}
// InboundSpacecraft returns the spacecraft returning to Earth.
func InboundSpacecraft(name string, target smd.Orbit) *smd.Spacecraft {
/* Building spacecraft */
eps := smd.NewUnlimitedEPS()
thrusters := []smd.EPThruster{smd.NewGenericEP(5, 5000)} // VASIMR (approx.)
dryMass := 10000.0
fuelMass := 2000.0 // Only 2/5 of the initial fuel.
return smd.NewSpacecraft(name, dryMass, fuelMass, eps, thrusters, false, []*smd.Cargo{}, FromMarsWaypoints(target))
}