39 lines
1.3 KiB
Markdown
39 lines
1.3 KiB
Markdown
# humidity
|
|
|
|
Functions to compute relative humidity, absolute humidity, wet bulb
|
|
temperature, and other values related to humidity of air, given
|
|
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`.
|