Added moisture calc function

didn’t put it main though, just wanted to keep a step ahead