videoRangePanel
Class RefractionMethod

java.lang.Object
  extended by videoRangePanel.VRRangeMethod
      extended by videoRangePanel.RoundEarthMethod
          extended by videoRangePanel.RefractionMethod
All Implemented Interfaces:
PamSettings

public class RefractionMethod
extends RoundEarthMethod
implements PamSettings


Nested Class Summary
(package private)  class RefractionMethod.RefractionDialogPanel
           
 
Field Summary
private static double airRefractiveIndex
           
private static double kelvin
           
private static int MAXITERATIONS
           
(package private)  RefractionMethod.RefractionDialogPanel refractionDialogPanel
           
(package private)  RefractionParameters refractionParameters
           
private static double specificGasConstant
           
 
Fields inherited from class videoRangePanel.RoundEarthMethod
vrControl
 
Fields inherited from class videoRangePanel.VRRangeMethod
earthRadius, gravity
 
Constructor Summary
RefractionMethod(VRControl vrControl)
           
 
Method Summary
 RangeDialogPanel dialogPanel()
           
private  double getAlphaCorrection(double range)
           
(package private)  double getAngle(double height, double range)
          Converts a range into an angle below the horizon.
protected  double getHorizonAngle(double height)
          Calculate the horizon dip angle from the horizontal
 double getHorizonDistance(double height)
          Calculate the distance to the horizon from a given height.
(package private)  java.lang.String getName()
           
 double getRange(double height, double angle)
          Converts a height and an angle below the horizon to a distance in metres.
private  double getRayRadius()
           
 java.io.Serializable getSettingsReference()
           
 long getSettingsVersion()
           
private  double getTanHorizonDip(double cameraHeight)
           
 java.lang.String getUnitName()
           
 java.lang.String getUnitType()
           
 boolean restoreSettings(PamControlledUnitSettings pamControlledUnitSettings)
           
 
Methods inherited from class videoRangePanel.RoundEarthMethod
configure, psiFromRange, rangeFromPsi
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

specificGasConstant

private static final double specificGasConstant
See Also:
Constant Field Values

airRefractiveIndex

private static final double airRefractiveIndex
See Also:
Constant Field Values

kelvin

private static final double kelvin
See Also:
Constant Field Values

MAXITERATIONS

private static final int MAXITERATIONS
See Also:
Constant Field Values

refractionParameters

RefractionParameters refractionParameters

refractionDialogPanel

RefractionMethod.RefractionDialogPanel refractionDialogPanel
Constructor Detail

RefractionMethod

public RefractionMethod(VRControl vrControl)
Method Detail

getName

java.lang.String getName()
Overrides:
getName in class RoundEarthMethod

getRange

public double getRange(double height,
                       double angle)
Description copied from class: VRRangeMethod
Converts a height and an angle below the horizon to a distance in metres.

Overrides:
getRange in class RoundEarthMethod
Parameters:
height - platform height (metres)
angle - angle below the horizon (radians)
Returns:
distance in metres.

getRayRadius

private double getRayRadius()

getAlphaCorrection

private double getAlphaCorrection(double range)

getTanHorizonDip

private double getTanHorizonDip(double cameraHeight)

getHorizonDistance

public double getHorizonDistance(double height)
Description copied from class: VRRangeMethod
Calculate the distance to the horizon from a given height.

Overrides:
getHorizonDistance in class RoundEarthMethod
Returns:
distnace to horizon in metres.

getAngle

double getAngle(double height,
                double range)
Description copied from class: VRRangeMethod
Converts a range into an angle below the horizon.

Or returns -1 if the range is beyond the horizon.

Overrides:
getAngle in class RoundEarthMethod
Parameters:
height - platofrm height (metres)
range - range to object.
Returns:
angle in radians.

getHorizonAngle

protected double getHorizonAngle(double height)
Description copied from class: VRRangeMethod
Calculate the horizon dip angle from the horizontal

Overrides:
getHorizonAngle in class VRRangeMethod
Parameters:
height - Platform height
Returns:
dip angle in radians.

dialogPanel

public RangeDialogPanel dialogPanel()
Overrides:
dialogPanel in class RoundEarthMethod

getSettingsReference

public java.io.Serializable getSettingsReference()
Specified by:
getSettingsReference in interface PamSettings
Returns:
The serialisable object that will be stored

getSettingsVersion

public long getSettingsVersion()
Specified by:
getSettingsVersion in interface PamSettings
Returns:
An integer version number for the settings

getUnitName

public java.lang.String getUnitName()
Specified by:
getUnitName in interface PamSettings
Returns:
A Name specific to this instance of the particular class, e.g. Sperm whale detector, Beaked whale detector, etc.

getUnitType

public java.lang.String getUnitType()
Specified by:
getUnitType in interface PamSettings
Returns:
A Name specific to the type, e.g. Glick detector

restoreSettings

public boolean restoreSettings(PamControlledUnitSettings pamControlledUnitSettings)
Specified by:
restoreSettings in interface PamSettings
Returns:
true if successful The object performs final checks (if needed) and then casts the settings data pamcontrolledunitSettings.settings into the correct type and uses as required