Setting up your Script
Now that we've created our template file, we can begin to start writing our script.
Although we created the system, we actually don't know where Mars will be by the time the rocket gets there. To figure out what we need, we'll use the axana.intercept
function to find the point that we'll land at.
Now unit_vector
holds the direction towards the point we're aiming for, and speed
holds our average travel speed.
If you get a NoneType
error, that means your rocket couldn't find an intercept. You can try adjusting the speed range ((0, 1.1e4)
) or editing your template.
With those variables, we can now write our modifier:
This is a highly simplified version of a rocket launch that does not account for any forces other than thrust and gravity.
Last updated