public class VRLandMarkMethod extends AbstractVRMethod
Angular convention for this module and method.
Bearing- 0==north, 90==east 180=south, 270==west
Pitch- 90=-g, 0=0g, -90=g
Tilt 0->180 -camera turning towards left to upside down 0->-180 camera turning right to upside down
Modifier and Type | Field and Description |
---|---|
static java.awt.Color |
animalCol |
static VRSymbolManager |
animalMark |
static PamSymbol |
animalMarker |
static PamSymbol |
candAnimalMarker |
static java.awt.Color |
landMarkCol |
static PamSymbol |
landMarkMarker |
static VRSymbolManager |
landMarksSymbol |
Constructor and Description |
---|
VRLandMarkMethod(VRControl vrControl) |
Modifier and Type | Method and Description |
---|---|
static double |
calcAnimalBearing(double tilt,
java.awt.Point lndmrkPoint,
java.awt.Point animalPoint,
double calValue)
Calculates the bearing of the target animal based on a landmark point, the animal location and a calibration value;
|
static double |
calcAnimalPitch(double tilt,
java.awt.Point lndmrkPoint,
java.awt.Point animalPoint,
double calValue)
Calculates the pitch of the target animal based on a landmark point, the animal location and a calibration value;
|
static double |
calcBearingDiffAnimal(double tilt,
java.awt.Point landmrkp1,
java.awt.Point animal)
Calculates the bearing of the animal in pixels
|
static java.awt.Point |
calcPerpPoint(double tilt,
double bearingDiff,
java.awt.Point landMark2)
Calculates the point at which the perpendicular corner of the pitch/bearing triangle resides.
|
java.awt.Point |
calcPerpPoint(double tilt,
java.awt.Point landmrkP1,
java.awt.Point landmrkP2,
LandMark landmrk1,
LandMark landmrk2,
LatLong imagePos)
Calculates location of the perpendicular vertex of the triangle defined by landmarks 1 and 2, with the side of the triangle following the tilt of the picture.
|
static double |
calcPitch(LandMark landMrk,
LatLong imagePos)
Calculate the pitch between a landMark and image location.
|
static double |
calcPitchDiffAnimal(double tilt,
java.awt.Point landmrkp1,
java.awt.Point animal)
Calculates the pitch of the animal in pixels
|
static double |
calcTilt(java.awt.Point landmrkP1,
java.awt.Point landmrkP2,
double bearingDiff,
double pitchDiff)
Calculates the tilt of the image based on two landmarks selected on that image and the known angles between those landmarks.
|
static double |
calcTilt(java.awt.Point landmrkP1,
java.awt.Point landmrkP2,
LandMark landmrk1,
LandMark landmrk2,
LatLong imagePos) |
void |
clearOverlay()
Clears all user ineractions and resets overlay.
|
PamPanel |
createSidePanel() |
LatLong |
getImagePos()
Return the position the image was taken from.
|
javax.swing.plaf.LayerUI |
getJLayerOverlay()
Get the overlay panel for the picture unique to this method.
|
java.lang.String |
getName()
The name of this type of analysis method.
|
PamPanel |
getRibbonPanel()
Some methods may require a panel above the picture for manual input or to view current information.
|
LandMarkGroup |
getSelectedLMGroup() |
PamPanel |
getSettingsPanel()
Different video range methods will have different settings.
|
PamPanel |
getSidePanel()
Different video range methods will have different controls in the side panel.
|
void |
setLandMarks()
Create a landmark list for the landmark combo box on side panel;
|
void |
update(int updateType)
Called from other parts of the module whenever a method panel may needed updated e.g.
|
static double |
wrap360(double t)
Make sure an angle falls between zero and 2pi(360 degrees)
|
calcLocLatLong, createCalibrationList, createLocationListPanel, createMapFilePanel, enableControls, getCandidateMeasurement, getHorizonTilt, getImageHeading, selectCalibration, setGPSText, setHorizonTilt
public static final java.awt.Color landMarkCol
public static final java.awt.Color animalCol
public static PamSymbol landMarkMarker
public static PamSymbol animalMarker
public static PamSymbol candAnimalMarker
public static VRSymbolManager landMarksSymbol
public static VRSymbolManager animalMark
public VRLandMarkMethod(VRControl vrControl)
public java.lang.String getName()
VRMethod
public PamPanel createSidePanel()
public void setLandMarks()
public LandMarkGroup getSelectedLMGroup()
public PamPanel getSidePanel()
VRMethod
public javax.swing.plaf.LayerUI getJLayerOverlay()
VRMethod
public static double wrap360(double t)
public void clearOverlay()
VRMethod
public PamPanel getRibbonPanel()
VRMethod
public PamPanel getSettingsPanel()
VRMethod
public void update(int updateType)
VRMethod
update
in interface VRMethod
update
in class AbstractVRMethod
public static double calcAnimalBearing(double tilt, java.awt.Point lndmrkPoint, java.awt.Point animalPoint, double calValue)
tilt-
- tilt of the image in radians.landmrkp1-landmark
- point.animal-animal
- point.calValue-
- calibration value in pixels per degreepublic static double calcAnimalPitch(double tilt, java.awt.Point lndmrkPoint, java.awt.Point animalPoint, double calValue)
tilt-
- tilt of the image in radians.landmrkp1-a
- point on the image for which we know the pitch and bearing.animal-animal
- point.calValue-
- calibration value in pixels per degree.public static double calcBearingDiffAnimal(double tilt, java.awt.Point landmrkp1, java.awt.Point animal)
tilt-
- tilt of the image in radians.landmrkp1-a
- point on the image for which we know the pitch and bearing.animal-animal
- point.public static double calcPitchDiffAnimal(double tilt, java.awt.Point landmrkp1, java.awt.Point animal)
tilt-
- tilt of the image in radians.landmrkp1-a
- point on the image for which we know the pitch and bearing.animal-animal
- point.public java.awt.Point calcPerpPoint(double tilt, java.awt.Point landmrkP1, java.awt.Point landmrkP2, LandMark landmrk1, LandMark landmrk2, LatLong imagePos)
tilt-tilt
- of imagelandmrkP1-landmark
- 1 point on imagelandmrkP2-landmark
- 2 point on imagelandmrk1-landmark
- 1landmrk2-landmark
- 2imagePos-the
- from which the image was taken from. Note that this can be null if the landmarks are defined by bearings rathar than GPS co-ordinates.public static java.awt.Point calcPerpPoint(double tilt, double bearingDiff, java.awt.Point landMark2)
tilt-tilt
- in radiansbearingDiff-difference
- in bearing angle, in pixels.public static double calcTilt(java.awt.Point landmrkP1, java.awt.Point landmrkP2, LandMark landmrk1, LandMark landmrk2, LatLong imagePos)
public static double calcPitch(LandMark landMrk, LatLong imagePos)
landMrk-current
- landmarkimagePos-image
- locationpublic static double calcTilt(java.awt.Point landmrkP1, java.awt.Point landmrkP2, double bearingDiff, double pitchDiff)
landmrkP1-
- the location on the image of landmark1-pixelslandmrkP2-
- the location on the image of landmark2-pixelsbearingDiff-
- the difference in heading between landMark1 and landMark2pitchDiff-
- the difference in pitch between landMark1 and landMark2public LatLong getImagePos()