edu.wisc.ssec.mcidasv.data
Class PolarOrbitTrackDataSource

java.lang.Object
  extended by ucar.unidata.collab.SharableImpl
      extended by ucar.unidata.data.DataSourceImpl
          extended by edu.wisc.ssec.mcidasv.data.PolarOrbitTrackDataSource
All Implemented Interfaces:
Sharable, DataSource, DataSourceFactory, XmlPersistable

public class PolarOrbitTrackDataSource
extends DataSourceImpl

Class for Two-Line-Element data sources, to plot orbit tracks on McIDAS-V display window.

Version:
$Revision$
Author:
Tommy Jasmin

Field Summary
private  List choices
           
private  SGP4SatData data
           
private  int dTime
          time step between data points
private  double julDate0
           
private  double julDate1
           
private static org.slf4j.Logger logger
           
static double pi
           
private  SatelliteTleSGP4 prop
           
private  Hashtable selectionProps
           
private  TLE tle
           
private  List tleCards
           
private  List twoDCategories
          list of twod categories
 
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_TITLE
 
Constructor Summary
PolarOrbitTrackDataSource()
          Default bean constructor for persistence; does nothing.
PolarOrbitTrackDataSource(DataSourceDescriptor descriptor, String filename, Hashtable properties)
          Create a new PolarOrbitTrackDataSource
 
Method Summary
private  void checkFirstEntry()
           
private  int checksum(String str)
           
private  int decodeCard1(String card)
           
private  int decodeCard2(String card)
           
protected  void doMakeDataChoices()
          Make the data choices associated with this source.
protected  Data getDataInner(DataChoice dataChoice, DataCategory category, DataSelection dataSelection, Hashtable requestProperties)
          Actually get the data identified by the given DataChoce.
private  double getDouble(int beg, int end, String card)
           
 int getDTime()
           
private  int getInt(int beg, int end, String card)
           
 double getNearestAltToGroundStation(double gsLat, double gsLon)
           
 void initAfterCreation()
           
protected  void initDataSelectionComponents(List<DataSelectionComponent> components, DataChoice dataChoice)
           
private  void makeCategories()
          Initialize the DataCategory objects that this data source uses.
private  void notTLE()
           
 void setDTime(int val)
           
 boolean showPropertiesDialog(String initTabName, boolean modal)
          Show the dialog
 
Methods inherited from class ucar.unidata.data.DataSourceImpl
addActions, addDataChangeListener, addDataChoice, addPropertiesTabs, addReloadTab, applyFieldMask, applyProperties, beginWritingDataToLocalDisk, canAddCurrentName, canCacheDataToDisk, canChangeData, canDoAllLevels, canDoFieldMask, canDoGeoSelection, canDoGeoSelectionMap, canDoGeoSelectionStride, canPoll, canSaveDataToLocalDisk, 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, 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, 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 Detail

logger

private static final org.slf4j.Logger logger

twoDCategories

private List twoDCategories
list of twod categories


tleCards

private List tleCards

choices

private List choices

data

private SGP4SatData data

tle

private TLE tle

pi

public static double pi

selectionProps

private Hashtable selectionProps

dTime

private int dTime
time step between data points


prop

private SatelliteTleSGP4 prop

julDate0

private double julDate0

julDate1

private double julDate1
Constructor Detail

PolarOrbitTrackDataSource

public PolarOrbitTrackDataSource()
Default bean constructor for persistence; does nothing.


PolarOrbitTrackDataSource

public PolarOrbitTrackDataSource(DataSourceDescriptor descriptor,
                                 String filename,
                                 Hashtable properties)
                          throws VisADException
Create a new PolarOrbitTrackDataSource

Parameters:
descriptor - descriptor for this source
filename - ADDE URL
properties - extra properties for this source
Throws:
VisADException
Method Detail

checkFirstEntry

private void checkFirstEntry()

initAfterCreation

public void initAfterCreation()
Specified by:
initAfterCreation in interface DataSource
Overrides:
initAfterCreation in class DataSourceImpl

doMakeDataChoices

protected void doMakeDataChoices()
Make the data choices associated with this source.

Overrides:
doMakeDataChoices in class DataSourceImpl

makeCategories

private void makeCategories()
Initialize the DataCategory objects that this data source uses.


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 class DataSourceImpl
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 problem
VisADException - VisAD problem

getNearestAltToGroundStation

public double getNearestAltToGroundStation(double gsLat,
                                           double gsLon)

decodeCard1

private int decodeCard1(String card)

decodeCard2

private int decodeCard2(String card)

getInt

private int getInt(int beg,
                   int end,
                   String card)

getDouble

private double getDouble(int beg,
                         int end,
                         String card)

checksum

private int checksum(String str)

initDataSelectionComponents

protected void initDataSelectionComponents(List<DataSelectionComponent> components,
                                           DataChoice dataChoice)
Overrides:
initDataSelectionComponents in class DataSourceImpl

showPropertiesDialog

public boolean showPropertiesDialog(String initTabName,
                                    boolean modal)
Show the dialog

Overrides:
showPropertiesDialog in class DataSourceImpl
Parameters:
initTabName - What tab should we show. May be null.
modal - Is dialog modal
Returns:
success

getDTime

public int getDTime()

setDTime

public void setDTime(int val)

notTLE

private void notTLE()