GithubHelp home page GithubHelp logo

patricktokeeffe / 2022-biofiltro-logger Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 956 KB

CRBasic program for GHG analyzer logger used during BioFiltro study summer 2022

License: MIT License

crbasic weather-station wsular los-gatos-research

2022-biofiltro-logger's People

Contributors

patricktokeeffe avatar

Watchers

 avatar  avatar

2022-biofiltro-logger's Issues

Identify no new data condition

If logger stops receiving new serial data (e.g. cable disconnected, user opens analyzer Setup menu, analyzer turned off), then most recent value is retained indefinitely. Program should populate destination variable with NAN upon failing to obtain new serial record instead.

N.B. since analyzers operate at approximately 1Hz (±1-2%) the logger main scan loop runs at twice the anticipated data rate (2 Hz = 500 msec) to avoid a scenario where main loop might begin after new serial data record is already received. Maybe drop this approach entirely and just run deal with occasional serial record being lost.

Los Gatos Research serial data

Sometimes, without explanation, the logger will show invalid data for a single variable even though all other serial data values were parsed correctly.

How could this be possible? To correctly interpret all values except for a single column? One possible explanation is corruption in the serial message - but to confirm or invalidate this would require logging the actual serial message as a string (~400 characters).

Example serial data stream:
example serial data stream

Example screenshot, showing a spurious (garbage) value of 140671100 instead of the correct value, 140.671:
image

Initialize gas data to NAN

Variables for serial data analyzers are initialized to zero, but if analyzer is not sending data yet (e.g. turned off or cable disconnected), then those zeros are interpreted as valid data and get included in final data storage.

Rain/hail totalize

Table biofiltro_runs gets called from the main scan (500 ms) and Totalize() instructions apply a 1/2 scaling factor to compensate for main scan running faster than new data is queried. Except the weather station is only updated every five seconds so the scaling factor should actually be 1/10th (table called 5x2 times between successive measurements).

Alternatively, implement an inter-scan flag to ensure Totalize() is only called once, immediately after getting new measurements.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.