Page 1 of 1

Vectors in FreeFlyer Script

Posted: Fri May 17, 2024 1:34 pm
by Sam Coco 661d5317c83bd
The Vector and CoordinateSystem objects provide powerful and convenient methods for Vector analysis and manipulation. Vectors can be displayed in 2D and 3D visualizations and can be used to easily determine the range and direction to a specified target, calculate intersections with Proximity Zones or Vehicle 3D Models, or define custom coordinate systems. I recommend referencing our guide on Vectors and Coordinate Systems for more code snippets and examples. I also recommend referencing our guide on Viewing Objects for setting up visualizations.

Here is a simple code showing you how to build a vector in FreeFlyer Script and display the vector in a ViewWindow:

Code: Select all

//Create Objects
Spacecraft Spacecraft1;
Vector SpacecraftToEarth;
ViewWindow ViewWindow1;

//Build Vector
SpacecraftToEarth.BuildVector(9, Spacecraft1, Earth);

//Configure ViewWindow
ViewWindow1.AddObject(Spacecraft1);
ViewWindow1.AddObject(SpacecraftToEarth);