public class SidescanLine
extends java.lang.Object
Constructor and Description |
---|
SidescanLine(long timestamp,
float range,
SystemPositionAndAttitude state,
float frequency,
double[] data)
Initializes the sidescan line
|
Modifier and Type | Method and Description |
---|---|
SidescanPoint |
calcPointFromIndex(int x,
boolean slantCorrection)
Based on a 'x' position within a scan line calculate the proper location
|
double[] |
getData() |
double |
getDistanceFromIndex(int x,
boolean slantCorrection)
Calculates the distance (horizontal (true) or slant (false)) from nadir.
|
float |
getFrequency() |
java.awt.image.BufferedImage |
getImage() |
int |
getIndexFromDistance(double distance,
boolean slantCorrection)
Get the sidescan x from the distance in meters from nadir.
|
float |
getRange() |
SystemPositionAndAttitude |
getState() |
long |
getTimestampMillis() |
int |
getXSize() |
int |
getYPos() |
int |
getYSize() |
boolean |
isImageWithSlantCorrection() |
static void |
main(java.lang.String[] args) |
void |
setImage(java.awt.image.BufferedImage image,
boolean slantCorrected) |
void |
setYPos(int yPos) |
void |
setYSize(int ySize) |
public SidescanLine(long timestamp, float range, SystemPositionAndAttitude state, float frequency, double[] data)
timestamp
- The timestamp.range
- The range.state
- the sensor state (see SystemPositionAndAttitude
).frequency
- The sonar frequency.data
- The array with collected data.public long getTimestampMillis()
public float getFrequency()
public float getRange()
public SystemPositionAndAttitude getState()
public int getXSize()
public int getYSize()
public void setYSize(int ySize)
ySize
- the ySize to setpublic int getYPos()
public void setYPos(int yPos)
yPos
- the yPos to setpublic java.awt.image.BufferedImage getImage()
public void setImage(java.awt.image.BufferedImage image, boolean slantCorrected)
image
- the image to setpublic boolean isImageWithSlantCorrection()
public double[] getData()
public double getDistanceFromIndex(int x, boolean slantCorrection)
x
- The sidescan x index (nadir is the half of total points xSize
).slantCorrection
- Indicates if distance is horizontal (true) or slant (false).public int getIndexFromDistance(double distance, boolean slantCorrection)
distance
- Distance from nadir (negative means port-side).slantCorrection
- Indicates if distance is horizontal (true) or slant (false).xSize
).public SidescanPoint calcPointFromIndex(int x, boolean slantCorrection)
x
- The sidescan x index (nadir is the half of total points xSize
).slantCorrection
- Indicates if distance is horizontal (true) or slant (false).SidescanPoint
.public static void main(java.lang.String[] args)
Copyright © 2004-2020 FEUP-LSTS and Neptus developers. All Rights Reserved.