uavsim.datatypes
Class SevenDOFDescriptor

java.lang.Object
  extended by uavsim.datatypes.SevenDOFDescriptor

public class SevenDOFDescriptor
extends java.lang.Object

Encapsulates the CoordinateWorld, Altitude, and Attitude data elements into a 6-DOF (degree of freedom) descriptor, and optionally also Course for a 7-DOF descriptor.

Author:
Dan Tappan [16.07.11]

Field Summary
private  Altitude _altitude
          the altitude.
private  Attitude _attitude
          the attitude, with yaw normally interpreted as heading.
private  CoordinateWorld _coordinates
          the world coordinates.
private  Course _course
          the optional course.
 
Constructor Summary
SevenDOFDescriptor()
          Creates a 7-DOF descriptor with the defaults for Silver City, NM (xxx x xxx).
SevenDOFDescriptor(CoordinateWorld3D coordinates, Attitude attitude)
          Creates a 7-DOF descriptor.
SevenDOFDescriptor(CoordinateWorld3D coordinates, Attitude attitude, Course course)
          Creates a 7-DOF descriptor.
SevenDOFDescriptor(CoordinateWorld coordinates, Altitude altitude, Attitude attitude)
          Creates a 6-DOF descriptor.
SevenDOFDescriptor(CoordinateWorld coordinates, Altitude altitude, Attitude attitude, Course course)
          Creates a 7-DOF descriptor.
 
Method Summary
 Altitude getAltitude()
          Gets the altitude.
 Attitude getAttitude()
          Gets the attitude.
 CoordinateWorld getCoordinate()
          Gets the two-dimensional world coordinates.
 CoordinateWorld3D getCoordinate3D()
          Gets the three-dimensional world coordinates.
 Course getCourse()
          Returns the course.
 boolean hasCourse()
          Whether a valid course was provided.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_altitude

private final Altitude _altitude
the altitude. This cannot be be final because of the clone


_attitude

private final Attitude _attitude
the attitude, with yaw normally interpreted as heading. This cannot be be final because of the clone


_coordinates

private final CoordinateWorld _coordinates
the world coordinates. This cannot be be final because of the clone


_course

private Course _course
the optional course. This cannot be be final because of the clone

Constructor Detail

SevenDOFDescriptor

public SevenDOFDescriptor()
Creates a 7-DOF descriptor with the defaults for Silver City, NM (xxx x xxx).


SevenDOFDescriptor

public SevenDOFDescriptor(CoordinateWorld3D coordinates,
                          Attitude attitude)
Creates a 7-DOF descriptor.

Parameters:
coordinates - - the world coordinates, which provides the altitude
attitude - - the attitude

SevenDOFDescriptor

public SevenDOFDescriptor(CoordinateWorld3D coordinates,
                          Attitude attitude,
                          Course course)
Creates a 7-DOF descriptor.

Parameters:
coordinates - - the world coordinates, which provides the altitude
attitude - - the attitude
course - - the course

SevenDOFDescriptor

public SevenDOFDescriptor(CoordinateWorld coordinates,
                          Altitude altitude,
                          Attitude attitude)
Creates a 6-DOF descriptor.

Parameters:
coordinates - - the world coordinates
altitude - - the altitude
attitude - - the attitude, with yaw normally interpreted as heading

SevenDOFDescriptor

public SevenDOFDescriptor(CoordinateWorld coordinates,
                          Altitude altitude,
                          Attitude attitude,
                          Course course)
Creates a 7-DOF descriptor.

Parameters:
coordinates - - the world coordinates
altitude - - the altitude
attitude - - the attitude
course - - the course
Method Detail

getAltitude

public Altitude getAltitude()
Gets the altitude.

Returns:
the altitude

getAttitude

public Attitude getAttitude()
Gets the attitude.

Returns:
the attitude

getCoordinate

public CoordinateWorld getCoordinate()
Gets the two-dimensional world coordinates.

Returns:
the coordinates

getCoordinate3D

public CoordinateWorld3D getCoordinate3D()
Gets the three-dimensional world coordinates.

Returns:
the coordinates

getCourse

public Course getCourse()
Returns the course. When none was provided, the default is north.

Returns:
the course
See Also:
hasCourse()

hasCourse

public boolean hasCourse()
Whether a valid course was provided.

Returns:
the state

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object