Open sugartechllc opened 6 years ago
Pierce suggests just having the user provide python code.
Note that compact versions of python may not directly support floating point math. Sometimes a math module is available that lets you work around this.
There may need to be some fiddling around to get code that can run on generic python systems, or which has “flavors” for python variants.
From the WeatherFlow comments section:
“Project tidbit: Derived data formulas for things like sea level pressure, dew point, feels like, pressure trends, etc here: https://weatherflow.github.io/SmartWeather/api/derived-metric-formulas.html “
User input and error handling provides a good tutorial for working with functions defined in strings.
Want to be able to compute derived values, using a recipe provided in the configuration.
SymPy looks like a perfect tool for implementing this.