|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.nps.moves.spatial.RangeCoordinates
public class RangeCoordinates
Represents a local, flat range area with Euclidian coordinates, which is convienient for somewhat small simulated areas. This class assumes a local, flat, coordinate system with an origin at (lat, lon, altitude) and positive X pointing local east, positive Y pointing local north, and positive Z pointing up. Specified in WGS_84 geodesic coordinate system. Altitude is distance above the ellipsoid.
The coordinate system has its origin at the given (lat, lon) and creates a plane tangent and normal to the ellipsoid at that point.
There are several major reference frames that may be useful in various contexts:
Geocentric: Origin at the center of the earth. Positive X out at the intersection of the equator and prime meridian, Y out at 90 deg east lon, and Z up through the north pole. This is the coordinate system used by DIS world coordinates.
Geodetic: The coordinate system uses lat/lon/altitude. This is handy for positioning an object on the earth (or close to it) but not so handy for describing things like velocity.
Local Tangent Surface Euclidian (LTSE): Pick a lat/lon/altitude, and then at that point you can define a single plane normal and tangent to the globe. Positive X points local east, positive Y points local north, and positive Z points local up. This is handy for describing the position of an object in, for example, a range of somewhat small dimensions, perhaps 20KM X 20KM, where we don't want to get sucked into the whole curved earth scene and just want to be simple.
Body Centric/Lococentric/Platform-centric: The origin is at the volumentric center of an entity (in DIS); Positive x points out the long axis, positive Y points to the right, and positive Z points down. This is widely used to describe (roll, pitch, yaw) in aircraft. Note that you need a transform from (for example) the LTSE to body coordinates to define the position of the body axis origin and orientation WRT the LTSE origin. Note that the direction of the Z axis is the opposite of that used by LTSE. The axes are often named (u,v,w) in this frame of reference.
We can also convert between these coordinate systems using standard libraries in the SRM.
See User’s Manual for SRM Orientation, Velocity, & Acceleration Transformations Version 2.0, 18 Nov 2009, available with the sedris Java SDK download.
Constructor Summary | |
---|---|
RangeCoordinates(double originLat,
double originLon,
double heightOffset)
Constructor for a local flat coordinate system. |
Method Summary | |
---|---|
void |
c(double lat,
double lon,
double alt,
double bank,
double pitch,
double head)
|
void |
change(double localX,
double localY,
double localZ,
double bank,
double noseUp,
double bearing)
|
void |
changeVectorToDisCoordFromLocalFlat(Vector3Double localCoordinates)
Changes a Vector3Double from the local coordinate system (flat, euclidian, orgin given at (lat, lon, alt)) to a global, DIS, earth-centric coordinate system. |
void |
changeVectorToLocalCoordFromDIS(Vector3Double worldCoordinates)
Changes the world-coordinates vector3double to the local euclidian flat coordinate system. |
Vector3Double |
DISCoordFromLocalFlat(double x,
double y,
double z)
Transform from local, flat coordinate system to the DIS coordinate system. |
SRM.SRF_LococentricEuclidean3D |
getPlatformReferenceFrame(Vector3Double rangePositionCoordinates)
|
Vector3Double |
localCoordFromDis(double x,
double y,
double z)
Given DIS coordinates, convert to the local euclidian plane coordinates. |
Orientation |
localRollPitchHeadingToDisEuler(Orientation pitchRollHeading,
Vector3Double localPosition)
Converts a roll, pitch, and heading/yaw in the local flat coordinate system to DIS euler angles. |
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RangeCoordinates(double originLat, double originLon, double heightOffset)
originLat
- Origin of the flat local coordinate system, in degrees, latitudeoriginLon
- Origin of the flat local coordinate system, in degrees, longitudeheightOffset
- altitudeOrigin above ellipsoid surface, in metersMethod Detail |
---|
public void changeVectorToDisCoordFromLocalFlat(Vector3Double localCoordinates)
localCoordinates
- Position in local euclidian coordinate system. Values are overwritten to the DIS earth-centric coordinate system on returnpublic Vector3Double DISCoordFromLocalFlat(double x, double y, double z)
x
- x coordinate in local, flat coordinate systemy
- y coordinate in meters in local, flat coordinate systemz
- z coordinate, altitude, in meters in local flat coordinate systempublic void changeVectorToLocalCoordFromDIS(Vector3Double worldCoordinates)
worldCoordinates
- public Vector3Double localCoordFromDis(double x, double y, double z)
x
- y
- z
- public Orientation localRollPitchHeadingToDisEuler(Orientation pitchRollHeading, Vector3Double localPosition)
phi = roll, theta = pitch, psi = yaw/heading
, by one popular convention. All units are in radians.
Note that we also need the postion of the object in the local coordinate system. The DIS euler angles will vary depending on not just the roll/pitch/heading, but also where in the local coordinate frame the object is. Also, the pitch/roll/heading are in the local coordinate system, NOT the coordinate system of the object.
pitchRollHeading
- public void c(double lat, double lon, double alt, double bank, double pitch, double head)
public void change(double localX, double localY, double localZ, double bank, double noseUp, double bearing)
public static void main(java.lang.String[] args)
public SRM.SRF_LococentricEuclidean3D getPlatformReferenceFrame(Vector3Double rangePositionCoordinates)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |