Giter VIP home page Giter VIP logo

Comments (2)

rs1729 avatar rs1729 commented on July 23, 2024

Sorry, but I didn't want to include too many derived values, same with AUX-O3-data or pressure altitude. Maybe I will change my mind one day, but for now, maybe you include it yourself if you want that output. You can look how it is calculated here:
https://en.wikipedia.org/wiki/Dew_point
or look at
https://github.com/einergehtnochrein/ra-firmware/blob/master/src/rs41/rs41metrology.c#L262
You could change prn_ptu()
https://github.com/rs1729/RS/blob/master/demod/mod/rs41mod.c#L1446
and add dew point calculation like this:

static int prn_ptu(gpx_t *gpx) {
    fprintf(stdout, " ");
    if (gpx->T > -273.0) fprintf(stdout, " T=%.1fC ", gpx->T);
    if (gpx->RH > -0.5)  fprintf(stdout, " RH=%.0f%% ", gpx->RH);
    if (gpx->P > 0.0) {
        if (gpx->P < 100.0) fprintf(stdout, " P=%.2fhPa ", gpx->P);
        else                fprintf(stdout, " P=%.1fhPa ", gpx->P);
    }
    if (gpx->option.ptu == 2) {
        if (gpx->RH2 > -0.5)  fprintf(stdout, " RH2=%.0f%% ", gpx->RH2);
    }

    // dew point
    float rh = gpx->RH;
    float Td = -273.15f; // dew point Td
    if (gpx->option.ptu == 2) rh = gpx->RH2;
    if (rh > 0.0f && gpx->T > -273.0f) {
        float gamma = logf(rh / 100.0f) + (17.625f * gpx->T / (243.04f + gpx->T));
        Td = 243.04f * gamma / (17.625f - gamma);
        fprintf(stdout, " Td=%.1fC ", Td);
    }
    return 0;
}

Hm... maybe I include it as an additional option...

from rs.

rs1729 avatar rs1729 commented on July 23, 2024

rs41mod: added dew point option "--dewp" (don't forget "--ptu" or "--ptu2" resp.)

from rs.

Related Issues (20)

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.