mrgmarsh / wfrog

Automatically exported from code.google.com/p/wfrog
GNU General Public License v3.0
0 stars 0 forks source link

Introduce scalar functions #32

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Currently wfrog only has only aggregation functions (Max, Min, Last, etc.). 
HeatIndex, Windchill and such scalar values are calculated created an 
equivalent aggregation function like MaxHeatIndex.

We should separate scalar functions from aggregation functions, allowing 
combination of both. Calculated scalar values should also be available to be 
shown as current data.

Scalar functions could be:
- windchill
- heatIndex
- humidex
- cloud base

Original issue reported on code.google.com by jordi.pu...@gmail.com on 22 Aug 2010 at 7:58

GoogleCodeExporter commented 9 years ago
I like the vision you have about having the scalar functions at storage level 
and keep only aggregation functions in the accumulator. In fact, it should be a 
wrapper around the real storage (calculator) with configurable functions to add 
the "calculated columns". It would have the same interface as a storage (thus 
making possible to also store and use calculated values of the station, if one 
wants). Config could be like:

!accumulator:
  storage: !calculator
    functions:
      dewpoint0: !dewpoint { temp: temp0, hum: hum0 }
      windchill: !windchill { temp; temp1, wind: wind }
    storage: !service
      name: storage

Original comment by laurent....@gmail.com on 7 Sep 2010 at 7:37