edu.wisc.ssec.mcidas
Class ConversionUtility

java.lang.Object
  extended by edu.wisc.ssec.mcidas.ConversionUtility

public class ConversionUtility
extends Object

A collection of methods for doing various conversions.

Version:
1.3, 16 Nov 98
Author:
Tommy Jasmin, SSEC

Constructor Summary
ConversionUtility()
           
 
Method Summary
static float FloatLatLon(int dddmmss)
          Convert a latitude or longitude in dddmmss format to floating point.
static double GouldToNative(int inVal)
          Convert a Gould format floating point number to native double format
static float LatLonToDistance(float lat1, float lon1, float lat2, float lon2)
          Find the distance in km between two points given the lats/lons.
static void swap(int[] array, int first, int last)
          swap the bytes of an integer array
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConversionUtility

public ConversionUtility()
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 point
lat2 - - latitude of second point
lon1 - - longitude of first point
lon2 - - 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 flipped
first - starting element of the array
last - last element of array to flip