edu.wisc.ssec.mcidas
Class ConversionUtility
- java.lang.Object
-
- edu.wisc.ssec.mcidas.ConversionUtility
-
public class ConversionUtility extends java.lang.ObjectA collection of methods for doing various conversions.
-
-
Constructor Summary
Constructors Constructor and Description ConversionUtility()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static floatFloatLatLon(int dddmmss)Convert a latitude or longitude in dddmmss format to floating point.static doubleGouldToNative(int inVal)Convert a Gould format floating point number to native double formatstatic floatLatLonToDistance(float lat1, float lon1, float lat2, float lon2)Find the distance in km between two points given the lats/lons.static voidswap(int[] array, int first, int last)swap the bytes of an integer array
-
-
-
Method Detail
-
LatLonToDistance
public static float LatLonToDistance(float lat1, float lon1, float lat2, float lon2)Find the distance in km between two points given the lats/lons.- Parameters:
lat1- - latitude of first pointlat2- - latitude of second pointlon1- - longitude of first pointlon2- - longitude of second point- Returns:
- - the distance in km between the two input points
-
FloatLatLon
public static float FloatLatLon(int dddmmss)
Convert a latitude or longitude in dddmmss format to floating point.- Parameters:
dddmmss- - latitude or longitude- Returns:
- - floating point representation of the input parameter.
-
GouldToNative
public static double GouldToNative(int inVal)
Convert a Gould format floating point number to native double format- Parameters:
inVal- - input Gould value- Returns:
- - the input value converted to double floating point
-
swap
public static void swap(int[] array, int first, int last)swap the bytes of an integer array- Parameters:
array- array of integers to be flippedfirst- starting element of the arraylast- last element of array to flip
-
-
DMelt 3.0 © DataMelt by jWork.ORG