SG and Plato conversion calcs.
This commit is contained in:
parent
1d830eb22d
commit
07c881bdfe
@ -86,3 +86,12 @@ def get_batches(api_user, api_key, batch=''):
|
||||
data = data + get_batches(batch=last_id)
|
||||
|
||||
return data
|
||||
|
||||
def sg_plato(sg):
|
||||
"""Convert specific gravtiy to °P."""
|
||||
sg = float(sg)
|
||||
return (-1*616.868) + (1111.14*sg) - (630.272*sg**2) + (135.997*sg**3)
|
||||
|
||||
def plato_sg(plato):
|
||||
"""Convert °P to specific gravtiy."""
|
||||
return 1 + (plato / (258.6 - (plato/258.2) * 227.1))
|
||||
|
Loading…
Reference in New Issue
Block a user