Rory, did you try my proposed correction? Throwing away wrong values is 
imho the better choice over replacing them with other wrong values

michael.k...@gmx.at schrieb am Donnerstag, 16. Januar 2025 um 11:42:06 
UTC+1:

> this should be:
>
> windSpeed * 1.15 if winDir is not None else 20
>
> That being said, it shouldn't because it' s just a randomly guessed value.
>
> Graham Eddy schrieb am Donnerstag, 16. Januar 2025 um 11:41:43 UTC+1:
>
>> i mis-spoke. no assignment in ‘else’ e.g.
>>
>> windSpeed = 20 if windSpeed == 0 else windSpeed*1.15
>>
>> note: in this case, if windSpeed is None, then None*1.15 throws an 
>> error (silently, without enough debug level) and no action is taken i.e. it 
>> remains None
>> *⊣GE⊢*
>>
>> On 16 Jan 2025, at 9:33 pm, 'Rory Gillies' via weewx-user <
>> weewx...@googlegroups.com> wrote:
>>
>> windSpeed = 20 if windSpeed == 0 else windSpeed == windSpeed * 1.15
>>
>>
>>

-- 
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 weewx-user+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/weewx-user/a470aa1f-d1ed-4446-8022-8ccd30af1611n%40googlegroups.com.

Reply via email to