Stars

Top  Previous  Next

The StarField object stores star data including the stars' GCI positions and magnitudes. Stars can be visualized in the 3D View, Celestial Sphere, Sensor View, or Star Map Viewpoint types. You can use the built-in stars, or define your own set of stars. For a summary of the coverage and contact output methods in FreeFlyer organized by observer and target object type, see the Contact Method Summary.

 

The following Sample Mission Plans (included with your FreeFlyer installation) demonstrate the use of the StarField object:

 

Coverage and Contact Samples

Star

 

Interplanetary Samples

Star Catalog

 

Using the Built-In Stars


The global Stars object exists in every Mission Plan and is pre-populated with a standard catalog of stars. These default Stars are shown automatically in the background of every view you create in FreeFlyer.

 

You can access information about the built-in stars using syntax such as:

 

// Accessing the built-in Stars

Report Stars.CatalogFilename, Stars.Count;

 

You can hide the built-in stars from any ViewWindow using the syntax:

 

ViewWindow vw();

 

vw.SetShowObject(Stars.ObjectId, 0); // Hide the built-in stars

 

vw.Update();

 

You can also change how the built-in stars are displayed; for example, you can turn on the star names, or change their colors or font settings.

 

vw.SetShowName(Stars.ObjectId, 1); // Display the names of the built-in stars

 

 

User-Defined StarFields


When defining a custom StarField, create the StarField object in the object browser or FreeFlyer script and choose the appropriate input type:

 

StarField StarField1;

StarField1.InputSource      = 0; // User Defined

StarField1.InputSource      = 1; // File

StarField1.InputSource      = 2; // Evenly distributed

 

StarField from Star Catalog File

StarField from Star Catalog File

 

Reading from a Catalog

To populate a StarField object from a star catalog file, you can specify the Star Catalog Filename in the object editor, or use the StarField.LoadCatalog() method in FreeFlyer script. The following star catalog file formats are supported:

 

FreeFlyer Star Catalog

SKYMAP Catalog

OpenUniverse Catalog

 

To populate a StarField object from a catalog file using FreeFlyer script, use the StarField.LoadCatalog() method as shown below, or use the Get command.

 

StarField1.LoadCatalog("ffstars.dat");

 

Creating a Custom StarField

To create a Custom Star Field:

Choose User Defined from the Star Source drop-down.

Enter the Number of Stars and choose an Input Type for the position of each star: Right Ascension and Declination pairs or an X, Y, X GCI unit vector.

Enter data for each star.

 

Custom StarField Object Editor

Custom StarField Object Editor

 

To configure a custom set of stars in a StarField object using FreeFlyer script, use the following syntax:

 

StarField StarField1;

StarField1.InputSource      = 0; // User Defined

StarField1.Count            = 2;

 

StarField1.StarX[0]         = -0.187454053;

StarField1.StarY[0]         = 0.939217788;

StarField1.StarZ[0]         = -0.28762984;

StarField1.StarMagnitude[0] = -1.46;

StarField1.StarColor[0]     = 16776700;

StarField1.StarName[0]      = "Sirius";

StarField1.StarID[0]        = 0;

 

StarField1.StarX[1]         = -0.06322197;

StarField1.StarY[1]         = 0.602739609;

StarField1.StarZ[1]         = -0.79542941;

StarField1.StarMagnitude[1] = -0.72;

StarField1.StarColor[1]     = 15925247;

StarField1.StarName[1]      = "Canopus";

StarField1.StarID[1]        = 1;

 

Note: If Evenly Distributed is chosen in the Star Source drop-down, the positions of the stars are computed for you.

 

 

See Also


StarField Properties and Methods

Star Catalog Data File

Star Map Viewpoint Type

Contact Method Summary

Global Types