More progress... but more things I need to calculate that I don't yet know how.
This commit is contained in:
parent
ccfc47eb79
commit
d679bcf781
11 changed files with 137 additions and 26 deletions
36
README.md
36
README.md
|
|
@ -2,4 +2,38 @@
|
|||
|
||||
Functions to compute relative humidity, absolute humidity, wet bulb
|
||||
temperature, and other values related to humidity of air, given
|
||||
partial data
|
||||
partial data.
|
||||
|
||||
## General architecture
|
||||
|
||||
### The packet
|
||||
|
||||
The 'packet', in the terminology of this library, is a map which has bindings
|
||||
for some of the following keywords:
|
||||
|
||||
1. `:actual-humidity`
|
||||
2. `:actual-vapour-pressure
|
||||
1. `:dew-point`
|
||||
2. `:pressure-pascals`
|
||||
3. `:pressure-millibars`
|
||||
4. `:saturation-pressure`
|
||||
5. `:relative-humidity`
|
||||
6. `:temperature`
|
||||
7. `:temperature-celsius`
|
||||
8. `:temperature-kelvin`
|
||||
|
||||
These keywords represent variables in the pressure equations, and they are all
|
||||
to a degree inter-related; so if you have (or can assume) some of them, you can
|
||||
compute others.
|
||||
|
||||
Rather than having a mess of functions all of which call one another, which
|
||||
seemed likely to result in horrible messes and potential infinite recursion,
|
||||
there is one central function, `humidity.core/resolution`, which takes a
|
||||
partial package and repeatedly tries to compute the values for more variables
|
||||
until it can compute no more, and then returns the enhanced packet.
|
||||
|
||||
At present there are no checks to ensure that the packet makes sense.
|
||||
|
||||
Associated with each variable there is a namespace which takes a packet, and,
|
||||
if that packet contains enough information to compute that variable, returns
|
||||
a numeric value, else `nil`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue