jme3tools.navigation
クラス NavCalculator

java.lang.Object
  上位を拡張 jme3tools.navigation.NavCalculator

public class NavCalculator
extends java.lang.Object

A utlity class for performing position calculations

導入されたバージョン:
1.0

入れ子のクラスの概要
static class NavCalculator.Quadrant
           
 
フィールドの概要
static int GC
           
static int MERCATOR
           
static int METERS_PER_MINUTE
           
static int RL_CRS_PRECISION
           
static int RL_DIST_PRECISION
           
static int WGS84_EARTH_RADIUS
           
 
コンストラクタの概要
NavCalculator()
          Constructor
NavCalculator(Position P1, Position P2, int calcType)
          Constructor
 
メソッドの概要
static int computeAngle(Position p1, Position p2)
          Computes the angle between two points.
static int computeBearing(Position p1, Position p2)
          Computes the bearing between two points.
static double computeDLat(double lat1, double lat2)
          Compute the difference in latitude between two positions
static double computeDLong(double lng1, double lng2)
          Computes the difference in Longitude between two positions and assigns the correct sign -westwards travel, + eastwards travel
static double computeDMPClarkeSpheroid(double lat1, double lat2)
          Computes the difference in meridional parts for two latitudes in minutes (based on Clark 1880 spheroid)
static float computeDMPWGS84Spheroid(float lat1, float lat2)
          Computes the difference in meridional parts for a perfect sphere between two degrees of latitude
static int computeHeading(Position p1, Position p2)
           
static double computeLongDiff(double lng1, double lng2)
          Computes the difference in Longitude between two positions and assigns the correct sign -westwards travel, + eastwards travel
static Position computePosition(Position initialPos, double heading, double distance)
          Computes the coordinate of position B relative to an offset given a distance and an angle.
static double convertCourse(float tc, Position p1, Position p2)
          Converts a course from cardinal XddY to ddd notation
 double getDistance()
          Getter method for the distance between two points
 java.lang.String getStrCourse()
          Getter method for the true course
 double getTrueCourse()
          Getter method for the true course
 GCSailing greatCircleSailing(Position p1, Position p2)
          Determines a great circle track between two positions
static void main(java.lang.String[] args)
           
 RLSailing mercatorSailing(Position p1, Position p2)
          Determines the rhumb line course and distance between two positions
 RLSailing planeSailing(Position p1, Position p2)
          Calculate a plane sailing situation - i.e. where Lats are the same
static Position predictPosition(int time, double speed, double currentLat, double currentLong, double course)
          Predicts the position of a target for a given time in the future
 RLSailing rhumbLineSailing(Position p1, Position p2)
          Determines a Rhumb Line course and distance between two points
static double toDegrees(double meters)
          Converts meters to degrees.
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

WGS84_EARTH_RADIUS

public static final int WGS84_EARTH_RADIUS
関連項目:
定数フィールド値

MERCATOR

public static final int MERCATOR
関連項目:
定数フィールド値

GC

public static final int GC
関連項目:
定数フィールド値

RL_CRS_PRECISION

public static final int RL_CRS_PRECISION
関連項目:
定数フィールド値

RL_DIST_PRECISION

public static final int RL_DIST_PRECISION
関連項目:
定数フィールド値

METERS_PER_MINUTE

public static final int METERS_PER_MINUTE
関連項目:
定数フィールド値
コンストラクタの詳細

NavCalculator

public NavCalculator(Position P1,
                     Position P2,
                     int calcType)
Constructor

パラメータ:
P1 -
P2 -
calcType -
導入されたバージョン:
1.0

NavCalculator

public NavCalculator()
Constructor

導入されたバージョン:
1.0
メソッドの詳細

greatCircleSailing

public GCSailing greatCircleSailing(Position p1,
                                    Position p2)
Determines a great circle track between two positions

パラメータ:
p1 - origin position
p2 - destination position

rhumbLineSailing

public RLSailing rhumbLineSailing(Position p1,
                                  Position p2)
Determines a Rhumb Line course and distance between two points

パラメータ:
p1 - origin position
p2 - destination position

mercatorSailing

