com.partnersoft.io.gps.trimble
Class TrimbleDaemon
java.lang.Object
com.partnersoft.io.gps.trimble.TrimbleDaemon
public class TrimbleDaemon
- extends java.lang.Object
A few development notes:
The GPSReceiver and the SSFWriter worked in different ways with
different configurations. The only way I could get everything
to work at once was to create my own ActiveX containers and my own
message loop.
The first thing I tried was to create the Trimble objects as COM
objects through _com_ptr_t::CreateInstance(). This worked without
any errors, and the SSFWriter worked with the GPSReceiver, but none
of the GPSReceiver.Get*() functions worked. Most importantly, GetPosition()
did not return a position.
My next alternative was to create the controls as ActiveX objects inside an ActiveX
container, as seen in the Trimble SDK sample. This fixed the GPSReceiver.Get*()
functions, but it broke the SSFWriter, giving me an E_NOINTERFACE
error when I called SSFWriter.AttachGPSReceiverControl(). Guessing
that the problem was with Java's message loop, I created my own thread
and my own message loop for my control windows, which seemed
to fix both problems. Trimble's message loop must be created before the AWT's
message loop, i.e. before any calls to the AWT or Swing, or SSFWriter.AttachGPSReceiverControl()
will throw an E_NOINTERFACE exception. I don't know why, or even quite what that
error means.
I use ATL 8.0 to create the ActiveX containers, which requires the user
to install the ATL runtime libraries. I tried linking it statically,
but the CreateWindow() called failed with static linking, and I think
I remember something about the ATL ActiveX container only working with
the DLL version of ATL. DLL. ATL. Yup.
- Author:
- Russell Cagle
Copyright 2006 Partner Software, Inc.
|
Method Summary |
int |
appendSSFFile(java.lang.String directory,
java.lang.String filename)
|
int |
cancelFeature()
|
int |
endFeature(java.lang.String comment)
|
int |
endSSFFile()
|
double |
getAltitude()
|
AntennaSettings |
getAntennaSettings()
|
AntennaStatus |
getAntennaStatus()
|
float |
getAreaLoggingInterval()
|
BatteryLevel |
getBatteryLevel()
|
CarrierStatus |
getCarrierStatus()
|
java.lang.String |
getCommPort()
|
GPSConstellation |
getConstellationInformation()
|
CourseAndSpeed |
getCourseAndSpeed()
|
float |
getCourseAndSpeedMinimumInterval()
|
java.lang.String |
getDataFile()
|
int |
getDataSource()
|
int |
getDOPType()
|
boolean |
getEnableNotInFeatureLogging()
|
GPSStatus |
getGPSStatus()
|
java.lang.String |
getLastStatusMessage()
|
double |
getLatitude()
|
float |
getLineLoggingInterval()
|
boolean |
getLogCarrier()
|
boolean |
getLogSuperCorrect()
|
double |
getLongitude()
|
float |
getMaximumHDOPMask()
|
float |
getMaximumPDOPMask()
|
float |
getMinimumElevationAngleMask()
|
int |
getMinimumNumberOfSatellites()
|
float |
getMinimumSNRMask()
|
float |
getNotInFeatureLoggingInterval()
|
float |
getPointLoggingInterval()
|
GPSPosition |
getPosition()
|
float |
getPositionMinimumInterval()
|
double |
getPredictedPostprocessedAccuracy()
|
double |
getRadius()
|
GPSReceiverIdentification |
getReceiverIdentification()
|
boolean |
getVelocityFilter()
|
boolean |
isFeatureInProgress()
|
boolean |
isRunning()
|
boolean |
isSimulationEnabled()
|
boolean |
isSSFFileInProgress()
|
boolean |
isTracking()
|
long |
numberOfPositionsLoggedInFeature()
|
boolean |
resetGPSReceiver()
|
void |
setAltitude(double newval)
|
void |
setAntennaSettings(java.lang.String antennaName,
int measurementMethod,
double heightInMeters)
|
void |
setAreaLoggingInterval(float newval)
|
void |
setCommPort(java.lang.String portName)
|
void |
setCourseAndSpeedMinimumInterval(float seconds)
|
void |
setDataFile(java.lang.String argDataFile)
|
void |
setDataSource(int argDataSource)
|
void |
setDOPType(int dopType)
|
void |
setEnableNotInFeatureLogging(boolean newval)
|
void |
setLatitude(double argLatitude)
|
void |
setLineLoggingInterval(float newval)
|
void |
setLogCarrier(boolean newval)
|
void |
setLogSuperCorrect(boolean newval)
|
void |
setLongitude(double argLongitude)
|
void |
setMaximumHDOPMask(float max)
|
void |
setMaximumPDOPMask(float max)
|
void |
setMinimumElevationAngleMask(float min)
|
void |
setMinimumNumberOfSatellites(int min)
|
void |
setMinimumSNRMask(float min)
|
void |
setNotInFeatureLoggingInterval(float newval)
|
void |
setPointLoggingInterval(float newval)
|
void |
setPositionMinimumInterval(float min)
|
void |
setRadius(double argRadius)
|
void |
setSimulationEnabled(boolean argSimulationEnabled)
|
void |
setTimeoutMs(long argTimeoutMs)
|
void |
setVelocityFilter(boolean filter)
|
static TrimbleDaemon |
singleton()
|
void |
start()
|
int |
startFeature(int featureType)
|
int |
startSSFFile(java.lang.String directory,
java.lang.String filename)
|
boolean |
startTracking()
|
void |
stop()
|
boolean |
stopTracking()
|
void |
writeLineAreaHVOffset(int offsetDirection,
float horizontalDistance,
float verticalDistance)
|
void |
writeLineAreaSIOffset(int offsetDirection,
float slopeDistance,
float inclination)
|
void |
writePointHVOffset(float bearing,
float horizontalDistance,
float verticalDistance)
|
void |
writePointSIOffset(float bearing,
float slopeDistance,
float inclination)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
singleton
public static TrimbleDaemon singleton()
appendSSFFile
public int appendSSFFile(java.lang.String directory,
java.lang.String filename)
cancelFeature
public int cancelFeature()
endFeature
public int endFeature(java.lang.String comment)
endSSFFile
public int endSSFFile()
getAltitude
public double getAltitude()
getAntennaSettings
public AntennaSettings getAntennaSettings()
getAntennaStatus
public AntennaStatus getAntennaStatus()
getAreaLoggingInterval
public float getAreaLoggingInterval()
getBatteryLevel
public BatteryLevel getBatteryLevel()
getCarrierStatus
public CarrierStatus getCarrierStatus()
getCommPort
public java.lang.String getCommPort()
getConstellationInformation
public GPSConstellation getConstellationInformation()
getCourseAndSpeed
public CourseAndSpeed getCourseAndSpeed()
getCourseAndSpeedMinimumInterval
public float getCourseAndSpeedMinimumInterval()
getDataFile
public java.lang.String getDataFile()
getDataSource
public int getDataSource()
getDOPType
public int getDOPType()
getEnableNotInFeatureLogging
public boolean getEnableNotInFeatureLogging()
getGPSStatus
public GPSStatus getGPSStatus()
getLastStatusMessage
public java.lang.String getLastStatusMessage()
getLatitude
public double getLatitude()
getLongitude
public double getLongitude()
getLineLoggingInterval
public float getLineLoggingInterval()
getLogCarrier
public boolean getLogCarrier()
getLogSuperCorrect
public boolean getLogSuperCorrect()
getMaximumHDOPMask
public float getMaximumHDOPMask()
getMaximumPDOPMask
public float getMaximumPDOPMask()
getMinimumElevationAngleMask
public float getMinimumElevationAngleMask()
getMinimumNumberOfSatellites
public int getMinimumNumberOfSatellites()
getMinimumSNRMask
public float getMinimumSNRMask()
getNotInFeatureLoggingInterval
public float getNotInFeatureLoggingInterval()
getPointLoggingInterval
public float getPointLoggingInterval()
getPosition
public GPSPosition getPosition()
getPositionMinimumInterval
public float getPositionMinimumInterval()
getPredictedPostprocessedAccuracy
public double getPredictedPostprocessedAccuracy()
getRadius
public double getRadius()
getReceiverIdentification
public GPSReceiverIdentification getReceiverIdentification()
getVelocityFilter
public boolean getVelocityFilter()
isFeatureInProgress
public boolean isFeatureInProgress()
isRunning
public boolean isRunning()
isSimulationEnabled
public boolean isSimulationEnabled()
isSSFFileInProgress
public boolean isSSFFileInProgress()
isTracking
public boolean isTracking()
numberOfPositionsLoggedInFeature
public long numberOfPositionsLoggedInFeature()
resetGPSReceiver
public boolean resetGPSReceiver()
setAltitude
public void setAltitude(double newval)
setAntennaSettings
public void setAntennaSettings(java.lang.String antennaName,
int measurementMethod,
double heightInMeters)
setAreaLoggingInterval
public void setAreaLoggingInterval(float newval)
setCommPort
public void setCommPort(java.lang.String portName)
setCourseAndSpeedMinimumInterval
public void setCourseAndSpeedMinimumInterval(float seconds)
setDataFile
public void setDataFile(java.lang.String argDataFile)
setDataSource
public void setDataSource(int argDataSource)
setDOPType
public void setDOPType(int dopType)
setEnableNotInFeatureLogging
public void setEnableNotInFeatureLogging(boolean newval)
setLatitude
public void setLatitude(double argLatitude)
setLongitude
public void setLongitude(double argLongitude)
setLineLoggingInterval
public void setLineLoggingInterval(float newval)
setLogCarrier
public void setLogCarrier(boolean newval)
setLogSuperCorrect
public void setLogSuperCorrect(boolean newval)
setMaximumHDOPMask
public void setMaximumHDOPMask(float max)
- Parameters:
max - between 1-99.
setMaximumPDOPMask
public void setMaximumPDOPMask(float max)
- Parameters:
max - between 1-99.
setMinimumElevationAngleMask
public void setMinimumElevationAngleMask(float min)
- Parameters:
min - between 0-90.
setMinimumNumberOfSatellites
public void setMinimumNumberOfSatellites(int min)
- Parameters:
min - between 4-5.
setMinimumSNRMask
public void setMinimumSNRMask(float min)
- Parameters:
min - between 20-47.
setNotInFeatureLoggingInterval
public void setNotInFeatureLoggingInterval(float newval)
setPointLoggingInterval
public void setPointLoggingInterval(float newval)
setPositionMinimumInterval
public void setPositionMinimumInterval(float min)
- Parameters:
min - between 20-47.
setRadius
public void setRadius(double argRadius)
setSimulationEnabled
public void setSimulationEnabled(boolean argSimulationEnabled)
setTimeoutMs
public void setTimeoutMs(long argTimeoutMs)
setVelocityFilter
public void setVelocityFilter(boolean filter)
start
public void start()
startFeature
public int startFeature(int featureType)
startSSFFile
public int startSSFFile(java.lang.String directory,
java.lang.String filename)
startTracking
public boolean startTracking()
stop
public void stop()
stopTracking
public boolean stopTracking()
writeLineAreaHVOffset
public void writeLineAreaHVOffset(int offsetDirection,
float horizontalDistance,
float verticalDistance)
writeLineAreaSIOffset
public void writeLineAreaSIOffset(int offsetDirection,
float slopeDistance,
float inclination)
writePointHVOffset
public void writePointHVOffset(float bearing,
float horizontalDistance,
float verticalDistance)
writePointSIOffset
public void writePointSIOffset(float bearing,
float slopeDistance,
float inclination)