WsfArticulatedPart

WsfArticulatedPart inherits WsfPlatformPart

WsfArticulatedPart is the base class for physical parts on a platform such as sensors and comm devices. It encapsulates the ability of the part to articulate with respect to the platform.

General Methods

double Pitch()

Returns the pitch angle in degrees.

void SetPitch(double aPitch)

Sets the pitch to the angle provided in degrees.

double Roll()

Returns the roll angle in degrees.

void SetRoll(double aRoll)

Sets the roll to the angle provided in degrees.

double Yaw()

Returns the yaw angle in degrees.

void SetYaw(double aYaw)

Sets the yaw to the angle provided in degrees.

Vec3 Location()

Returns the location of the part in the The Entity Coordinate System (ECS) coordinate system.

double X()
double Y()
double Z()
double DX()
double DY()
double DZ()

Returns the X, Y, Z position and DX, DY, DZ velocity relative to the host platform. This is used primarily for visualization only.

void SetXYZ(double aX, double aY, double aZ)
void SetDXYZ(double aDeltaX, double aDeltaY, double aDeltaZ)

Sets the articulated part’s position or velocity relative to the host platform (meters). This is used primarily for visualization only.

bool CanSlewInAzimuth()
bool CanSlewInElevation()

Indicates if the device can ‘slew’ in the selected direction, as defined by the slew_mode.

double SlewMinimumAzimuth()
double SlewMaximumAzimuth()
double SlewMinimumElevation()
double SlewMaximumElevation()

Returns the requested slew angle limit (in degrees) as defined by the azimuth_slew_limits and elevation_slew_limits.

bool CanCueInAzimuth()
bool CanCueInElevation()

Indicates if the device can cue in the selected direction.

Note

The slew limits and cue limits of a device are the same if the device does not support mode-specific cue limits (e.g., sensors).

double CueMinimumAzimuth()
double CueMaximumAzimuth()
double CueMinimumElevation()
double CueMaximumElevation()

Returns the indicated cue angle limit (in degrees).

Note

The slew limits and cue limits of a device are the same if the device does not support mode-specific cue limits (e.g., sensors).

string MaskingPatternState()

Returns the current masking pattern state of the articulated platform part.

void SetMaskingPatternState(string aState)

Sets the articulated platform part’s masking pattern state to the given state.

Relative Geometry Methods

WsfGeoPoint ApparentLocationOf(WsfGeoPoint aTrueLocation, double aEarthRadiusScaleFactor)

This method is used to compute the ‘apparent’ location of an object (i.e., the perceived location of an object which accounts for atmospheric refraction). The apparent location may be needed to properly cue sensors which have very narrow beams.

Example:

WsfSensor sensor = PLATFORM.Sensor("thisSensor");
sensor.CueToPoint(sensor.ApparentLocationOf(TRACK.CurrentLocation(), 1.333333));

The value ‘1.333333’ is the typical value for a radar.

double RelativeAzimuthOf(WsfGeoPoint aPoint)
double RelativeElevationOf(WsfGeoPoint aPoint)

Return the azimuth or elevation angle of the supplied point with respect to the current orientation of the articulated part. If a cue is active then the return value will be with respect to the cued orientation of the part, otherwise it will be with respect to the uncued orientation.

The returned azimuth angle will be in the range of +/- 180 degrees, with positive values going to the right. The returned elevation angle will be in the range of +/- 90 degrees, with positive values going up.

Vec3 ConvertPCSVectorToWCS(Vec3 aPCS_Vector)

Given a vector in the Part Coordinate System (PCS), convert that vector to the World Coordinate System (WCS).

Vec3 ConvertWCSVectorToPCS(Vec3 aWCS_Vector)

Given a vector in the World Coordinate System (WCS), convert that vector to the Part Coordinate System (PCS).

Vec3 ConvertPCSVectorToECS(Vec3 aPCS_Vector)

Given a vector in the Part Coordinate System (PCS), convert that vector to the Entity Coordinate System (The Entity Coordinate System (ECS)).

