Package GPS
Class GPSDataBlock
- All Implemented Interfaces:
NMEAEmulator
Add a bit of extra functionality to GPSDataBlock so
that it can check new GPS data are 'reasonable'
and flag bad ones.
- Author:
- Doug
-
Field Summary
Fields inherited from class PamguardMVC.PamDataBlock
ITERATOR_END, MATCH_AFTER, MATCH_BEFORE, MATCH_EXACT, MIX_DONOTHING, MIX_INTODATABASE, MIX_OUTOFDATABASE, NOTIFY_NEW_DATA, NOTIFY_UPDATE_DATA, POSITION_AFTER, POSITION_BEFORE, REFERENCE_ABSOLUTE, REFERENCE_CURRENT, REQUEST_DATA_LOADED, REQUEST_DATA_PARTIAL_LOAD, REQUEST_EXCEPTION, REQUEST_INTERRUPTED, REQUEST_NO_DATA, REQUEST_SAME_REQUEST
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addPamData
(GpsDataUnit gpsDataUnit) Adds a new PamDataUnit to the PamDataBlock.boolean
isReasonable
(GpsDataUnit gpsDataUnit) Check a GPS entry is reasonable - i.e.boolean
loadViewerData
(long dataStart, long dataEnd, ViewLoadObserver loadObserver) Instruction from the viewer scroll manager to load new data.boolean
loadViewerData
(OfflineDataLoadInfo offlineDataLoadInfo, ViewLoadObserver loadObserver) Instruction from the viewer scroll manager to load new data.boolean
prepareDataSource
(long[] timeLimits, long timeOffset) Prepare the data to be read into the emulator.Methods inherited from class PamguardMVC.PamDataBlock
addDataAnnotationType, addLocalisationContents, addObserver, addObserver, addOfflineDataMap, addOldPamData, addPamData, autoEffortProvider, autoSetDataBlockMixMode, cancelDataOrder, cancelDataOrder, checkOfflineDataUIDs, clearAll, clearChannelIterators, clearDeletedList, clearOnViewerLoad, copyDataList, createProcessAnnotations, createProcessAnnotations, dispose, dumpBlockContents, dumpBufferStatus, findAnnotation, findAnnotation, findByDatabaseIndex, findDataUnit, findDataUnit, findFirstUnitAfter, findLastUnitBefore, findUnitByUIDandUTC, findUnitsinInterval, getAnnotationHandler, getARealChannel, getBackgroundManager, getBespokeDataMapGraphic, getBinaryDataSource, getCanLog, getChannelIterator, getChannelIteratorCount, getChannelMap, getChannelsForSequenceMap, getClosestUnitMillis, getClosestUnitMillis, getClosestUnitMillisUsingSeq, getCrossReferenceInformation, getCumulativeGain, getCurrentViewDataEnd, getCurrentViewDataStart, getDataAutomationInfo, getDatablockSpeciesManager, getDataBlockXML, getDataCopy, getDataCopy, getDataCopy, getDataCopy, getDataCopyFromEnd, getDataCopyFromStart, getDataGain, getDatagrammedMap, getDatagramProvider, getDataName, getDataSelectCreator, getDataSelector, getDataSelector, getDataSelector, getDataUnit, getDataUnitMenuItems, getDataUnitPopupMenu, getDurationRange, getEffortProvider, getFirstRawSourceDataBlock, getFirstUnit, getFirstUnit, getFirstUnitAfter, getFirstViewerUID, getFrequencyRange, getHydrophoneMap, getJSONDataSource, getLastUnit, getLastUnit, getLastUnitMillis, getLastViewerUID, getListIterator, getListIterator, getListIteratorFromEnd, getListIteratorFromStart, getLocalisationAlgorithm, getLocalisationContents, getLogging, getLoggingName, getLongDataName, getMixedDirection, getMyDataUnits, getNanoTimeCalculator, getNaturalLifetime, getNaturalLifetimeMillis, getNextDataStart, getNextUnit, getNextUnit, getNumOfflineDataMaps, getNumRequiredBeforeLoadTime, getOfflineData, getOfflineDataMap, getOfflineDataMap, getPamSymbolManager, getParentProcess, getPreceedingUnit, getPreceedingUnit, getPreceedingUnit, getPreceedingUnit, getPreceedingUnitFromSeq, getPreceedingUnitFromSeq, getPrevDataEnd, getPrimaryDataMap, getProcessAnnotations, getQuickId, getQuickId2, getRawSourceDataBlock, getRawSourceDataBlock2, getRecordingTrigger, getRecycledUnit, getRecyclingStoreLength, getRemovedItems, getReverseChannelIterator, getSampleRate, getSaveRequirements, getSequenceCount, getSequenceIterator, getSequenceMap, getSequenceMapObject, getShouldBinary, getShouldLog, getShouldLog, getSourceDataBlock, getSourceProcess, getSuperDetectionClass, getSynchLock, getTethysDataProvider, getTOADCalculator, getUidHandler, getUIDRepairLogging, getUniqueParentList, getUnitClass, getUnitIndex, getUnitsCount, getUnitsCountFromTime, hasDataRange, isCanClipGenerate, isClearAtStart, isLinkGpsData, isOffline, isRecycling, masterClockUpdate, needViewerDataLoad, noteNewSettings, notifyModelChanged, orderOfflineData, orderOfflineData, orderOfflineData, pamStart, pamStop, remove, remove, remove, removeOfflineDataMap, reset, saveViewerData, setAnnotationHandler, setBackgroundManager, setBinaryDataSource, setCanClipGenerate, setChannelMap, setClearAtStart, setDatagramProvider, setDataName, setDataSelectCreator, setJSONDataSource, setLinkGpsData, setLocalisationContents, SetLogging, setMixedDirection, setNanoTimeCalculator, setNaturalLifetime, setNaturalLifetimeMillis, setPamSymbolManager, setParentProcess, setRecordingTrigger, setRecycling, setRecyclingStoreLength, setSampleRate, setSequenceMap, setShouldBinary, setShouldLog, setSynchLock, setUidHandler, shouldNotify, sortData, sortOutputMaps, stopTimer, toString, updatePamData
Methods inherited from class PamguardMVC.PamObservable
addInstantObserver, canDraw, canDraw, clearchanged, countObservers, createKeyItem, deleteObserver, deleteObservers, drawDataUnit, findThreadedObserver, getCPUPercent, getCPUPercent, getHoverText, getLongestObserver, getMaxThreadJitter, getOverlayDraw, getPamObserver, getRequiredHistory, isInstantObserver, notifyInstantObservers, notifyNornalObservers, notifyObservers, notifyObservers, setChanged, setOverlayDraw, updateObservers, waitForThreadedObservers
-
Constructor Details
-
GPSDataBlock
-
-
Method Details
-
addPamData
Description copied from class:PamDataBlock
Adds a new PamDataUnit to the PamDataBlock. When the data unit is added, PamObservers that have subscribed to the block will be notified.
If the data unit already has a UID, it will be left as is.- Overrides:
addPamData
in classPamDataBlock<GpsDataUnit>
- Parameters:
gpsDataUnit
- Reference to a PamDataUnit
-
isReasonable
Check a GPS entry is reasonable - i.e. doesn't jump a huge distance from the preceeding entry.- Parameters:
gpsDataUnit
-- Returns:
- true if reasonable.
-
getNextData
- Specified by:
getNextData
in interfaceNMEAEmulator
- Returns:
- the next emulated data, or null if there are no more.
-
prepareDataSource
public boolean prepareDataSource(long[] timeLimits, long timeOffset) Description copied from interface:NMEAEmulator
Prepare the data to be read into the emulator.The task may be as simple as setting up an interator to go through the data already read into the datablock or it may involve setting up a new database query to get back to raw data.
- Specified by:
prepareDataSource
in interfaceNMEAEmulator
- Parameters:
timeLimits
- time limits for the emulationtimeOffset
- time offset - between when the data were collected and the time they should be emulated at.- Returns:
- true if OK
-
loadViewerData
Description copied from class:PamDataBlock
Instruction from the viewer scroll manager to load new data.This just calls through to loadViewerData(OfflineDataLoadInfo ...) so this should not be overridden. Override the other function instead.
- Overrides:
loadViewerData
in classPamDataBlock<GpsDataUnit>
- Parameters:
dataStart
- data start time in millisdataEnd
- data end time in millis.loadObserver
- - the load obsever. Can be used as a callback for load progress.
-
loadViewerData
public boolean loadViewerData(OfflineDataLoadInfo offlineDataLoadInfo, ViewLoadObserver loadObserver) Description copied from class:PamDataBlock
Instruction from the viewer scroll manager to load new data.- Overrides:
loadViewerData
in classPamDataBlock<GpsDataUnit>
- Parameters:
offlineDataLoadInfo
- - the load object which contains all info on the data to be loaded.loadObserver
- - the load observer. Can be used as a callback for load progress.
-