com.partnersoft.gps.simulation
Class SimulatedGpsDevice

java.lang.Object
  extended by com.partnersoft.gps.AbstractGPSDevice
      extended by com.partnersoft.gps.simulation.SimulatedGpsDevice
All Implemented Interfaces:
GPSDevice

public class SimulatedGpsDevice
extends AbstractGPSDevice

Depends on MapApp because it needs to know the current projection.

Author:
russell

Field Summary
 
Fields inherited from class com.partnersoft.gps.AbstractGPSDevice
caster
 
Constructor Summary
SimulatedGpsDevice(MapApp app)
           
 
Method Summary
 void applyAllSettings()
           
 void close()
          Close the GPS.
 double getCenterX()
           
 double getCenterY()
           
 javax.swing.JPanel getConfigutron()
          Returns a property page for configuring the GPS.
 Constellation getConstellation()
           
 java.lang.String getDeviceLabel()
           
 java.lang.String getDeviceType()
           
 GPSState getGpsState()
          Returns null if the GPS is not open.
 double getHDOP()
           
 GPSReading getLastReading()
           
 double getPDOP()
           
 Postprocessing getPostprocessing()
           
 double getPredictedPostprocessedAccuracy()
           
 int getStatusCode()
           
 java.lang.String getStatusMessage()
           
 boolean isOpen()
           
 void open()
          Open the GPS using the current settings.
 void setCenter(double centerX, double centerY)
           
 SurveyedLocation surveyLocation()
          The simulation GPS does not take advantage of surveyLocation() to do any special processing, like point averaging.
 
Methods inherited from class com.partnersoft.gps.AbstractGPSDevice
addGPSListener, removeAllListeners, removeGPSListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimulatedGpsDevice

public SimulatedGpsDevice(MapApp app)
Method Detail

getDeviceType

public java.lang.String getDeviceType()

getDeviceLabel

public java.lang.String getDeviceLabel()

applyAllSettings

public void applyAllSettings()
                      throws java.io.IOException
Throws:
java.io.IOException

close

public void close()
Description copied from interface: GPSDevice
Close the GPS.


getConstellation

public Constellation getConstellation()

getHDOP

public double getHDOP()

getLastReading

public GPSReading getLastReading()

surveyLocation

public SurveyedLocation surveyLocation()
The simulation GPS does not take advantage of surveyLocation() to do any special processing, like point averaging. It just returns the last reading. Also, it ignores the GPS ID.

Returns:

getPDOP

public double getPDOP()

getPredictedPostprocessedAccuracy

public double getPredictedPostprocessedAccuracy()

getStatusCode

public int getStatusCode()

getStatusMessage

public java.lang.String getStatusMessage()

isOpen

public boolean isOpen()
Returns:
true if the GPS is open.

open

public void open()
Description copied from interface: GPSDevice
Open the GPS using the current settings. If this throws IOException, the GPS should be in the 'closed' state.


getConfigutron

public javax.swing.JPanel getConfigutron()
Description copied from interface: GPSDevice
Returns a property page for configuring the GPS.

Returns:

getGpsState

public GPSState getGpsState()
Description copied from interface: GPSDevice
Returns null if the GPS is not open.

Returns:

getPostprocessing

public Postprocessing getPostprocessing()

setCenter

public void setCenter(double centerX,
                      double centerY)

getCenterX

public double getCenterX()

getCenterY

public double getCenterY()