-
Notifications
You must be signed in to change notification settings - Fork 393
Add Turbidity Unit #842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Turbidity Unit #842
Conversation
@angularsen I am having issues with the conversions tests. I suppose I did sth wrong, but I tried to follow the wiki, by giving the conversion values a fixed value. |
Hello, |
577a637
to
de4ba44
Compare
Codecov Report
@@ Coverage Diff @@
## master #842 +/- ##
==========================================
- Coverage 80.54% 80.49% -0.06%
==========================================
Files 281 283 +2
Lines 41925 42276 +351
==========================================
+ Hits 33770 34031 +261
- Misses 8155 8245 +90
Continue to review full report at Codecov.
|
@angularsen @lipchev I think you're right. I am also not a specialist in this type of unity...But yeah, it seems, the conversion depends on a calibration. So I suppose, we could add NTU without conversions? |
Right, the only way to support these conversions is probably to add
something like `myTurbidity.ToMilligramsPerLiter(someReference)` or create
a wrapper type `new ReferenceTurbidity(Turbidity.FromNTU(100),
someReference).ToMilligramsPerLiter();` but you lose out on much of the
generated code benefits.
We had similar issues for relative/absolute/gauge pressure conversions.
Please see ReferencePressure wrapper type introduced in
#726
|
de4ba44
to
2ca32c0
Compare
@angularsen I've modified the code and removed the conversions to ppm and mg/l. I think we could merge it already just adding the new NTU unit. For the conversion, I think we could go the `myTurbidity.ToMiligramsPerLiter(someReference)' way... They will be just the 2 conversions, to ppm and to mg/l. So manually adding both methods and tests should not be a headache. |
Ok, merged. Do you plan on adding the conversions later? |
Added Turbidity Unit and conversions
Fixes #825