Introduced sensor operations in dcdblib. Optimized printout of operations in dcdbquery.
lib/src/sensoroperations.cpp
0 → 100644
This diff is collapsed.
-
Author
Added:
- Sensor operations in DCDBLib with checks on numerical problems like overflows, division by zero etc.
- Reworked dcdbquery to exploit sensor operations for printing interesting ops like deltas, derivatives, integrals, etc.
- Removed scaling factor in sensor.cpp. It's now defined as a sensor operation. The public sensor scaling factor is untouched.
- Removed float output from dcdbquery...we really never used it...
- Precision is 64-bit integer for all operations besides scaling factors (double).
Next:
- Fix unit conversion! At the moment it only makes sense for normal sensor readings, not for sensor operations (e.g., need to add units like Ws, Joules, l/h, etc.).
- Update output on dcdbquery -h
- Fix overflow for monotonic sensor readings (e.g., energy will overflow at some point).
- Add unit conversion for timestamps (useful for sensor operations).
Please register or sign in to comment