Author Topic: Weathershield Metrics  (Read 11260 times)

Kilo95

  • Sr. Member
  • ****
  • Posts: 340
  • Country: us
Re: Weathershield Metrics
« Reply #30 on: February 12, 2016, 11:38:00 AM »
Great. Thanks

Kilo95

  • Sr. Member
  • ****
  • Posts: 340
  • Country: us
Re: Weathershield Metrics
« Reply #31 on: February 16, 2016, 06:50:17 PM »
one more question, if i want the pressure calculated for my elevation/altitude instead of the constant that is set, where do i locate that in the sketch? i'm at 667 feet. i've noticed both of my WS are off from the National Weather Service office here by 0.4-0.4 inches

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6867
  • Country: us
    • LowPowerLab
Re: Weathershield Metrics
« Reply #32 on: February 17, 2016, 03:45:44 PM »
if i want the pressure calculated for my elevation/altitude instead of the constant that is set, where do i locate that in the sketch? i'm at 667 feet. i've noticed both of my WS are off from the National Weather Service office here by 0.4-0.4 inches
I guess I don't really understand that question.
The metric value comes directly from the sketch running on the Moteino. If you need that converted to something else, I think that's where you would do it. Also if the sensor absolute value is off compared to something else, that I cannot comment on.

jra

  • Jr. Member
  • **
  • Posts: 81
  • Country: us
Re: Weathershield Metrics
« Reply #33 on: February 17, 2016, 04:20:32 PM »
If you are using the stock sketch, just change the #define for ALTITUDE from 218.3 (meters) to 203.3 meters (equivalent to 667 feet).

Kilo95

  • Sr. Member
  • ****
  • Posts: 340
  • Country: us
Re: Weathershield Metrics
« Reply #34 on: February 17, 2016, 06:45:42 PM »
Awesome. Thx

Kilo95

  • Sr. Member
  • ****
  • Posts: 340
  • Country: us
Re: Weathershield Metrics
« Reply #35 on: February 17, 2016, 07:12:46 PM »
I'm using the weathershield node sketch. Not the plain WS one. The plain one doesn't have all of the radio code in it. The one I'm using does but doesn't have a #define altitude. I'll have to play with it more later

Kilo95

  • Sr. Member
  • ****
  • Posts: 340
  • Country: us
Re: Weathershield Metrics
« Reply #36 on: February 18, 2016, 06:27:23 PM »
ok, so i looked at the WS sketch (https://github.com/LowPowerLab/WeatherShield) and i see where to change the altitude. I'm using the WeatherNode.ino sketch to transmit to my gateway. I couldn't locate where to change the altitude in the WN sketch (https://github.com/LowPowerLab/RFM69/blob/master/Examples/WeatherNode/WeatherNode.ino). I see all the comments about changing it but there's nothing to change that I saw. I compared my readings to the NWS today and my nodes are showing 0.8inHg lower than the NWS office. I'd just like to get them close :)

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6867
  • Country: us
    • LowPowerLab
Re: Weathershield Metrics
« Reply #37 on: February 18, 2016, 07:28:36 PM »
If you follow the trail, it leads to these lines:

Code: [Select]
#define ALTITUDE 218.3 // Altitude in meters
...
          p0 = pressure.sealevel(P,ALTITUDE); // we're at 1655 meters (Boulder, CO)
          Serial.print("relative (sea-level) pressure: ");
          Serial.print(p0,2);
          Serial.print(" mb, ");
          Serial.print(p0*0.0295333727,2);
          Serial.println(" inHg");

          // On the other hand, if you want to determine your altitude from the pressure reading,
          // use the altitude function along with a baseline pressure (sea-level or other).
          // Parameters: P = absolute pressure in mb, p0 = baseline pressure in mb.
          // Result: a = altitude in m.

          a = pressure.altitude(P,p0);

I removed these in the WShield wireless sketch. I guess you'd have to call pressure.sealevel(P,ALTITUDE); to set the sea level or relative to your altitude.

Kilo95

  • Sr. Member
  • ****
  • Posts: 340
  • Country: us
Re: Weathershield Metrics
« Reply #38 on: February 18, 2016, 07:57:16 PM »
So I can just add those lines back into the WS sketch where you took them out? I thought I'd tried that. I can give it a shot again though

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6867
  • Country: us
    • LowPowerLab
Re: Weathershield Metrics
« Reply #39 on: February 18, 2016, 08:46:51 PM »
I'm just guessing :)

If you look at the library:

Code: [Select]
		double sealevel(double P, double A);
// convert absolute pressure to sea-level pressure (as used in weather data)
// P: absolute pressure (mbar)
// A: current altitude (meters)
// returns sealevel pressure in mbar

Kilo95

  • Sr. Member
  • ****
  • Posts: 340
  • Country: us
Re: Weathershield Metrics
« Reply #40 on: February 18, 2016, 09:40:57 PM »
i'm going to have to play with it a bit. i'm looking through the link to the bmp180 library

Kilo95

  • Sr. Member
  • ****
  • Posts: 340
  • Country: us
Re: Weathershield Metrics
« Reply #41 on: February 19, 2016, 06:31:40 PM »
I've gotten the correction factor (-0.7229). I still can't figure out where to put that. Maybe where the pressure reading gets returned from the BMP180? I thought that was return P but i tried return P-0.7229 but that didn't work. any suggestions? my inexperience is showing

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6867
  • Country: us
    • LowPowerLab
Re: Weathershield Metrics
« Reply #42 on: February 20, 2016, 08:59:41 PM »
I think this is being addressed in this topic.