gps.log
Class GPSFilter

java.lang.Object
  extended by gps.log.GPSFilter
Direct Known Subclasses:
GPSFilterAdvanced

public class GPSFilter
extends java.lang.Object

This class implements a filter for a GPSRecord. A GPSRecord can be presented to the doFilter method and it will indicate whether the record must be kept or not. This class simplifies setting filter options in the application.

Author:
Mario De Weerd

Field Summary
static int TRKPT
          Index to trackpoint filter (in array of GPSFilter).
static int WAYPT
          Index to waypoint filter (in array of GPSFilter).
 
Constructor Summary
GPSFilter()
           
 
Method Summary
 boolean doFilter(GPSRecord r)
          Filter the GPS record
 int getEndTime()
          Get the last date of the period to include.
 int getRcrMask()
          Sets the 'RCR' filter mask for the given filter type and the currently active filters.
 int getStartTime()
          Get the first date of the period to include.
 int getValidMask()
          Gets the 'Valid' filter mask.
 void setEndTime(int endTime)
          Set the last date of the period to include (UTC time value).
 void setRcrMask(int rcrMask)
          Sets the 'RCR' filter mask for the given filter type and the currently active filters.
 void setStartTime(int startTime)
          Set the first date of the period to include (UTC time value).
 void setValidMask(int validMask)
          Sets the 'Valid' filter mask.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TRKPT

public static final int TRKPT
Index to trackpoint filter (in array of GPSFilter).

See Also:
Constant Field Values

WAYPT

public static final int WAYPT
Index to waypoint filter (in array of GPSFilter).

See Also:
Constant Field Values
Constructor Detail

GPSFilter

public GPSFilter()
Method Detail

getStartTime

public final int getStartTime()
Get the first date of the period to include.

Returns:
The first date of the period to include (UTC time value).

setStartTime

public final void setStartTime(int startTime)
Set the first date of the period to include (UTC time value).


getEndTime

public final int getEndTime()
Get the last date of the period to include.

Returns:
The last date of the period to include (UTC time value).

setEndTime

public final void setEndTime(int endTime)
Set the last date of the period to include (UTC time value).


getRcrMask

public final int getRcrMask()
Sets the 'RCR' filter mask for the given filter type and the currently active filters. Use the following constants:
- BT747Constants.RCR_TIME_MASK
- BT747Constants.RCR_SPEED_MASK
- BT747Constants.RCR_DISTANCE_MASK
- BT747Constants.RCR_BUTTON_MASK
- BT747Constants.RCR_APP0_MASK
- BT747Constants.RCR_APP1_MASK
- BT747Constants.RCR_APP2_MASK
- BT747Constants.RCR_APP3_MASK
- BT747Constants.RCR_APP4_MASK
- BT747Constants.RCR_APP5_MASK
- BT747Constants.RCR_APP6_MASK
- BT747Constants.RCR_APP7_MASK
- BT747Constants.RCR_APP8_MASK
- BT747Constants.RCR_APP9_MASK
- BT747Constants.RCR_APPY_MASK
- BT747Constants.RCR_APPZ_MASK
- BT747Constants.RCR_ALL_APP_MASK


setRcrMask

public final void setRcrMask(int rcrMask)
Sets the 'RCR' filter mask for the given filter type and the currently active filters.

Parameters:
rcrMask - The filter mask to set for the rcr filter. Use the following constants:
- BT747Constants.RCR_TIME_MASK
- BT747Constants.RCR_SPEED_MASK
- BT747Constants.RCR_DISTANCE_MASK
- BT747Constants.RCR_BUTTON_MASK
- BT747Constants.RCR_APP0_MASK
- BT747Constants.RCR_APP1_MASK
- BT747Constants.RCR_APP2_MASK
- BT747Constants.RCR_APP3_MASK
- BT747Constants.RCR_APP4_MASK
- BT747Constants.RCR_APP5_MASK
- BT747Constants.RCR_APP6_MASK
- BT747Constants.RCR_APP7_MASK
- BT747Constants.RCR_APP8_MASK
- BT747Constants.RCR_APP9_MASK
- BT747Constants.RCR_APPY_MASK
- BT747Constants.RCR_APPZ_MASK
- BT747Constants.RCR_ALL_APP_MASK

getValidMask

public final int getValidMask()
Gets the 'Valid' filter mask. Use the following constants:
- BT747Constants.VALID_NO_FIX_MASK
- BT747Constants.VALID_SPS_MASK
- BT747Constants.VALID_DGPS_MASK
- BT747Constants.VALID_PPS_MASK
- BT747Constants.VALID_RTK_MASK
- BT747Constants.VALID_FRTK_MASK
- BT747Constants.VALID_ESTIMATED_MASK
- BT747Constants.VALID_MANUAL_MASK
- BT747Constants.VALID_SIMULATOR_MASK


setValidMask

public final void setValidMask(int validMask)
Sets the 'Valid' filter mask.

Parameters:
validMask - The filter mask to set for the validity filter. Use the following constants:
- BT747Constants.VALID_NO_FIX_MASK
- BT747Constants.VALID_SPS_MASK
- BT747Constants.VALID_DGPS_MASK
- BT747Constants.VALID_PPS_MASK
- BT747Constants.VALID_RTK_MASK
- BT747Constants.VALID_FRTK_MASK
- BT747Constants.VALID_ESTIMATED_MASK
- BT747Constants.VALID_MANUAL_MASK
- BT747Constants.VALID_SIMULATOR_MASK

doFilter

public boolean doFilter(GPSRecord r)
Filter the GPS record

Parameters:
r - The GPS record
Returns:
true if the record is selected by the filter

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object