Vec3 ConvertECSVectorToPCS(Vec3 aWCS_Vector)

Given a vector in the Entity Coordinate System (The Entity Coordinate System (ECS)), convert that vector to the Part Coordinate System (PCS).

Cueing Methods

bool CueToLLA(double aLat, double aLon, double aAlt)

Sets the cued location to the provided latitude, longitude, and altitude (degrees, degrees, meters). Returns true if the requested cue is within the part limits.

bool CueToWCS(double aX, double aY, double aZ)
bool CueToWCS(Vec3 aLocationWCS)

Set the cued location to the provided WCS location x, y, and z (meters, meters, meters). Returns true if the requested cue is within the part limits.

bool CueToPoint(WsfGeoPoint aPoint)

Sets the cued location the location defined by the provided point. Returns true if the requested cue is within the part limits.

bool CueToTrack(WsfTrack aTrack)

Sets the cued location to the location defined by the provided track. Returns true if the requested cue is within the part limits.

bool CueToAbsoluteAzEl(double aAz, double aEl)

Cues to the part specified azimuth and elevation relative to the horizontal plane (no pitch or roll) of the host platform. The angles must be provided in degrees. Returns true if the requested cue is within the part limits.

Note

The supplied angles are converted to part-relative angles at the time of the call.

bool CueToRelativeAzEl(double aAz, double aEl)
bool CueToAzEl(double aAz, double aEl)

Cues the part to the specified azimuth and elevation relative to the uncued orientation of the part. The must be provided in degrees. Returns true if the requested cue is within the part limits.

void ClearCueing()

Clear the current cue.

bool IsCued()

Returns true if a cue is active.

bool IsSlewing()

Returns true if the part is currently slewing to a cue.

double TimeToCueToLLA(double aLatitude, double aLongitude, double aAltitude)
double TimeToCueToWCS(double aX, double aY, double aZ)
double TimeToCueToWCS(Vec3 aLocationWCS)
double TimeToCueToPoint(WsfGeoPoint aPoint)
double TimeToCueToTrack(WsfTrack aTrack)
double TimeToCueToAbsoluteAzEl(double aAbsoluteAzimuth, double aAbsoluteElevation)
double TimeToCueToRelativeAzEl(double aRelativeAzimuth, double aRelativeElevation)
double TimeToCueToAzEl(double aRelativeAzimuth, double aRelativeElevation)

Returns the amount of time in seconds it takes for the part to orient in azimuth and elevation to the given location. Must have an azimuth_slew_rate and/or elevation_slew_rate defined, otherwise the rate is instantaneous. For sensors, if the azimuth_cue_rate and/or the elevation_cue_rate are defined then the minimum azimuth rate and minimum elevation rate will be used in the calculation.

Note

If the given location is outside of the slew limits, -1 is returned.

double ActualCuedAzimuth()
double ActualCuedElevation()

Returns azimuth or elevation angle of the cue with respect to the uncued orientation of the part. If a cue is not active then zero will be returned.

Note

If the current cue is outside the slew/cue limits, the angles will be clipped to the current limits.

Note

Values returned from these methods differ from WsfArticulatedPart.CurrentCuedAzimuth and WsfArticulatedPart.CurrentCuedElevation while the articulated part is in the process of slewing to a cue.

double CurrentCuedAzimuth()
double CurrentCuedElevation()

Returns the current azimuth or elevation angle of the part with respect to its uncued orientation. If a cue is not active then zero will be returned.

The returned azimuth angle will be in the range of -/- 180 degrees, with positive values going to the right. The returned elevation angle will be in the range of +/- 90 degrees, with positive values going up.

Note

If the current cue is outside the slew/cue limits, the angles will be clipped to the current limits.

Articulation Update Control

void EnableArticulationUpdates(double aInterval)

Enables articulation update events. This schedules an event that will update the part’s articulation state at the specified interval (in seconds).

void DisableArticulationUpdates()

Cancels the articulation update event.