net.sf.marineapi.nmea.sentence
Interface VLWSentence

All Superinterfaces:
Sentence

public interface VLWSentence
extends Sentence

Distance traveled through water, cumulative and trip.

Example:
$VWVLW,2.8,N,2.8,N*4C

Author:
Kimmo Tuukkanen

Field Summary
static char KM
          Kilometers
static char NM
          Nautical miles
 
Fields inherited from interface net.sf.marineapi.nmea.sentence.Sentence
ALTERNATIVE_BEGIN_CHAR, BEGIN_CHAR, CHECKSUM_DELIMITER, FIELD_DELIMITER, MAX_LENGTH, TERMINATOR
 
Method Summary
 double getTotal()
          Returns the total cumulative distance traveled.
 char getTotalUnits()
          Returns the unit of measurement for cumulative total distance.
 double getTrip()
          Returns the distance traveled since last reset.
 char getTripUnits()
          Returns the unit of measurement for distance since last reset.
 void setTotal(double distance)
          Sets the total cumulative distance traveled.
 void setTotalUnits(char unit)
          Sets the units of measure for cumulative total distance.
 void setTrip(double distance)
          Sets the distance traveled since last reset.
 void setTripUnits(char unit)
          Sets the units of measure for distance since last reset.
 
Methods inherited from interface net.sf.marineapi.nmea.sentence.Sentence
getBeginChar, getFieldCount, getSentenceId, getTalkerId, isProprietary, isValid, reset, setBeginChar, setTalkerId, toSentence, toSentence, toString
 

Field Detail

KM

static final char KM
Kilometers

See Also:
Constant Field Values

NM

static final char NM
Nautical miles

See Also:
Constant Field Values
Method Detail

getTotal

double getTotal()
Returns the total cumulative distance traveled.

Returns:
Distance
See Also:
getTotalUnits()

getTotalUnits

char getTotalUnits()
Returns the unit of measurement for cumulative total distance.

Returns:
Char indicator for unit
See Also:
KM, NM

getTrip

double getTrip()
Returns the distance traveled since last reset.

Returns:
Trip distance
See Also:
getTripUnits()

getTripUnits

char getTripUnits()
Returns the unit of measurement for distance since last reset.

Returns:
Char indicator for unit
See Also:
KM, NM

setTotal

void setTotal(double distance)
Sets the total cumulative distance traveled.

Parameters:
distance - Total distance to set.
See Also:
setTotalUnits(char)

setTotalUnits

void setTotalUnits(char unit)
Sets the units of measure for cumulative total distance.

Parameters:
unit - Unit to set; 'K' for kilomters, 'N' for nautical miles.
Throws:
IllegalArgumentException - If trying to set invalid units char.
See Also:
KM, NM

setTrip

void setTrip(double distance)
Sets the distance traveled since last reset.

Parameters:
distance - Trip distance to set.
See Also:
setTripUnits(char)

setTripUnits

void setTripUnits(char unit)
Sets the units of measure for distance since last reset.

Parameters:
unit - Unit to set; 'K' for kilomters, 'N' for nautical miles.
Throws:
IllegalArgumentException - If trying to set invalid units char.
See Also:
KM, NM


Copyright (C) 2010-2014 Java Marine API authors. All Rights Reserved.