public class SonarController extends Object
Modifier and Type | Field and Description |
---|---|
int |
bearingType
bearing basis (true, magnetic, relative)
|
double |
commandedBearing
currently commanded bearing
|
int |
controlMode
current control mode for this sonar
|
static double |
DEFAULTSONARSCANSECTOR
sonar scan sweep width
|
static double |
DEFAULTSONARSTEPSIZE
default steerable sonar step size
|
static int |
MAGNETICBEARING
enumeration for magnetic bearing
|
static int |
OTHERSONAR
enumeration for other sonar
|
static int |
RELATIVEBEARING
enumeration for relative bearing
|
int |
scanDirection
direction that the sonar is currently being scanned
|
double |
scanSector
width (degrees) of the normal forward scan
|
static int |
SONARNOSCAN
enumeration for sonar to remain in same position
|
static int |
SONARSCANEDGE
enumeration for sonar tracking the edge of a target
|
static int |
SONARSCANLEFT
enumeration for left used in the step method
|
static int |
SONARSCANLOCATE
enumeration for sonar searching for a target
|
static int |
SONARSCANMANUAL
enumeration for sonar being directly positioned
|
static int |
SONARSCANRIGHT
enumeration for left used in the step method
|
static int |
SONARSCANSWATH
enumeration for normal forward scan
|
static int |
SONARSCANTRACK
enumeration for sonar tracking a target
|
static int |
ST1000SONAR
enumeration for ST1000 sonar type
|
static int |
ST725SONAR
enumeration for ST725 sonar type
|
static int |
TRUEBEARING
enumeration for true bearing
|
Constructor and Description |
---|
SonarController(UuvExecution execution,
SteerableSonar sonar)
Creates a new instance of SonarController
|
SonarController(UuvExecution execution,
SteerableSonar sonar,
int direction)
Creates a new instance of SonarController
|
Modifier and Type | Method and Description |
---|---|
double |
getBearing()
Returns the current bearing of the sonar
|
double |
getRange()
Returns the current range of the sonar
|
double |
getStrength()
Returns the current strength of the sonar return
|
double |
ping()
Pings the controlled sonar and returns the range
|
void |
step()
Steps the controlled sonar in the direction specified by the scanDirection variable
|
void |
updateStep()
Conducts one iteration of sonar control based on the type of control that is current
NOTE: This method does not ping the sonar.
|
public static final int SONARSCANRIGHT
public static final int SONARNOSCAN
public static final int SONARSCANLEFT
public static final int ST725SONAR
public static final int ST1000SONAR
public static final int OTHERSONAR
public static final int SONARSCANSWATH
public static final int SONARSCANEDGE
public static final int SONARSCANTRACK
public static final int SONARSCANLOCATE
public static final int SONARSCANMANUAL
public static final int RELATIVEBEARING
public static final int TRUEBEARING
public static final int MAGNETICBEARING
public static double DEFAULTSONARSCANSECTOR
public static double DEFAULTSONARSTEPSIZE
public int controlMode
public double scanSector
public int scanDirection
public double commandedBearing
public int bearingType
public SonarController(UuvExecution execution, SteerableSonar sonar)
execution
- UuvExecution reference to main class of AUVsonar
- SteerableSonar to be controlled by this controllerpublic SonarController(UuvExecution execution, SteerableSonar sonar, int direction)
execution
- UuvExecution reference to main class of AUVsonar
- SteerableSonar to be controlled by this controllerdirection
- initial scan directionpublic void updateStep()
public double getBearing()
public double getRange()
public double getStrength()
public void step()
public double ping()