WsfWaypoint

WsfWaypoint

Construction: WsfWaypoint newObj = WsfWaypoint();
Clone: WsfWaypoint newObj = WsfWaypoint(other);

Static Methods

WsfWaypoint Create(double aLat, double aLon, double aAlt, double aSpeed, string aPointType)
WsfWaypoint Create(double aLat, double aLon, double aAlt, double aSpeed, string aPointType, string aEndOfPathOption)
WsfWaypoint Create(WsfGeoPoint aGeoPoint, double aSpeed)

Creates a waypoint at the given location.

aSpeed

The speed of the waypoint. May be negative to represent no change in speed.

aPointType

Specifies the type of waypoint. Valid values are: LATITUDE_AND_LONGITUDE, RELATIVE_OFFSET, ABSOLUTE_HEADING_DISTANCE, ABSOLUTE_HEADING_TIME, RELATIVE_HEADING_DISTANCE, RELATIVE_HEADING_TIME, ALTITUDE_DISTANCE, ALTITUDE_TIME, SPEED_DISTANCE, SPEED_TIME.

aEndOfPathOption

Specifies the behavior for the last waypoint in the route. Valid values are: MOVER_DEFAULT, EXTRAPOLATE, STOP, REMOVE.

Default LATITUDE_AND_LONGITUDE and MOVER_DEFAULT

Example:

WsfWaypoint w1 = WsfWaypoint.Create(40, -90, 10000, 246, LATITUDE_AND_LONGITUDE);

Methods

double Latitude()

Returns the waypoint’s latitude [-90…90] (decimal degrees).

double Longitude()

Returns the waypoint’s longitude [-180…180] (decimal degrees).

double Altitude()

Returns the waypoint’s altitude (meters).

double AltitudeMSL()

Returns the waypoint’s altitude above mean sea level (meters).

Note

MSL cannot be computed on non-positional waypoints with AGL altitude.

double AltitudeAGL()

Returns the waypoint’s altitude above ground level (meters).

Note

AGL cannot be computed on non-positional waypoints with MSL altitude.

double Heading()

Returns the waypoint’s heading [-180..180] (decimal degrees) relative to due north (clockwise is positive).

void SetHeading(double aHeading)

Sets the waypoint’s heading [-180..180] (decimal degrees) relative to due north (clockwise is positive).

void SetCallback(string aScriptName)
void SetCallback(string aScriptName, string aProcessorName)

Defines the script method to be invoked when this waypoint is encountered in the route. The first form will invoke the specified script that is defined at the platform level. The second form will invoke the specified script that is defined the named processor. This indicated processor must be of a type derived from WSF_SCRIPT_PROCESSOR

void SetCallback(Method aMethod)
Adds the specified callback Method to the waypoint. The given method should take 0 or 1 argument as follows:

void A_Method() void A_Method(WsfPlatform aCaller)

string GoToLabel()

Returns the ‘goto’ label of the waypoint.

void SetGoToLabel(string aGoToLabel)

Sets the ‘goto’ label of the waypoint that the platform will maneuver to after reaching the current waypoint.

Note

If one of the WsfRoute AddCallBack methods is used to attach a callback to this waypoint, then the goto might not necessarily work.

string Label()

Returns the label of the waypoint.

void SetLabel(string aLabel)

Sets the label of the waypoint. This waypoint now has a label and can be used in conjunction with a ‘goto’.

double Speed()

Returns the speed of the waypoint. A negative speed indicates no change.

void SetSpeed(double aSpeed)

Sets the speed of the waypoint. A negative speed indicates no change.

double ClimbRate()

Returns the climb-rate of the waypoint. A negative climb-rate indicates ‘use previous’.

void SetClimbRate(double aClimbRate)

Sets the climb-rate of the waypoint. A negative climb-rate indicates ‘use previous’.

double LinearAcceleration()

