importFall

ImportFall utility improves code readability and makes it easier to import FALL structures. Unlike most structures in this module, importFall is a function, not an object.

Calling

parameters type default Description
structureName string - what structure do you want to import?
copyToPath* string ”” where do you want the structure to be copied?

* optional parameters

Code Example

// First run importFall utility
runoncepath("0:/fall/utilities/importFall").

// now you can import any structure that FALL implements
// if the second argument is omitted, files will be run directly
// from FALL module directory(0:/fall/)
importFall("landingDataModel")
importFall("ascentController").
importFall("boostbackController").


// if you prefer to first copy files to specified location
// and run them from there you can call importFALL with the second argument
importFall("hoverSlamModel", "hoverSlamModel")
importFall("hoverSlamModel", "0:/your/path/")

Following code:

// importing ascentController
importFall("ascentController").

// importing hoverSlamModel
importFall("hoverSlamModel", "hoverSlamModel").

Is equivalent to:

// importing ascentController
runoncepath("0:/fall/controllers/ascentController")

// importing hoverSlamModel
copytopath("0:/fall/models/hoverSlamModel").
runoncepath("hoverSlamModel").

Use cases

Let’s assume that you have a bootscript of your rocket looking like this:

// BOOTSCRIPT

copytopath("0:/myrocket", "myrocket").
run myrocket.

It basically copies your main rocket script from 0:/ and runs it locally.

If your “myrocket.ks” script uses FALL, you can run importFall utility in the boostscript:

// BOOTSCRIPT

runoncepath("0:/fall/utilities/importFall").
copytopath("0:/myrocket", "myrocket").

run once myrocket.

This way you can use importFall utility in your main rocket file:

// MYROCKET SCRIPT
importFall("hoverSlamModel", "hoverSlamModel").
importFall("ascentController", "ascentController").
importFall("landingController", "landingController").

// your rocket code