Yes, but the next time you upgrade you will lose your changes.

-tk

On Sun, Jun 25, 2017 at 10:36 AM, David Watts <[email protected]> wrote:

> Hi
>
> I've added [windGust] to the heatindex part of wxservices.py:
>
>  def calc_heatindex(self, data, data_type):  # @UnusedVariable
>         data['heatindex'] = None
>         if 'outTemp' in data and 'outHumidity' in data:
>             data['heatindex'] = weewx.wxformulas.heatindexF(
>                 data['outTemp'], data['outHumidity'], data['windSpeed']
> *, data['windGust'])*
>
> In wxformulas.py, I've added "G_mph" to represent the gust, as follows:
>
> def heatindexF(T_F, R, V_mph*, G_mph*):
>
> Have I done this correctly so that G_mph could now be used in a formula?
>
> Thanks
>
>
>
>
> On Saturday, 17 June 2017 02:16:26 UTC+1, Andrew Milner wrote:
>>
>> Try and see if this helps:
>> http://www.tutorialspoint.com/python/python_functions.htm
>>
>>
>>
>> On Friday, 16 June 2017 22:07:51 UTC+3, David Watts wrote:
>>
>>> I think I understand most of that, but I'm still a bit confused as to
>>> how the wxformulas.py script gathers the data. Supposing you had a new
>>> formula that used the indoor temperature data - how would that data be
>>> 'imported' for use in the script and what would it be represented as?
>>>
>>> Thanks!
>>>
>>> On Friday, 16 June 2017 18:09:39 UTC+1, Andrew Milner wrote:
>>>>
>>>> Look at where the functions which are defined in wxformulas.py are
>>>> actually used.  |In wxformulas you have the function definitions with
>>>> placeholders for the parameters to be passed.  When the functions are
>>>> called the placeholders are replaced by the actual parameters, and the
>>>> formula usually returns the result of the formula calculation.
>>>>
>>>> On Friday, 16 June 2017 17:11:29 UTC+3, David Watts wrote:
>>>>>
>>>>> Thanks again - I will look into this.
>>>>>
>>>>> One more question - in the wxformulas.py file, temperature is defined
>>>>> as "T" and humidity as "R", for example.
>>>>>
>>>>> How does it pull this data in? I can't see anywhere else that refers
>>>>> to temp and humidity in this way. Just curious! :)
>>>>>
>>>>> Thanks
>>>>>
>>>>> --
> You received this message because you are subscribed to the Google Groups
> "weewx-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to