Table of Contents

Class: geodeticToRadarService geodeticToRadarService.py

geodeticToRadarService is web service that allows access to the madrigal._Madrec.geodeticToRadar method.

Like all my python cgi scripts, geodeticToRadarService has the following structure: the entire cgi is contained in one class, with a main function at the end which serves simply to call the __init__ function of the class. This __init__ function is responsible for calling all other class methods. It is made up of a single try block, with the purpose of reporting all exceptions in well-formatted text to both the user and the administrator. The __init__ function first makes sure the pythonlib can be found. It then calls setScriptState to validate the the cgi arguments, which are simply the arguments for the isprint command.

If any uncaught exception is thrown, its caught by the __init__ try block. If its an MadrigalError, additional information is available. The catch blocks attempt to display the error message on the screen by backing out of of large number of possible tags, which might prevent its display (in any case, the error message will always be available in the page source. The formatted error message is also sent to the email address given in the siteTab.txt metadata file.

This script is not meant to be used directly by a user, and thus is named Service. It is meant to be used by scripting languages such as Matlab that want to call getInstruments via the web

Input cgi arguments:

        slatgd  - radar geodetic latitude

        slon - radar longitude

        saltgd - radar geodetic altitude

        gdlat - a comma-separated list of geodetic latitude of point

        glon - a comma-separated list of longitude of point

        gdalt - a comma-separated list of geodetic altitude of point

Returns comma-delimited data, one line for point in lists:

  1. radar azimuth in degrees (0 = north)

  2. radar elevation in degrees

  3. radar range in km

If error, returns error description

Change history:

Written by Bill Rideout Oct. 10, 2005

$Id: geodeticToRadarService_geodeticToRadarService.py.html 3304 2011-01-17 15:25:59Z brideout $

Methods   
__init__
geodeticToRadar
setScriptState
  __init__ 
__init__ ( self )

__init__ run the entire geodeticToRadarService script. All other functions are private and called by __init__.

Inputs: None

Returns: void

Affects: Ouputs geodeticToRadar data as a service.

Exceptions: None.

  geodeticToRadar 
geodeticToRadar ( self )

  setScriptState 
setScriptState ( self )

Exceptions   
'length of three comman-delimited input lists must be equal'

Table of Contents

This document was automatically generated on Fri Dec 30 09:31:03 2005 by HappyDoc version r1_5