Terrenus HRPT v2.2

terrenus.instrument
Class AVHRRLocator

java.lang.Object
  extended by terrenus.instrument.LineScannerLocator
      extended by terrenus.instrument.AVHRRLocator

public class AVHRRLocator
extends LineScannerLocator

The AVHRRLocator class uses an HRPTDecoder to compute AVHRR earth locations for a NOAA HRPT data stream.


Field Summary
 
Fields inherited from class terrenus.instrument.LineScannerLocator
earthModel, scanStep, sensorModel, spacecraft
 
Constructor Summary
AVHRRLocator(HRPTDecoder decoder)
          Creates a new locator.
 
Method Summary
static double distance(double lat1, double lon1, double lat2, double lon2)
          Calculates the great circle distance from one location to another.
protected  java.util.Date getLineDate(int line)
          Gets the date for the specified scan line.
 void getScanSpot(int[] spotLoc, double[] earthLoc)
          Performs AVHRR geolocation using the NOAA KLM user's guide Appendix I.2 scan spot method.
static void main(java.lang.String[] argv)
          Tests this class.
 
Methods inherited from class terrenus.instrument.LineScannerLocator
getLocations, getViewVector
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AVHRRLocator

public AVHRRLocator(HRPTDecoder decoder)
Creates a new locator.

Parameters:
decoder - the decoder to use for time and spacecraft information.
Method Detail

getLineDate

protected java.util.Date getLineDate(int line)
Description copied from class: LineScannerLocator
Gets the date for the specified scan line.

Specified by:
getLineDate in class LineScannerLocator
Parameters:
line - the scan line to query.
Returns:
the date for the scan line.

getScanSpot

public void getScanSpot(int[] spotLoc,
                        double[] earthLoc)
Performs AVHRR geolocation using the NOAA KLM user's guide Appendix I.2 scan spot method. The method is designed to produce the same (lat,lon) results as the LineScannerLocator.getLocations(int, int[], double[], double[], double[], double[], double[]) method but using completely non-modular code. We include it here as a reference implementation to test that the Terrenus code is producing correct results.

Parameters:
spotLoc - the input [line, sample] of the spot.
earthLoc - the output [lat, lon] geodetic earth location of the spot in radians.
See Also:
http://www2.ncdc.noaa.gov/docs/klm/html/i/app-i2.htm

distance

public static double distance(double lat1,
                              double lon1,
                              double lat2,
                              double lon2)
Calculates the great circle distance from one location to another. The method uses a calculation for distance on a sphere.

Haversine Formula (from R.W. Sinnott, "Virtues of the Haversine", Sky and Telescope, vol. 68, no. 2, 1984, p. 159):

   dlon = lon2 - lon1
   dlat = lat2 - lat1
   a = sin^2(dlat/2) + cos(lat1) * cos(lat2) * sin^2(dlon/2)
   c = 2 * arcsin(min(1,sqrt(a)))
   d = R * c
 

Parameters:
lat1 - the first location latitude in radians.
lon1 - the first location longitude in radians.
lat2 - the second location latitude in radians.
lon2 - the second location longitude in radians.
Returns:
the distance between points in kilometres.

main

public static void main(java.lang.String[] argv)
                 throws java.lang.Exception
Tests this class.

Throws:
java.lang.Exception

Terrenus HRPT v2.2