Generally, drivers should not calculate derived variables. They should let StdWXService do that. It has access to way more information than the driver, particularly the database. This allows it to do things like correct for semi-diurnal tides.
Another point is that the calculation to go from gauge pressure to sea-level pressure is highly non-linear. You can't just add a correction constant to the former and expect it to work at all temperatures and humidities. Be sure to see the *General guidelines <http://weewx.com/docs/customizing.htm#General_guidelines>* section for writing a device driver. -tk On Thu, Jan 31, 2019 at 4:33 PM <[email protected]> wrote: > Hello people! > > I have had my custom driver running without issues for a while, I am very > happy about it. I have a little question though: > Right now I have my driver reporting the raw pressure measured by the > station (pressure) to weeWX and let the weeWX engine take care of > calculating the Sea Level Pressure (barometer). > My station allows me to store a reference pressure from a local station > and use that as a calibration measurement to estimate Sea Level Pressure > (barometer), should I do that calculation in my driver and pass the value > as barometer to weeWX or just let weeWX take care of that. What is the > recommended approach? > > In that same note, I am also writing a driver for the Build Your Own > Weather Station tutorial for Raspberry Pi and I'm facing the dilemma of > calculating wind gust in the driver or not. Should I just pass the wind > speed and then let weeWX engine calculate wind gust? > > Thanks, > Jardi. >
