awips2/nativeLib/rary.ohd.whfs/inc/dbms/rating_util.h
root 06a8b51d6d Initial revision of AWIPS2 11.9.0-7p5
Former-commit-id: 64fa9254b946eae7e61bbc3f513b7c3696c4f54f
2012-01-06 08:55:05 -06:00

64 lines
1.4 KiB
C

/*
File: rating_util.h
Date: December 1999
Author: Russell Erb
Sung Vo
Purpose:
*/
#ifndef rating_util_h
#define rating_util_h
/* Defines. */
#define RATING_CONVERT_FAILED -9999.
/* Includes. */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "DbmsDefs.h"
#include "Forecast.h"
#include "List.h"
#include "Observation.h"
#include "Rating.h"
#include "RejectedData.h"
#include "time_convert.h"
/* type definitions */
/* This structure is used by the load_rating_curve routine. It buffers
all of the rating curve information from the Rating table into
memory. */
typedef struct RatingInfo
{
Node node ;
char lid [ 9 ] ;
int count ;
Rating * pRatingHead ;
List list ;
} RatingInfo ;
/* Function prototypes. */
float stage2discharge(char *lid, float stage);
float discharge2stage(char *lid, float discharge);
float stage2discharge_buff(char *lid, float stage);
float discharge2stage_buff(char *lid, float discharge);
void free_rating_curve ( ) ;
Rating * load_rating_curve ( char * lid ) ;
void setRejectedDataObs(Observation *obs, RejectedData *rejectObs,
float old_value);
void setRejectedDataFcst(Forecast *fcst, RejectedData *rejectObs,
float old_value);
void createUpdDelWhereObs(char *where, Observation *obsPtr);
void createUpdDelWhereFcst(char *fcst_where, Forecast *fcstPtr);
#endif