Laserfiche WebLink
<br />Data averaging <br /> <br />Plot data structure <br /> <br />to_da te. All values between these times are used in the data display. <br /> <br />2. If the user selected hourly or daily as the averaging interval, all values in the <br />interval within which start_date and end_date fall are included in the <br />data display. That is, from_date is created by moving start_date back to the <br />beginning of the hour for hourly averaged data or back to the beginning of the <br />day for daily averaged data. Likewise, to_date is created by using the end of the <br />hour or day in which end_date falls. For example, a user selects an hourly aver- <br />age for a gauged data display. The Preferences dialog has a time interval set in <br />the past from 7/111994 12:30 to 717/1994 14:00. The dates created for the call to <br />QueryStreamflowlni t () would be from 7/111994 12:00 to 717/1994 <br />14:59. The averagi~g routine would use all values in any interval included in the <br />start_date and end_date from the Preferences dialog. <br /> <br />3. If the same dates from the Preferences dialog were used to create a gauged data <br />display with a daily averaging interval, the from_date and to_date would <br />be 7/1/1994 00:00 and 717/1994 23:59 respectively. Thus, the OMI functions <br />would retrieve all values on any day partially included in the specified time inter- <br />val. <br /> <br />If an averaging interval (other than Real. Time) is selected for a gauged data display, <br />the real-time data is aggregated into a single value for each timestep in the selected <br />time interval. The averaging algorithm is described in the "Gauge Data Aggregation" <br />section on page 48. <br /> <br />The data structure that holds the data-after it has been processed by any averaging <br />routines-is the PLOT_OATA_PACKAGE. This data structure holds a number of <br />vectors. or segments, for any selected gauge. It has the following structure: <br /> <br />typedef struct { <br />double xmin; <br />double xmax; <br />double ymin; <br />double ymax; <br /> <br />int <br /> <br />nvectors; <br /> <br />char valuetype_str[S]; <br />CELL_PTR* segment_list; <br />PLOT_DATA_PACKAGE; <br /> <br />Where: <br /> <br />. xmin: The minimum x value (time) in data set. <br /> <br />. xmax: The maximum x value (time) in data set. <br /> <br />. yrnin: The minimum y value (measured value) in data set. <br /> <br />. yrnax: The maximum y value (measured value) in data set. <br /> <br />. nvectors: The number of vectors, or segments, in data. <br /> <br />. valuetype_str: An indicator of the type of data represented (one of FLOW, <br />ELEV, or STOR). <br /> <br />26 <br />