-
Notifications
You must be signed in to change notification settings - Fork 394
Added a few new units and new prefixes for existing units. #291
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
Conversation
DInozemtsev
commented
Sep 29, 2017
- BritishThermalUnits: added new prefixes 'Kilo', 'Mega' and 'Giga' to support 'kBTU', 'mBTU', 'mmBTU'
- Added a new unit 'CubicFootPerHour'
- Pound: added new prefixes 'Kilo' and 'Mega' to support 'KLbs' and 'MLbs'
- PoundsPerHour: added new prefixes 'Mega' to support 'Mlb/h'
- Added a new unit 'ShortTonPerHour'
- Added a new unit 'BritishThermalUnitPerHour'
- CubicMeters: added new prefixes 'Hecto' and 'Kilo'
- CubicFoot: added new prefixes 'Hecto', 'Kilo' and 'Mega'
- ImperialGallons: added new prefixes 'Kilo' and 'Mega'
- UsGallons: added new prefixes 'Kilo' and 'Mega'
Awesome stuff, there is just a merge conflict you need to address. Please merge in latest from I think I saw you were a first-time github contributor, so if you are unsure about these things just ask and I'll help you out. |
Hmm... I did merge from your master into mine and there was not any conflicts. However AppVeyor build fails with errors like this:
Which is quite odd, because I can not find any duplication of |
I can check back in later today, but are you sure you merged in master from
angularsen repo and not your own fork/repo's master?
`git remote - v` to list remotes
`git branch - avv` to list all branches including remote branches
Assuming you cloned your own fork instead of the official repo you have to
add angularsen/UnitsNet as a remote then merge in changes from its master.
…On Mon, Oct 2, 2017, 12:06 Dmitriy Inozemtsev ***@***.***> wrote:
Hmm... I did merge from your master into mine and there was not any
conflicts. However AppVeyor build fails with errors like this:
GeneratedCode\UnitClasses\Energy.g.cs(159,23): error CS0102: The type
'Energy' already contains a definition for 'DecathermsEc'
[C:\projects\unitsnet\UnitsNet\UnitsNet.NetStandard10.csproj]
Which is quite odd, because I can not find any duplication of DecathermsEc
definition in Energy.g.cs. More than that, it builds perfectly on my
local box. Am I missing something here? @angularsen
<https://github.com/angularsen> could you please help me on this?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#291 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAwFaIxsxmS2tGpyzeCh0Ytfvd12nTsKks5soLWrgaJpZM4Ponte>
.
|
Yay! Everything is green now. @angularsen thank you so much for pointing at the problem :) |
Awesome, good job :-) |
This reverts commit 83aeaca.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found some issues after merging. I will revert the merge and you will have to create a new pull request with the update changes. Sorry for not catching this before merging.
@@ -28,8 +28,12 @@ public class EnergyTests : EnergyTestsBase | |||
|
|||
protected override double JoulesInOneJoule => 1; | |||
|
|||
protected override double KilobritishThermalUnitsInOneJoule => 9.4781339449889105832843629746176e-7; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I forgot to verify the latest units, I see a difference here with google (BTU, not kBTU): 9.47817...e-7
https://www.google.no/search?q=britishThermalUnitsInOneJoule&oq=britishThermalUnitsInOneJoule&aqs=chrome..69i57.224j0j7&sourceid=chrome&ie=UTF-8
|
||
protected override double HectolitersInOneCubicMeter => 1E1; | ||
|
||
protected override double ImperialGallonsInOneCubicMeter => 219.96924; | ||
|
||
protected override double ImperialOuncesInOneCubicMeter => 35195.07972; | ||
|
||
protected override double KilocubicFeetInOneCubicMeter => 3.531472e-2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait, is this really a unit? Kilocubic feet? Sure this is not just 1000 cubicfeet? I can't find kilocubic feet on google.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @angularsen This is a unit of measure, that used in this product https://portfoliomanager.energystar.gov/ and called kcf (thousand cubic feet)
And, yeah, it sounds weird for me too, but guys in the States seems to be absolutely in love with some strange units of measure. Take it or leave it - it's up to you of course.
|
||
protected override double HectolitersInOneCubicMeter => 1E1; | ||
|
||
protected override double ImperialGallonsInOneCubicMeter => 219.96924; | ||
|
||
protected override double ImperialOuncesInOneCubicMeter => 35195.07972; | ||
|
||
protected override double KilocubicFeetInOneCubicMeter => 3.531472e-2; | ||
protected override double KilocubicMetersInOneCubicMeter => 0.001; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same with kilocubic meters. Doesn't sound right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above
protected override double LitersInOneCubicMeter => 1E3; | ||
protected override double MegacubicFeetInOneCubicMeter => 3.531472e-5; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And the megacubic ones too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same here, they called it Kcm (Thousand Cubic meters)
protected override double LitersInOneCubicMeter => 1E3; | ||
protected override double MegacubicFeetInOneCubicMeter => 3.531472e-5; | ||
protected override double MegaimperialGallonsInOneCubicMeter => 2.1996924e-4; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do find megaimperial gallons though so this one should be OK, still sounds funny to me :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And that means mega US gallons probably also is OK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like in U.S. they call them KGal (thousand gallons) (US) and KGal (thousand gallons) (UK)