With all the functionality available to users in FreeFlyer’s scripting and GUIs, there are a few hidden gems that some users may not be aware of which are very useful. Here are a few of our favorite tips and tricks for maximizing FreeFlyer’s utility – if you already knew all of these, consider yourself a power user!
You probably already knew that you can save ViewWindow screenshots in FreeFlyer by clicking “Export” under the Output Properties tab, or save entire Workspace screenshots via the Workspace drop-down menu. But did you know you can also save an image of a 2D/3D ViewWindow at any resolution – even higher than the monitor you’re running FreeFlyer on? It’s done in FreeFlyer script using the SaveImage command, which saves a raw screenshot of your ViewWindow independently of it being displayed on your monitor. To use this handy command, at the appropriate point in your Mission Plan call the syntax:
ViewWindowName.SaveImage("picture format", "picture name", resolutionwidth, resolutionheight);
The SaveImage command allows for saving screenshots in seven different formats at any size resolution. The maximum resolution you’re able to capture will be dependent on the fidelity of the graphics card you’re using.
Figure 1: SaveImage Command
The example syntax above was used to create an 8k resolution image from the “Chain Visibility” Sample Mission Plan – click the image below for full resolution and zoom in to appreciate the level of detail!
Figure 2: High-Res FreeFlyer Screenshot
When you create a variable in FreeFlyer script, you can also create a text description to accompany it for any future use when hovering over the variable. This is accomplished via a triple-slash (///) after the variable creation (with no spaces after the semicolon), followed by the text description.
Figure 3: FreeFlyer Descriptions for Variables
This is extremely useful for larger Mission Plans with dozens or hundreds of variables, and is an easy addition to make to existing Mission Plans without any other modifications.
Aliases make working with longer sections of FreeFlyer script a breeze by allowing users to assign a long line of script into a virtual variable. Aliases can be applied to Objects, Properties, Methods, math expressions, and even other aliases. Additionally, aliases can be used in combination with the above tip for descriptions, so that hovering over your alias defines both what it is actually representing (the definition) as well as its description.
Figure 4: Making Script Aliases
See the “ScriptAliases” Sample Mission Plan under the FreeFlyer Scripting folder for several examples of how to create and use aliases.
For live mission simulations, you may want to run Mission Plans (i.e. propagate spacecraft) at real-time speed. This is easily doable using the SystemTime() call which will assign a spacecraft’s epoch to your computer’s system time. You’ll need to put the propagation inside an infinite loop, and also define a time increment at which FreeFlyer will check the system time by using the Pause command. A time increment of one second is a good starting point, and can be adjusted up or down based on user preference. The syntax is:
Figure 5: Propagating Spacecraft at Real-Time Speed
You may also want to propagate your spacecraft at real-time speed but at a different epoch than your current system time; this is also possible by applying a time offset to adjust to the date of your preference, as follows:
Figure 6: Time Offset
This propagation method is very useful for live mission operations, in particular for simulating live telemetry when real telemetry feeds are not available.
Curious about these tips or anything else in FreeFlyer? Hit us up at email@example.com and we’ll be glad to help!