Skip to content

Commit 5564730

Browse files
Sigvess92Sigve Skagen
andauthored
Add Impulse quantity with relevant units (#1178)
* Add new Impulse quantity with relevant units * Add pound force second unit to impulse quantity Co-authored-by: Sigve Skagen <[email protected]>
1 parent 61db0e4 commit 5564730

File tree

16 files changed

+2981
-0
lines changed

16 files changed

+2981
-0
lines changed

Common/UnitDefinitions/Impulse.json

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
{
2+
"Name": "Impulse",
3+
"BaseUnit": "NewtonSecond",
4+
"XmlDocSummary": "In classical mechanics, impulse is the integral of a force, F, over the time interval, t, for which it acts. Impulse applied to an object produces an equivalent vector change in its linear momentum, also in the resultant direction.",
5+
"BaseDimensions": {
6+
"L": 1,
7+
"M": 1,
8+
"T": -1
9+
},
10+
"Units": [
11+
{
12+
"SingularName": "KilogramMeterPerSecond",
13+
"PluralName": "KilogramMetersPerSecond",
14+
"FromUnitToBaseFunc": "{x}",
15+
"FromBaseToUnitFunc": "{x}",
16+
"Localization": [
17+
{
18+
"Culture": "en-US",
19+
"Abbreviations": [ "kg·m/s" ]
20+
}
21+
]
22+
},
23+
{
24+
"SingularName": "NewtonSecond",
25+
"PluralName": "NewtonSeconds",
26+
"FromUnitToBaseFunc": "{x}",
27+
"FromBaseToUnitFunc": "{x}",
28+
"Prefixes": [ "Nano", "Micro", "Milli", "Centi", "Deci", "Deca", "Kilo", "Mega" ],
29+
"Localization": [
30+
{
31+
"Culture": "en-US",
32+
"Abbreviations": [ "N·s" ]
33+
}
34+
]
35+
},
36+
{
37+
"SingularName": "PoundFootPerSecond",
38+
"PluralName": "PoundFeetPerSecond",
39+
"FromUnitToBaseFunc": "{x} / 7.230657989877",
40+
"FromBaseToUnitFunc": "{x} * 7.230657989877",
41+
"Localization": [
42+
{
43+
"Culture": "en-US",
44+
"Abbreviations": [ "lb·ft/s" ]
45+
}
46+
]
47+
},
48+
{
49+
"SingularName": "PoundForceSecond",
50+
"PluralName": "PoundForceSeconds",
51+
"FromUnitToBaseFunc": "{x} / 0.2248089430997",
52+
"FromBaseToUnitFunc": "{x} * 0.2248089430997",
53+
"Localization": [
54+
{
55+
"Culture": "en-US",
56+
"Abbreviations": [ "lbf·s" ]
57+
}
58+
]
59+
},
60+
{
61+
"SingularName": "SlugFootPerSecond",
62+
"PluralName": "SlugFeetPerSecond",
63+
"FromUnitToBaseFunc": "{x} / 0.224735720691",
64+
"FromBaseToUnitFunc": "{x} * 0.224735720691",
65+
"Localization": [
66+
{
67+
"Culture": "en-US",
68+
"Abbreviations": [ "slug·ft/s" ]
69+
}
70+
]
71+
}
72+
]
73+
}

Common/UnitEnumValues.g.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1672,5 +1672,20 @@
16721672
"TerajoulePerCubicMeter": 10,
16731673
"TerawattHourPerCubicMeter": 12,
16741674
"WattHourPerCubicMeter": 14
1675+
},
1676+
"Impulse": {
1677+
"CentinewtonSecond": 10,
1678+
"DecanewtonSecond": 9,
1679+
"DecinewtonSecond": 6,
1680+
"KilogramMeterPerSecond": 1,
1681+
"KilonewtonSecond": 7,
1682+
"MeganewtonSecond": 4,
1683+
"MicronewtonSecond": 8,
1684+
"MillinewtonSecond": 3,
1685+
"NanonewtonSecond": 2,
1686+
"NewtonSecond": 5,
1687+
"PoundFootPerSecond": 16,
1688+
"SlugFootPerSecond": 11,
1689+
"PoundForceSecond": 18
16751690
}
16761691
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup Label="Globals">
4+
<NanoFrameworkProjectSystemPath>$(MSBuildExtensionsPath)\nanoFramework\v1.0\</NanoFrameworkProjectSystemPath>
5+
</PropertyGroup>
6+
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.Default.props" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.Default.props')" />
7+
<PropertyGroup>
8+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
9+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
10+
<ProjectTypeGuids>{11A8DD76-328B-46DF-9F39-F559912D0360};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
11+
<ProjectGuid>{d8d4e4e8-1dc8-0170-5e3c-18610853bd87}</ProjectGuid>
12+
<OutputType>Library</OutputType>
13+
<AppDesignerFolder>Properties</AppDesignerFolder>
14+
<FileAlignment>512</FileAlignment>
15+
<RootNamespace>UnitsNet</RootNamespace>
16+
<AssemblyName>UnitsNet.Impulse</AssemblyName>
17+
<TargetFrameworkVersion>v1.0</TargetFrameworkVersion>
18+
<DocumentationFile>bin\$(Configuration)\$(AssemblyName).xml</DocumentationFile>
19+
</PropertyGroup>
20+
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.props" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.props')" />
21+
<ItemGroup>
22+
<Compile Include="..\Quantities\Impulse.g.cs" />
23+
<Compile Include="..\Units\ImpulseUnit.g.cs" />
24+
<Compile Include="..\Properties\AssemblyInfo.cs" />
25+
</ItemGroup>
26+
<ItemGroup>
27+
<Reference Include="mscorlib, Version=1.14.3.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
28+
<HintPath>..\packages\nanoFramework.CoreLibrary.1.14.2\lib\mscorlib.dll</HintPath>
29+
<Private>True</Private>
30+
<SpecificVersion>True</SpecificVersion>
31+
</Reference>
32+
</ItemGroup>
33+
<ItemGroup>
34+
<None Include="packages.config" />
35+
</ItemGroup>
36+
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets')" />
37+
<ProjectExtensions>
38+
<ProjectCapabilities>
39+
<ProjectConfigurationsDeclaredAsItems />
40+
</ProjectCapabilities>
41+
</ProjectExtensions>
42+
</Project>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
3+
<metadata>
4+
<id>UnitsNet.nanoFramework.Impulse</id>
5+
<version>5.0.0-rc009</version>
6+
<title>Units.NET Impulse - nanoFramework</title>
7+
<authors>Andreas Gullberg Larsen,nanoFramework project contributors</authors>
8+
<owners>UnitsNet</owners>
9+
<license type="expression">MIT</license>
10+
<projectUrl>https://github.com/angularsen/UnitsNet</projectUrl>
11+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
12+
<description>Adds Impulse units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead.</description>
13+
<iconUrl>https://raw.githubusercontent.com/angularsen/UnitsNet/ce85185429be345d77eb2ce09c99d59cc9ab8aed/Docs/Images/logo-32.png</iconUrl>
14+
<releaseNotes>
15+
</releaseNotes>
16+
<copyright>Copyright 2013 Andreas Gullberg Larsen ([email protected]).</copyright>
17+
<language>en-US</language>
18+
<tags>nanoframework impulse unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable</tags>
19+
<dependencies>
20+
<dependency id="nanoFramework.CoreLibrary" version="1.14.2" />
21+
</dependencies>
22+
</metadata>
23+
<files>
24+
<file src="..\..\..\Artifacts\UnitsNet.NanoFramework\Impulse\UnitsNet.*" target="lib" />
25+
</files>
26+
</package>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="nanoFramework.CoreLibrary" version="1.14.2" targetFramework="netnanoframework10" />
4+
</packages>

0 commit comments

Comments
 (0)