|
TheWayOut 2008 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.thewayout.o8.api.BaseObject
de.thewayout.o8.api.Coordinates
public class Coordinates
Eine kleine mathematische Hilfsklasse zum Rechnen mit Winkeln, Bogenmass und Pixeln.
| Field Summary | |
|---|---|
static double |
DISTANCE_INVALID
|
static double |
DISTANCE_NO_LAND_DETECTED
|
| Constructor Summary | |
|---|---|
Coordinates()
|
|
| Method Summary | |
|---|---|
static double |
degToRad(double degree)
Rechnet Gradzahlen in Bogenmass (Radiant) um. |
static boolean |
isValidLatitude(double latitude)
Überprueft ob der uebergebene Breitengrad valide ist, er also im Bereich [-PI/2; PI/2] liegt. |
static boolean |
isValidLongitude(double longitude)
Überprueft ob der uebergebene Längengrad valide ist, er also im Bereich [-PI; PI[ liegt. |
static double |
radToDeg(double rad)
Rechnet Radiant Werte in Gradzahlen um. |
static double |
round(double number,
int precision)
Rundet eine Zahl auf n Stellen nach dem Komma. |
static double |
shiftDeg(double degree)
Verschiebt eine Gradzahl, so dass sie in den Bereich [-180; 180[ passt. |
static double |
shiftDegToPositiveRange(double degree)
Verschiebt eine Gradzahl in den positiven Bereich [0;360[. |
static double |
shiftRad(double rad)
Verschiebt einen Radiant Wert in den Bereich [-PI;PI[. |
static double |
shiftRadLongitudeToPositiveRange(double rad)
Verschiebt einen Radiant Wert in den Bereich [0; 2*PI[. |
static double |
transformX2Longitude(int x,
int width)
Rechnet eine horizontale Pixelposition in einen Längengrad um. |
static double |
transformY2Latitude(int y,
int height)
Rechnet eine vertikale Pixelposition in einen Breitengrad um. |
| Methods inherited from class de.thewayout.o8.api.BaseObject |
|---|
areNotNull, createList, isEmpty, isEmpty, isEmpty, isEmpty, isNotEmpty, isNotEmpty, isNotEmpty, isNotEmpty, isNotNull, isNull |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final double DISTANCE_INVALID
public static final double DISTANCE_NO_LAND_DETECTED
| Constructor Detail |
|---|
public Coordinates()
| Method Detail |
|---|
public static double degToRad(double degree)
degree - ein Grad (kann +/-360 DEG übersteigen)
public static double shiftDeg(double degree)
degree - eine Gradzahl
public static double shiftDegToPositiveRange(double degree)
degree - Gradzahl
public static double transformY2Latitude(int y,
int height)
y - vertikale Position des Pixel (0 == oben; height-1 == unten)height - Gesamthöhe des Bildes
public static double transformX2Longitude(int x,
int width)
x - horizontale Position des Pixel (0 == links, totalPixelcountHorizontal-1 == rechts)width - Gesamtbreite des Bildes
public static double shiftRad(double rad)
rad - Radiant Wert
public static double shiftRadLongitudeToPositiveRange(double rad)
rad - ein Radiant Wert
public static double radToDeg(double rad)
rad - ein Radiant (kann +/- 2*PI übersteigen)
public static boolean isValidLatitude(double latitude)
latitude - Breitengrad (Radiant)
public static boolean isValidLongitude(double longitude)
Achtung: Während Breitengrade geografisch wirklich auf Nord- und Südpol limitiert sind,
können Längengrade den Wertebereich überschreiten, da eine Bewegung Richtung Ost oder West
immer möglich ist.
In 80 * 4,5 Grad um die Welt.
longitude - Längengrad (Radiant)
public static double round(double number,
int precision)
number - Ausgangszahlprecision - Genauigkeit, also die Anzahl der Stellen nach dem Komma
|
© ObjectFab GmbH 2008 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||