Returns the linear-acceleration of the waypoint. A negative linear-acceleration indicates ‘use previous’.

void SetLinearAcceleration(double aAcceleration)

Sets the linear-acceleration of the waypoint. A negative linear-acceleration indicates ‘use previous’.

double RadialAcceleration()

Returns the radial-acceleration of the waypoint. A negative radial-acceleration indicates ‘use previous’.

void SetRadialAcceleration(double aAcceleration)

Sets the radial-acceleration of the waypoint. A negative radial-acceleration indicates ‘use previous’.

WsfGeoPoint Location()

Returns the location of the waypoint.

void SetLocation(WsfGeoPoint aLocation)

Sets the location of the waypoint.

void SetAltitude(double aAltitude, bool aIsAGL)

Sets the waypoint’s altitude in meters. If aIsAGL is true, the altitude is the distance above ground.

void SetAltitudePrevious()

Specifies that the waypoint does not change the altitude of the platform. This is the same as a waypoint without a specified altitude.

string Switch()

Returns the switch type of the waypoint. Possible values are “default”, “time”, “distance”, “approach”, “passing”, “external”.

void SetSwitch(string aSwitchType)

Sets the waypoint switch type. Options are “passing”, “approach”, “default”.

void SetSwitchTime(double aSwitchTime)

Sets the waypoint switch type to timed, and sets the time to aSwitchTime (seconds).

void SetSwitchDistance(double aSwitchDistance)

Sets the waypoint switch type to distance, and sets the distance to aSwitchDistance (meters).

void SetTimeToPoint(double aTimeToPoint)

Sets the amount of time (in seconds) it should take to travel from the previous point to this point. This function is valid only if the current waypoint type is LATITUDE_AND_LONGITUDE or RELATIVE_OFFSET.

void SetEndOfPathOption(string aEndOfPathOption)

Sets the end of path option for the waypoint. This should be set on the last waypoint in a route. Valid options are: “”, “extrapolate”, “stop”, or “remove”. The empty string indicates mover-default behavior.

int Index()

Returns the (zero-based) position of this waypoint in the route. This is only valid if the waypoint is a member of a route.

string Mode()

Returns the mover mode setting for this waypoint.

void SetMode(string aMode)

Sets the mover mode setting for this waypoint. Effect is Mover implementation-defined. The first WSF Mover type to implement a Waypoint- or script-triggered Mode transition is the WSF_ROTORCRAFT_MOVER.

Auxiliary Data Methods

Auxiliary Data is a collection of optional named user data attributes that can be stored with the object. The framework will maintain the attributes but in no other way attempts to use the data contained within. The definition and use of any attribute is defined purely by the user.

bool AuxDataBool(string aName)
int AuxDataInt(string aName)
double AuxDataDouble(string aName)
string AuxDataString(string aName)
Object AuxDataObject(string aName)

Retrieve the value of the auxiliary data attribute with the indicated name. If the attribute does not exist then a default value will be returned (false for bool, 0 for int and 0.0 for double).

bool AuxDataExists(string aName)
bool CheckAuxData(string aName)

Returns true if an auxiliary data member exists with the specified name.

bool HasAuxData()

Returns true if the object has auxiliary data.

bool DeleteAuxData(string aName)

Delete the auxiliary data attribute with the indicated name. Returns true if the attribute exists and was deleted, or false if the attribute did not exist.

void SetAuxData(string aName, bool aValue)
void SetAuxData(string aName, int aValue)
void SetAuxData(string aName, double aValue)
void SetAuxData(string aName, string aValue)
void SetAuxData(string aName, Object aValue)

Set the value of the auxiliary data attribute with the indicated name. The last form of SetAuxData() can store any script object type.

Map<string, string> GetAllAuxDataTypes()

Return the names and types of all auxiliary data attributes in the form of a Map<string,string>. Map keys are valid names of auxiliary data attributes. Map values are type names corresponding to valid auxiliary data attribute names.