Tcl Weather API Library Module

The Tcl weather API library module has the file name wlib.tcl. This module performs various weather conversions. Any conversion that will uses floating-point numbers is coded to make use of the fixed-point math API.

Here is a list of procedures in the Tcl weather API library module:

Module Dependencies

The following modules are required along with this module:

Module Definition Files

This module requires the definition file:

Module Procedures

wlib_wdir_desc_2_deg

Declaration  : proc wlib_wdir_desc_2_deg {ddesc ddeg}
Parameters   :
      Name   : ddesc
      Type   : string
Description  : input wind direction alpha

      Name   : ddeg
      Type   : fxp list
Description  : output wind direction degrees

Returns      : TRUE upon success, FALSE otherwise

This procedure will convert the input wind direction alpha to degrees. There are sixteen possible alpha descriptions. Upon success the wind direction in degrees will be loaded into the output wind direction degrees The scale of the output wind direction degrees is defined as one.

wlib_get_field

Declaration  : proc wlib_get_field {line outfield which delim}
Parameters   :
      Name   : line
      Type   : string
Description  : input ASCII line

      Name   : outfield
      String : string
Description  : output field data

      Name   : which
      Type   : positive integer
Description  : field number

      Name   : delim
      Type   : string (single character)
Description  : field delimiter

Returns      : wlib_get_field code defined in this module

This procedure will obtain the field number field within the input ASCII line of a WeatherLink report. Each field in the input ASCII line is delimited by the field delimiter. Upon success, the result field will be loaded into the output field data.

wlib_report_trailer

Declaration  : proc wlib_report_trailer {fout apname ver do_copy}
Parameters   :
      Name   : fout
      Type   : output channel ID
Description  : output report channel

      Name   : apname
      Type   : string
Description  : application name

      Name   : ver
      Type   : string
Description  : version ID string

      Name   : do_copy
      Type   : boolean flag
Description  : copyright flag

Returns      : TRUE upon success, FALSE otherwise

This procedure will place a standard trailer on a weather report with or without a copyright notice. If the copyright flag is turned off, the program platform will not be reported.

Goto Top | Tcl Applications | Tcl Software Overview | Tcl Library Overview
| Future Lab Home | Contact Webmaster | Feedback

Copyright © 2006 Future Lab, Last Updated Jul 01, 2006