public RLSailing mercatorSailing(Position p1,
                                 Position p2)
Determines the rhumb line course and distance between two positions

パラメータ:
p1 - origin position
p2 - destination position

planeSailing

public RLSailing planeSailing(Position p1,
                              Position p2)
Calculate a plane sailing situation - i.e. where Lats are the same

パラメータ:
p1 -
p2 -
戻り値:
導入されたバージョン:
1.0

convertCourse

public static double convertCourse(float tc,
                                   Position p1,
                                   Position p2)
Converts a course from cardinal XddY to ddd notation

パラメータ:
tc -
dLong -
dLat -
戻り値:
導入されたバージョン:
1.0

getDistance

public double getDistance()
Getter method for the distance between two points

戻り値:
distance
導入されたバージョン:
1.0

getTrueCourse

public double getTrueCourse()
Getter method for the true course

戻り値:
true course
導入されたバージョン:
1.0

getStrCourse

public java.lang.String getStrCourse()
Getter method for the true course

戻り値:
true course
導入されたバージョン:
1.0

computeDMPClarkeSpheroid

public static double computeDMPClarkeSpheroid(double lat1,
                                              double lat2)
Computes the difference in meridional parts for two latitudes in minutes (based on Clark 1880 spheroid)

パラメータ:
lat1 -
lat2 -
戻り値:
difference in minutes
導入されたバージョン:
1.0

computeDMPWGS84Spheroid

public static float computeDMPWGS84Spheroid(float lat1,
                                            float lat2)
Computes the difference in meridional parts for a perfect sphere between two degrees of latitude

パラメータ:
lat1 -
lat2 -
戻り値:
difference in meridional parts between lat1 and lat2 in minutes
導入されたバージョン:
1.0

predictPosition

public static Position predictPosition(int time,
                                       double speed,
                                       double currentLat,
                                       double currentLong,
                                       double course)
Predicts the position of a target for a given time in the future

パラメータ:
time - the number of seconds from now for which to predict the future position
speed - the miles per minute that the target is traveling
currentLat - the target's current latitude
currentLong - the target's current longitude
course - the target's current course in degrees
戻り値:
the predicted future position
導入されたバージョン:
1.0

computePosition

public static Position computePosition(Position initialPos,
                                       double heading,
                                       double distance)
Computes the coordinate of position B relative to an offset given a distance and an angle.

パラメータ:
offset - The offset position.
bearing - The bearing between the offset and the coordinate that you want to calculate.
distance - The distance, in meters, between the offset and point B.
戻り値:
The position of point B that is located from given offset at given distance and angle.
導入されたバージョン:
1.0

computeDLong

public static double computeDLong(double lng1,
                                  double lng2)
Computes the difference in Longitude between two positions and assigns the correct sign -westwards travel, + eastwards travel

パラメータ:
lng1 -
lng2 -
戻り値:
difference in longitude
導入されたバージョン:
1.0

computeLongDiff

public static double computeLongDiff(double lng1,
                                     double lng2)
Computes the difference in Longitude between two positions and assigns the correct sign -westwards travel, + eastwards travel

パラメータ:
lng1 -
lng2 -
戻り値:
difference in longitude
導入されたバージョン:
1.0

computeDLat

public static double computeDLat(double lat1,
                                 double lat2)
Compute the difference in latitude between two positions

パラメータ:
lat1 -
lat2 -
戻り値:
difference in latitude
導入されたバージョン:
1.0

toDegrees

public static double toDegrees(double meters)
Converts meters to degrees.

パラメータ:
meters - The meters that you want to convert into degrees.
戻り値:
The degree equivalent of the given meters.
導入されたバージョン:
1.0

computeBearing

public static int computeBearing(Position p1,
                                 Position p2)
Computes the bearing between two points.

パラメータ:
p1 -
p2 -
戻り値:
導入されたバージョン:
1.0

computeAngle

public static int computeAngle(Position p1,
                               Position p2)
Computes the angle between two points.

パラメータ:
p1 -
p2 -
戻り値:

computeHeading

public static int computeHeading(Position p1,
                                 Position p2)

main

public static void main(java.lang.String[] args)