This notebook demonstrates using the sscws IDL library to access data from NASA's Satellite Situation Center (SSC) in the IDL programming language. This notebook is for the IDL version of cdasws. A notebook for the Python version is available at python sscws notebook. This notebook contains the following sections:
If you have an old version of the SPDF_SSC package already installed, remove the old version.
ipm, /remove, 'SPDF_SSC'
"ipm, /remove, 'SPDF_SSC'"
If the lastest version of the SPDF_SSC package is not already installed, install it as shown below.
ipm, /install, 'https://sscweb.gsfc.nasa.gov/WebServices/REST/SPDF_SSC.zip'
"ipm, /install, 'https://sscweb.gsfc.nasa.gov/WebServices/REST/SPDF_SSC.zip'"
You only need to install a particular version of the package once. You will need to restore the package everytime you restart your IDL session. Restore the package as shown below.
restore, !package_path + '/SPDF_SSC/spdfssc.sav'
"restore, !package_path + '/SPDF_SSC/spdfssc.sav'"
Download and restore spdfssc.sav. You will need to restore the package everytime you restart your IDL session.
savFilename = filepath('spdfssc.sav', '/tmp')
oUrl = obj_new('IDLnetUrl')
; For IDL installations with old root certificates
oUrl->setProperty, SSL_VERIFY_PEER=0
savFilename = oUrl->get(filename=savFilename, url='https://sscweb.gsfc.nasa.gov/WebServices/REST/spdfssc.sav')
restore, savFilename
Cell In[12], line 4 oUrl -> setProperty, SSL_VERIFY_PEER=0 ^ SyntaxError: invalid syntax
Create an SpdfSsc object that will be used in the code that follows.
ssc = obj_new('SpdfSsc')
--------------------------------------------------------------------------- NameError Traceback (most recent call last) Cell In[15], line 1 ----> 1 ssc = obj_new('SpdfSsc') NameError: name 'obj_new' is not defined
The following code demonstrates how to get the list of available observatories.
foreach obs, (ssc->getObservatories())[0:4] do begin
caldat, obs->getStartTime(), m, d, y, h, m, s
print, obs->getId(), obs->getName(), y, m, d, h, m, s, $
format='%15s %25s %4d-%02d-%02dT%02d:%02d:%02dZ'
endforeach
print, '...'
end
The following code demonstrates how to get the list of available ground stations.
foreach station, (ssc->getGroundStations())[0:4] do begin
location = station->getLocation()
lat = location->getLatitude()
lon = location->getLongitude()
print, station->getId(), station->getName(), lat, lon, $
format='%5s %25s %7.2f %7.2f'
endforeach
print, '...'
end
The following code gets location information for the International Space Station (ISS) spacecraft and plots the ISS location information.
l = spdfGetLocations('iss', ['2013-01-01T00:00:00.000Z', '2013-01-01T01:00:00.000Z'])
p = plot3d(l->getX(), l->getY(), l->getZ(), window_title='Orbit')
View the sscsws API for additional functions.