You are currently not logged in or haven't verified your email in a while. Please login or complete the verifictation process to post.
StreamTeam Forum : American Whitewater Forums
Discussion area for StreamTeam and AW National River Database issues 
Goto Thread: PreviousNext
Goto: Forum ListMessage ListNew TopicSearchLog In
Goto Page: 12Next
Current Page: 1 of 2
Bad spelling, gauge formulas
Posted by: bankfull1 (IP Logged)
Date: December 02, 2009 11:18PM

Volumentric?

Corrolation?

Makes the website look a little dinky.

Also, is there a tutorial on how to make the gauge formulas for virtual gauges? I lost tons of the ones I created with the switch, and on the rare occasions I can add them again, I am completely baffled by the process.

Re: Bad spelling, gauge formulas
Posted by: pmartzen (IP Logged)
Date: December 03, 2009 05:36AM

I have wondered about that weird spelling for volumetric, but it remains despite others complaining about it also. I was starting to think that maybe it is a legitimate alternative spelling, but I can't find it in any dictionary that I have looked at. Even if it was an alternate spelling, it would be better to use the most common spelling, seems like.

I had not noticed that misspelling of "correlation".

Re: Bad spelling, gauge formulas
Posted by: matt (IP Logged)
Date: December 03, 2009 09:30AM

I'm rushing out the door, so I don't have time to look it up, but I thought that these were mentioned somewhere in the Bug Tracker.

I agree that the misspellings look amateurish, and I can't think of a reason for allowing them to persist.

Re: Bad spelling, gauge formulas
Posted by: rob (IP Logged)
Date: December 04, 2009 09:41AM

Since no one has addressed your question regarding virtual gauges, I'll give it a shot. It has been a while since I set up a virtual gauge, and I hadn't noticed that the script or facility for setting them up had changed. (The StreamTeamer used to be provided a framework wherein to just enter the various parameters, and the system built the formula. Now we are on our own to build the formula!) Anyway, easiest way is to take a pattern from some existing virtual gauge. Assuming you don't need anything too fancy or tricky, the basic formula is:

$flow=(a.aaaa)+(m.mmmm*($gauge[nnnnn]->getValue(GMETRIC_FLOW,0)))

or

$flow=(a.aaaa)+(m.mmmm*($gauge[nnnnn]->getValue(GMETRIC_STAGE,0)))

Obviously the former is for flow (cfs) readings, the latter for stage (feet/tenths) readings. (Note that the left side parameter '$flow=' does not change!)

a.aaaaa is an 'adder' -- a constant value to be added to the USGS (or other) gauge reading. If you need to subtract, make this value a negative number (-48.0, for example). If no addition or subtraction is needed, this value will be zero (0.0000).
m.mmmm is a 'multiplier' -- a constant value to multiply the USGS (or other) gauge reading by. This may be positive or negative. If less than 1 (or greater than -1), I would keep the leading zero (I.E., 0.25, not just .25).
nnnnn is the AW gauge number for the USGS (or other) gauge you are basing your virtual gauge on.

As I understand it (in my experience) It may take a few minutes (or hours?) after you create your gauge before it is actually populated with data, due to how the gauges are 'polled'.

If you need to add two gauges together, just repeat that part of the formula, filling in the appropriate values. If you need anything much trickier than that, scan the virtual gauge page for more examples:
[www.americanwhitewater.org]
(the above link is from the AW menu, Administrator>StreamTeam>ManageVirtualGauges)

Hopefully that should get you what you need. If not, please ask again with more specific information regarding what you need to do. Also, if anyone else wants to chime in (especially if anything I have included here is unclear or incorrect), please feel free.

Rob Smage
AW member since 1992, volunteer since 2000, Midwest Regional StreamTeam Editor

Re: Bad spelling, gauge formulas
Posted by: rob (IP Logged)
Date: December 04, 2009 12:07PM

It just occurred to me that the link I posted in the prior message may not appear to all StreamTeam members. It appears under a heading of "Supervisor StreamTeam Tools", which may appear only to Regional coordinators and higher authorized personnel. (It's hard for me to tell what 'regular' StreamTeamers see, versus what might appear only to those of us with 'Regional Supervisor' or higher authorization.)

Rob Smage
AW member since 1992, volunteer since 2000, Midwest Regional StreamTeam Editor

Re: Bad spelling, gauge formulas
Posted by: pmartzen (IP Logged)
Date: December 04, 2009 04:00PM

There is a new gauge on the NF Kings that only shows stage. I expect to get a rating table from PG&E or find one I have someplace, so I can convert stage to cfs. Once converted I can also calculate Dinkey Creek flows by simple subtraction from an existing downstream gauge. However, converting stage to cfs using a table is not a formula, so I am wondering if we have a mechanism for doing that.

Re: Bad spelling, gauge formulas
Posted by: matt (IP Logged)
Date: December 06, 2009 03:58PM

I recall that we set up something like that for the Gauley, based on a table assembled by ST Chuck Brabec. The exact mechanism escapes me at the moment (and it may have changed since then).

Re: Bad spelling, gauge formulas
Posted by: JohnT (IP Logged)
Date: December 08, 2009 02:02AM

... and another spelling error.

If you haven't logged in to the AW web site, at the top of this web page is the request "Please login or complete the verifictation process to post."

-- JohnT

Re: Bad spelling, gauge formulas
Posted by: skipmorris (IP Logged)
Date: December 11, 2009 08:39PM

A couple comments:

The virtual gage code I think is perl or php, but could easily be something else.

Gages also can measure other units then feet or cfs. GMETRIC_M_STAGE and GMETRIC_M_FLOW are for meters (Canada).

There's a "$time =" line which I haven't quite figured out.

There's a "pow" function which I have no clue what it does:
$flow=pow($gauge[49]->getValue(GMETRIC_STAGE,0),3.01798)*.00835;

It appears in several uses to take the form of "pow (gagevalue, xxx)".

I've also seen to forms of the return:
return(array(8,$flow,$time,isset($comment) ? $comment:null));
and
return(array(8,$flow,$time));

/Skip

Re: Bad spelling, gauge formulas
Posted by: rob (IP Logged)
Date: December 12, 2009 07:07PM

I'm pretty sure the "pow" is exponentiation (that is, raising a value to a power), as would be used for squaring a number (pow 2.0), or taking a square-root (pow=0.5). I have never gotten so exotic as to need it, but apparently we have some guys doing some sophisticated data analysis, working out complex flow curves.

Rob Smage
AW member since 1992, volunteer since 2000, Midwest Regional StreamTeam Editor

Goto Page: 12Next
Current Page: 1 of 2


Sorry, you do not have permission to post/reply in this forum.
This forum powered by Phorum.