~/gmat-git/application/bin/gmatpy/gmat_py.py in Initialize(*args)
23606
23607 def Initialize(*args):
> 23608 return _gmat_py.Initialize(*args)
23609
23610 def Clear(*args):
APIException: The following objects were not initialized:
TOI
See the script below to reproduce this issue.
Does the API support using the ImpulsiveBurn object? Does it require to be connected to another object or some other trick to get it to work?
#=============================
# begin script
#=============================
from load_gmat import *
# spacecraft
sat = gmat.Construct("Spacecraft", "Sat")
# force model
force_model = gmat.Construct("ForceModel")
# An 8x8 JGM-3 Gravity Model for Earth
earthgrav = gmat.Construct("GravityField")
earthgrav.SetField("BodyName","Earth")
earthgrav.SetField("Degree",4)
earthgrav.SetField("Order",4)
earthgrav.SetField("PotentialFile","JGM2.cof")
force_model.AddForce(earthgrav)
# propagation container
pdprop = gmat.Construct("Propagator","PDProp")
# Assign a numerical integrator
gator = gmat.Construct("PrinceDormand78", "Gator")
pdprop.SetReference(gator)
# Burn
toi = gmat.Construct("ImpulsiveBurn","TOI")
# Assign the force model to the propagator
pdprop.SetReference(force_model)
pdprop.AddPropObject(sat)
# Perform top level initialization
gmat.Initialize() # <- line where the API exception is thrown