The GroundVehicle Object

Top  Previous  Next

The GroundVehicle object is an object that allows you to access many of the same capabilities available to the Spacecraft object when modeling non-orbital vehicles in FreeFlyer.

 

GroundVehicle Objects

GroundVehicle Objects

 

 

Defining the GroundVehicle Object


A GroundVehicle object can be defined by using the GroundVehicle object editor or through FreeFlyer script. The different approaches are covered below.

 

Using the Object Editor

To define the GroundVehicle object within the object browser, you will use the GroundVehicle object editor. The GroundVehicle object editor contains a full listing of configurable properties as well as pages for configuring the attitude, visuals, propagator settings, and attached Sensor objects.

 

GroundVehicle Object Editor

GroundVehicle Object Editor

 

Using FreeFlyer Script

The GroundVehicle object can also be created using the FreeForm script editor. To define a GroundVehicle object's initial position in FreeFlyer script, specify its central body, bodydetic latitude, east longitude, and height as in the example below.

 

GroundVehicle GroundVehicle1;

GroundVehicle1.SetCentralBody(Earth);

GroundVehicle1.Latitude  = 39;

GroundVehicle1.Longitude = 255;

GroundVehicle1.Height          = 0.003; // 3 meters

 

The default velocity type for a GroundVehicle is the "Heading-Speed" option. To define a GroundVehicle object's initial motion with the "Heading-Speed" velocity type in FreeFlyer script, specify its heading and speed as in the example below.

 

GroundVehicle1.Heading          = 90; // deg (East Heading)

GroundVehicle1.Speed          = 65; // km/hr

 

The second velocity type available to the GroundVehicle is the "Surface-Velocity" option.  To define a GroundVehicle object's initial motion with the "Surface-Velocity" velocity type in FreeFlyer script, specify its heading and speed as in the example below.

 

GroundVehicle1.VelocityStateType = "Surface-Velocity";

GroundVehicle1.SurfaceVelocity = {65 /*East*/, 0 /*North*/}; // km/hr

 

 

Terrain Integration


A user has the option to include a Terrain object as a reference for defining the GroundVehicle's state using the GroundVehicle.SetReferenceTerrain() method. After using the method, the GroundVehicle will maintain a constant height with respect to the reference terrain and will report an error if you try to move the GroundVehicle outside the terrain. An example of this is provided below.

 

Terrain Terrain1;

 

// Set GroundVehicle Reference Terrain

GroundVehicle1.SetReferenceTerrain(Terrain1);

 

 

See Also


GroundVehicle Properties and Methods

Terrain Guide