Class PolarOrbitTrackDataSource

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

public class PolarOrbitTrackDataSource extends ucar.unidata.data.DataSourceImpl
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

    Fields
    Modifier and Type
    Field
    Description
    private ArrayList<String>
     
    private name.gano.astro.propogators.sgp4_cssi.SGP4SatData
     
    private int
    time step between data points
    private double
     
    private double
     
    private static final org.slf4j.Logger
     
    private jsattrak.objects.SatelliteTleSGP4
     
    private Hashtable
     
    private jsattrak.utilities.TLE
     
    private ArrayList<String>
     
    (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

    Constructors
    Constructor
    Description
    Default bean constructor for persistence; does nothing.
    PolarOrbitTrackDataSource(ucar.unidata.data.DataSourceDescriptor descriptor, String filename, Hashtable properties)
    Create a new PolarOrbitTrackDataSource
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Is this data source capable of saving its data to local disk
    private void
     
    private int
     
    private int
     
    private int
     
    protected void
    Make the data choices associated with this source.
    choices needs to persist to support bundles
    protected Data
    getDataInner(ucar.unidata.data.DataChoice dataChoice, ucar.unidata.data.DataCategory category, ucar.unidata.data.DataSelection dataSelection, Hashtable requestProperties)
    Actually get the data identified by the given DataChoce.
    private double
    getDouble(int beg, int end, String card)
     
    int
     
    private int
    getInt(int beg, int end, String card)
     
    double
    getNearestAltToGroundStation(double gsLat, double gsLon)
     
    tleCards needs to persist to support bundles
     
    protected void
    initDataSelectionComponents(List<ucar.unidata.data.DataSelectionComponent> components, ucar.unidata.data.DataChoice dataChoice)
    Add any data selection components
    static String
    Create a nice looking name for this instance.
    private void
     
    protected List
    saveDataToLocalDisk(String filePrefix, Object loadId, boolean changeLinks)
    Save the data source files to local disk
    void
    choices needs to persist to support bundles
    void
    setDTime(int val)
     
    void
     
    void
    tleCards needs to persist to support bundles
    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, 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

  • Constructor Details

    • PolarOrbitTrackDataSource

      Default bean constructor for persistence; does nothing.
    • PolarOrbitTrackDataSource

      public PolarOrbitTrackDataSource(ucar.unidata.data.DataSourceDescriptor descriptor, String filename, Hashtable properties)
      Create a new PolarOrbitTrackDataSource
      Parameters:
      descriptor - descriptor for this source
      filename - ADDE URL
      properties - extra properties for this source
  • Method Details

    • makeNameForRemoteSource

      public static String makeNameForRemoteSource(String urlStr)
      Create a nice looking name for this instance.

      Given a URL like http://celestrak.com/NORAD/elements/weather.txt, this method will return celestrak: /NORAD/elements/weather.txt.

      If the hostname from urlStr could not be sufficiently reduced, this method will simply use the entire hostname. A URL like http://adde.ssec.wisc.edu/weather.txt will return adde.ssec.wisc.edu: weather.txt.

      If there was a problem parsing urlStr, the method will try to return the filename. A URL like http://celestrak.com/NORAD/elements/weather.txt would return weather.txt.

      If all of the above fails, urlStr will be returned.

      Parameters:
      urlStr - URL of the TLE information. Cannot be null.
      Returns:
      Either the name as described above, or null if there was a problem.
    • checkFirstEntry

      private void checkFirstEntry()
    • checksum

      private int checksum(String str)
    • decodeCard1

      private int decodeCard1(String card)
    • decodeCard2

      private int decodeCard2(String card)
    • doMakeDataChoices

      protected void doMakeDataChoices()
      Make the data choices associated with this source.
      Overrides:
      doMakeDataChoices in class ucar.unidata.data.DataSourceImpl
    • getDataInner

      protected Data getDataInner(ucar.unidata.data.DataChoice dataChoice, ucar.unidata.data.DataCategory category, ucar.unidata.data.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 ucar.unidata.data.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
    • getDouble

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

      public int getDTime()
    • getInt

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

      choices needs to persist to support bundles
      Returns:
      the choices
    • setChoices

      public void setChoices(ArrayList<String> choices)
      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

      public void setTleCards(ArrayList<String> tleCards)
      tleCards needs to persist to support bundles
      Parameters:
      tleCards - the tleCards to set
    • getTrs

      Returns:
      the trs
    • getNearestAltToGroundStation

      public double getNearestAltToGroundStation(double gsLat, double gsLon)
    • canSaveDataToLocalDisk

      public boolean 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 interface ucar.unidata.data.DataSource
      Overrides:
      canSaveDataToLocalDisk in class ucar.unidata.data.DataSourceImpl
      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 class ucar.unidata.data.DataSourceImpl
      Parameters:
      filePrefix - This is the directory path to write the files to with the unique file identifier append to it
      loadId - For stopping the load through the JobManager
      changeLinks - 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<ucar.unidata.data.DataSelectionComponent> components, ucar.unidata.data.DataChoice dataChoice)
      Description copied from class: ucar.unidata.data.DataSourceImpl
      Add any data selection components
      Overrides:
      initDataSelectionComponents in class ucar.unidata.data.DataSourceImpl
      Parameters:
      components - list of components
      dataChoice - the data choice
    • notTLE

      private void notTLE()
    • setDTime

      public void setDTime(int val)
    • showPropertiesDialog

      public boolean showPropertiesDialog(String initTabName, boolean modal)
      Show the dialog
      Overrides:
      showPropertiesDialog in class ucar.unidata.data.DataSourceImpl
      Parameters:
      initTabName - What tab should we show. May be null.
      modal - Is dialog modal
      Returns:
      success
    • setSelectionProps

      public void setSelectionProps(Hashtable newProperties)