Package edu.wisc.ssec.mcidasv.data
Class PolarOrbitTrackDataSource
java.lang.Object
ucar.unidata.collab.SharableImpl
ucar.unidata.data.DataSourceImpl
edu.wisc.ssec.mcidasv.data.PolarOrbitTrackDataSource
- All Implemented Interfaces:
Sharable
,DataSource
,DataSourceFactory
,XmlPersistable
Class for Two-Line-Element data sources, to plot orbit tracks
on McIDAS-V display window.
- Version:
- $Revision$
- Author:
- Gail Dengel and Tommy Jasmin
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate name.gano.astro.propogators.sgp4_cssi.SGP4SatData
private int
time step between data pointsprivate double
private double
private static final org.slf4j.Logger
private jsattrak.objects.SatelliteTleSGP4
private Hashtable
private jsattrak.utilities.TLE
(package private) TimeRangeSelection
Fields inherited from class ucar.unidata.data.DataSourceImpl
changeDataPathsCbx, dataCacheKey, dataChoices, geoSelectionPanel, haveBeenUnPersisted, okToContinue, PARAM_SHOW_HIDE, PARAM_SHOW_NO, PARAM_SHOW_YES
Fields inherited from interface ucar.unidata.data.DataSource
DATAPATH_DATE_FORMAT, DATAPATH_DATE_PATTERN, MOST_RECENT, ordinalNames, PROP_AUTOCREATEDISPLAY, PROP_BASEDIRECTORY, PROP_CACHEABLE, PROP_DATACHOICENAME, PROP_DISPLAYPROPERTIES, PROP_DOCUMENTLINKS, PROP_FILEPATTERN, PROP_GEOLOCATION, PROP_ICON, PROP_NAME, PROP_POLLINFO, PROP_RESOLVERURL, PROP_SERVICE_HTTP, PROP_SUBPROPERTIES, PROP_TIMELABELS, PROP_TIMESTRIDE, PROP_TITLE
-
Constructor Summary
ConstructorsConstructorDescriptionDefault bean constructor for persistence; does nothing.PolarOrbitTrackDataSource
(DataSourceDescriptor descriptor, String filename, Hashtable properties) Create a new PolarOrbitTrackDataSource -
Method Summary
Modifier and TypeMethodDescriptionboolean
Is this data source capable of saving its data to local diskprivate void
private int
private int
decodeCard1
(String card) private int
decodeCard2
(String card) protected void
Make the data choices associated with this source.choices needs to persist to support bundlesprotected Data
getDataInner
(DataChoice dataChoice, DataCategory category, DataSelection dataSelection, Hashtable requestProperties) Actually get the data identified by the given DataChoce.private double
int
getDTime()
private int
double
getNearestAltToGroundStation
(double gsLat, double gsLon) tleCards needs to persist to support bundlesgetTrs()
protected void
initDataSelectionComponents
(List<DataSelectionComponent> components, DataChoice dataChoice) Add any data selection componentsstatic String
makeNameForRemoteSource
(String urlStr) Create a nice looking name for this instance.private void
notTLE()
protected List
saveDataToLocalDisk
(String filePrefix, Object loadId, boolean changeLinks) Save the data source files to local diskvoid
setChoices
(ArrayList<String> choices) choices needs to persist to support bundlesvoid
setDTime
(int val) void
setSelectionProps
(Hashtable newProperties) void
setTleCards
(ArrayList<String> tleCards) tleCards needs to persist to support bundlesboolean
showPropertiesDialog
(String initTabName, boolean modal) Show the dialogMethods inherited from class ucar.unidata.data.DataSourceImpl
addActions, addDataChangeListener, addDataChoice, addPropertiesTabs, addReloadTab, applyFieldMask, applyProperties, beginWritingDataToLocalDisk, canAddCurrentName, canCacheDataToDisk, canChangeData, canDoAllLevels, canDoFieldMask, canDoGeoSelection, canDoGeoSelectionMap, canDoGeoSelectionStride, canPoll, canShowParameter, checkForInitAfterUnPersistence, clearCachedData, clearFileCache, clearTimes, convertSourceFile, convertToFilesIfDirectory, createAutoDisplay, createCacheKey, createElement, decrOutstandingGetDataCalls, doDirectory, doMakeDateTimes, doMakeGeoSelectionPanel, doMakeGeoSelectionPanel, doMakeGeoSelectionPanel, doMakeGeoSubsetPropertiesComponent, doRemove, endWritingDataToLocalDisk, equals, expandIfNeeded, findDataChoice, findDataChoices, flushCache, getAbsoluteDateTimes, getActions, getAlias, getAllDateTimes, getAllDateTimes, getAllLevels, getAllLevels, getAllTimesForTimeDriver, getCache, getCache, getCacheClearDelay, getCacheDataToDisk, getCompositeDataChoices, getData, getData, getDataCachePath, getDataChangeListeners, getDataChoices, getDataContext, getDataInner, getDataIsEditable, getDataPaths, getDataPrefix, getDataSelection, getDataSelectionComponents, getDataSource, getDateTimes, getDateTimeSelection, getDefaultSave, getDescription, getDescriptor, getErrorMessage, getEverChangedName, getExtraGeoSelectionComponent, getExtraTimesComponent, getFileFilterForPolling, getFullDescription, getid, getIdv, getInError, getLocalDirectory, getLocationForPolling, getLocationsForPolling, getMostRecentFiles, getName, getNameForDataSource, getNeedToShowErrorToUser, getNextId, getOutstandingGetDataCalls, getPartialDescription, getPassword, getPathsThatCanBeRelative, getPollingInfo, getProperties, getPropertiesComponents, getPropertiesHeader, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getRelativePaths, getSampleDataProjection, getSaveDataFileLabel, getSelectedDateTimes, getSelectedDateTimes, getTimesFromDataSelection, getTmpPaths, getTypeName, getUserName, handlePropertiesAction, hasPollingInfo, holdsDateTimes, holdsIndices, identifiedBy, identifiedByName, incrOutstandingGetDataCalls, initAfter, initAfterCreation, initAfterUnpersistence, initDataChoice, initFromXml, isPolling, loadFieldMask, loadFieldMask, loadLatestFile, logException, logException, makeDerivedDataChoices, makeSaveLocalActions, newFileFromPolling, newFilesFromPolling, notifyDataChange, propertiesChanged, putCache, putCache, reloadData, reloadData, reloadProperties, removeCache, removeDataChangeListener, removeDataChoice, removeProperty, replaceDataChoice, resetTmpState, saveDataToLocalDisk, saveDataToLocalDisk, selectTimesFromList, setAlias, setAskToUpdate, setCacheClearDelay, setCacheDataToDisk, setDataEditableStrings, setDataIsEditable, setDataIsRelative, setDataRelativeStrings, setDataSelection, setDateTimeSelection, setDefaultSave, setDescription, setDescriptor, setDirectory, setEverChangedName, setInError, setInError, setInError, setName, setNewFiles, setObjectProperties, setObjectProperty, setPassword, setPollingInfo, setPollLocation, setProperties, setProperty, setProperty, setRelativePaths, setTemplateName, setTmpPaths, setUserName, shouldCache, shouldCache, showPasswordDialog, showPropertiesDialog, showPropertiesDialog, showWaitDialog, tick, toString, toStringTruncated, updateDetailsText, updateState, writeFieldMaskFile, writeFieldMaskFile
Methods inherited from class ucar.unidata.collab.SharableImpl
applySharableProperties, doShare, doShare, doShareExternal, doShareInternal, getReceiveShareTime, getSharablePropertiesComponent, getShareGroup, getSharing, getUniqueId, initSharable, receiveShareData, removeSharable, setReceiveShareTime, setShareGroup, setSharing, setUniqueId, showSharableDialog
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface ucar.unidata.data.DataSource
getUniqueId
-
Field Details
-
logger
-
tleCards
-
choices
-
data
-
tle
-
selectionProps
-
dTime
time step between data points -
prop
-
julDate0
-
julDate1
-
trs
-
-
Constructor Details
-
PolarOrbitTrackDataSource
public PolarOrbitTrackDataSource()Default bean constructor for persistence; does nothing. -
PolarOrbitTrackDataSource
public PolarOrbitTrackDataSource(DataSourceDescriptor descriptor, String filename, Hashtable properties) Create a new PolarOrbitTrackDataSource- Parameters:
descriptor
- descriptor for this sourcefilename
- ADDE URLproperties
- extra properties for this source
-
-
Method Details
-
makeNameForRemoteSource
Create a nice looking name for this instance.Given a URL like
http://celestrak.com/NORAD/elements/weather.txt
, this method will returncelestrak: /NORAD/elements/weather.txt
.If the hostname from
urlStr
could not be sufficiently reduced, this method will simply use the entire hostname. A URL likehttp://adde.ssec.wisc.edu/weather.txt
will returnadde.ssec.wisc.edu: weather.txt
.If there was a problem parsing
urlStr
, the method will try to return the filename. A URL likehttp://celestrak.com/NORAD/elements/weather.txt
would returnweather.txt
.If all of the above fails,
urlStr
will be returned.- Parameters:
urlStr
- URL of the TLE information. Cannot benull
.- Returns:
- Either the name as described above, or
null
if there was a problem.
-
checkFirstEntry
-
checksum
-
decodeCard1
-
decodeCard2
-
doMakeDataChoices
Make the data choices associated with this source.- Overrides:
doMakeDataChoices
in classDataSourceImpl
-
getDataInner
protected Data getDataInner(DataChoice dataChoice, DataCategory category, DataSelection dataSelection, Hashtable requestProperties) throws VisADException, RemoteException Actually get the data identified by the given DataChoce. The default is to call the getDataInner that does not take the requestProperties. This allows other, non unidata.data DataSource-s (that follow the old API) to work.- Overrides:
getDataInner
in classDataSourceImpl
- Parameters:
dataChoice
- The data choice that identifies the requested data.category
- The data category of the request.dataSelection
- Identifies any subsetting of the data.requestProperties
- Hashtable that holds any detailed request properties.- Returns:
- The visad.Text object
- Throws:
RemoteException
- Java RMI problemVisADException
- VisAD problem
-
getDouble
-
getDTime
-
getInt
-
getChoices
choices needs to persist to support bundles- Returns:
- the choices
-
setChoices
choices needs to persist to support bundles- Parameters:
choices
- the choices to set
-
getTleCards
tleCards needs to persist to support bundles- Returns:
- the tleCards
-
setTleCards
tleCards needs to persist to support bundles- Parameters:
tleCards
- the tleCards to set
-
getTrs
- Returns:
- the trs
-
getNearestAltToGroundStation
-
canSaveDataToLocalDisk
Description copied from class:ucar.unidata.data.DataSourceImpl
Is this data source capable of saving its data to local disk- Specified by:
canSaveDataToLocalDisk
in interfaceDataSource
- Overrides:
canSaveDataToLocalDisk
in classDataSourceImpl
- Returns:
- Can save to local disk
-
saveDataToLocalDisk
protected List saveDataToLocalDisk(String filePrefix, Object loadId, boolean changeLinks) throws Exception Description copied from class:ucar.unidata.data.DataSourceImpl
Save the data source files to local disk- Overrides:
saveDataToLocalDisk
in classDataSourceImpl
- Parameters:
filePrefix
- This is the directory path to write the files to with the unique file identifier append to itloadId
- For stopping the load through the JobManagerchangeLinks
- Should this data source also change its internal data references- Returns:
- List of the files that were written
- Throws:
Exception
- On badness
-
initDataSelectionComponents
protected void initDataSelectionComponents(List<DataSelectionComponent> components, DataChoice dataChoice) Description copied from class:ucar.unidata.data.DataSourceImpl
Add any data selection components- Overrides:
initDataSelectionComponents
in classDataSourceImpl
- Parameters:
components
- list of componentsdataChoice
- the data choice
-
notTLE
-
setDTime
-
showPropertiesDialog
Show the dialog- Overrides:
showPropertiesDialog
in classDataSourceImpl
- Parameters:
initTabName
- What tab should we show. May be null.modal
- Is dialog modal- Returns:
- success
-
setSelectionProps
-