Open labordep opened 3 weeks ago
Hi @MarcusDenker! I'm trying to implement the decibel unit. This is based on the watt but without a "linear" conversion. The conversion from db to w is
10 raisedTo: (db-30 / 10)
I'm adding a new unit with this value in watt:
self abbreviation: 'dB' name: 'decibel' pluralName: 'decibels' value: ((10 raisedTo: ((1 - 30) / 10)) units: Unit watt).
but when I'm trying to convert 30dB in Watt this is 0.3w and not 1 (because 30dB=1W):
30 decibel convertTo: #watt =>0.037767762353824993 watts
30 decibel convertTo: #watt
I suppose this is normal and I don't know how to write the conversion formula (and also the reverse too).
How I can implement that?
Thanks.
Sorry for the late answer. I have sadly no idea myself, I will have a look as soon as I find time
Thanks @MarcusDenker, interessed to take a look!
Hi @MarcusDenker! I'm trying to implement the decibel unit. This is based on the watt but without a "linear" conversion. The conversion from db to w is
I'm adding a new unit with this value in watt:
but when I'm trying to convert 30dB in Watt this is 0.3w and not 1 (because 30dB=1W):
30 decibel convertTo: #watt
=>0.037767762353824993 wattsI suppose this is normal and I don't know how to write the conversion formula (and also the reverse too).
How I can implement that?
Thanks.