diff --git a/ui-ngx/src/app/core/services/unit/definitions/charge.ts b/ui-ngx/src/app/core/services/unit/definitions/charge.ts index 933e821a6a..b06a0223d5 100644 --- a/ui-ngx/src/app/core/services/unit/definitions/charge.ts +++ b/ui-ngx/src/app/core/services/unit/definitions/charge.ts @@ -18,7 +18,7 @@ import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; export type ChargeUnits = ChargeMetricUnits; -export type ChargeMetricUnits = 'c' | 'mC' | 'μC' | 'nC' | 'pC'; +export type ChargeMetricUnits = 'c' | 'mC' | 'μC' | 'nC' | 'pC' | 'mAh' | 'Ah' | 'kAh'; const METRIC: TbMeasureUnits = { units: { @@ -47,6 +47,21 @@ const METRIC: TbMeasureUnits = { tags: ['charge', 'electricity', 'electrostatics', 'picocoulomb', 'pC'], to_anchor: 1e-12, }, + mAh: { + name: 'unit.milliampere-hour', + tags: ['electric current', 'current flow', 'electric charge', 'current capacity', 'flow of electricity', 'electrical flow', 'milliampere-hour', 'milliampere-hours', 'mAh'], + to_anchor: 3.6, + }, + Ah: { + name: 'unit.ampere-hours', + tags: ['electric current', 'current flow', 'electric charge', 'current capacity', 'flow of electricity', 'electrical flow', 'ampere', 'ampere-hours', 'Ah'], + to_anchor: 3600, + }, + kAh: { + name: 'unit.kiloampere-hours', + tags: ['electric current', 'current flow', 'electric charge', 'current capacity', 'flow of electricity', 'electrical flow', 'kiloampere-hours', 'kiloampere-hour', 'kAh'], + to_anchor: 3600000, + }, } }; diff --git a/ui-ngx/src/app/core/services/unit/definitions/electric-current.ts b/ui-ngx/src/app/core/services/unit/definitions/electric-current.ts index 72a21ccf7f..9025e71c15 100644 --- a/ui-ngx/src/app/core/services/unit/definitions/electric-current.ts +++ b/ui-ngx/src/app/core/services/unit/definitions/electric-current.ts @@ -18,7 +18,7 @@ import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; export type ElectricCurrentUnits = ElectricCurrentMetricalUnits; -export type ElectricCurrentMetricalUnits = 'A' | 'nA' | 'μA' | 'mA' | 'kA' | 'MA' | 'GA'; +export type ElectricCurrentMetricalUnits = 'A' | 'pA' | 'nA' | 'μA' | 'mA' | 'kA' | 'MA' | 'GA'; const METRIC: TbMeasureUnits = { units: { @@ -27,9 +27,14 @@ const METRIC: TbMeasureUnits = { tags: ['electric current', 'current flow', 'flow of electricity', 'electrical flow', 'ampere', 'amperes', 'amperage', 'A'], to_anchor: 1, }, + pA: { + name: 'unit.picoampere', + tags: ['current', 'amperes', 'picoampere', 'pA'], + to_anchor: 1e-12, + }, nA: { name: 'unit.nanoampere', - tags: ['electric current', 'nanoampere', 'nanoamperes', 'nA'], + tags: ['electric current', 'amperes', 'nanoampere', 'nA'], to_anchor: 1e-9, }, μA: { diff --git a/ui-ngx/src/app/core/services/unit/definitions/energy.ts b/ui-ngx/src/app/core/services/unit/definitions/energy.ts index 06ee394121..2f74091c10 100644 --- a/ui-ngx/src/app/core/services/unit/definitions/energy.ts +++ b/ui-ngx/src/app/core/services/unit/definitions/energy.ts @@ -33,7 +33,7 @@ export type EnergyMetricUnits = | 'GJ' | 'eV'; -export type EnergyImperialUnits = 'kcal' | 'cal' | 'Cal' | 'BTU' | 'ft·lb'; +export type EnergyImperialUnits = 'kcal' | 'cal' | 'Cal' | 'BTU' | 'ft·lb' | 'thm'; const METRIC: TbMeasureUnits = { ratio: 1 / 4.184, @@ -134,6 +134,11 @@ const IMPERIAL: TbMeasureUnits = { tags: ['energy', 'foot-pound', 'foot-pounds', 'ft·lb', 'ft⋅lbf'], to_anchor: 0.32404875717017, }, + thm: { + name: 'unit.therm', + tags: ['energy', 'natural gas consumption', 'BTU', 'therm', 'thm'], + to_anchor: 25219021.687207, + }, }, }; diff --git a/ui-ngx/src/app/core/services/unit/definitions/mass.ts b/ui-ngx/src/app/core/services/unit/definitions/mass.ts index 2a52a4c960..fbed798da3 100644 --- a/ui-ngx/src/app/core/services/unit/definitions/mass.ts +++ b/ui-ngx/src/app/core/services/unit/definitions/mass.ts @@ -18,7 +18,7 @@ import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; export type MassUnits = MassMetricUnits | MassImperialUnits; -export type MassMetricUnits = 'ng' | 'mcg' | 'mg' | 'g' | 'kg' | 't' | 'Da'; +export type MassMetricUnits = 'ng' | 'mcg' | 'mg' | 'g' | 'kg' | 't' | 'Da' | 'ct'; export type MassImperialUnits = 'oz' | 'lb' | 'st' | 'short tons' | 'gr' | 'dr' | 'qr' | 'cwt' | 'slug'; const METRIC: TbMeasureUnits = { @@ -47,7 +47,7 @@ const METRIC: TbMeasureUnits = { kg: { name: 'unit.kilogram', tags: ['mass', 'weight', 'heaviness', 'load', 'kilogram', 'kilograms', 'kg'], - to_anchor: 1000, // 1 kg = 1000 g + to_anchor: 1000, }, t: { name: 'unit.tonne', @@ -59,6 +59,11 @@ const METRIC: TbMeasureUnits = { tags: ['atomic mass unit', 'AMU', 'unified atomic mass unit', 'dalton', 'Da'], to_anchor: 1.66053906660e-24, }, + ct: { + name: 'unit.carat', + tags: ['gemstone', 'pearl', 'jewelry', 'carat', 'ct'], + to_anchor: 0.2, + }, }, }; diff --git a/ui-ngx/src/assets/locale/locale.constant-en_US.json b/ui-ngx/src/assets/locale/locale.constant-en_US.json index cebaf71745..3001671891 100644 --- a/ui-ngx/src/assets/locale/locale.constant-en_US.json +++ b/ui-ngx/src/assets/locale/locale.constant-en_US.json @@ -6059,11 +6059,8 @@ "barn": "Barn", "circular-inch": "Circular Inch", "milliampere-hour": "Milliampere-hour", - "milliampere-hour-tags": "electric current, current flow, electric charge, current capacity, flow of electricity, electrical flow, milliampere-hour, milliampere-hours, mAh", "ampere-hours": "Ampere-hours", - "ampere-hours-tags": "electric current, current flow, electric charge, current capacity, flow of electricity, electrical flow, ampere, ampere-hours, Ah", "kiloampere-hours": "Kiloampere-hours", - "kiloampere-hours-tags": "electric current, current flow, electric charge, current capacity, flow of electricity, electrical flow, kiloampere-hours, kiloampere-hour, kAh", "nanoampere": "Nanoampere", "microampere": "Microampere", "milliampere": "Milliampere", @@ -6072,19 +6069,12 @@ "megaampere": "Megaampere", "gigaampere": "Gigaampere", "microampere-per-square-centimeter": "Microampere per square centimeter", - "microampere-per-square-centimeter-tags": "Current density, microampere per square centimeter, µA/cm²", "ampere-per-square-meter": "Ampere per Square Meter", - "ampere-per-square-meter-tags": "current density, current per unit area, ampere per square meter, A/m²", "ampere-per-meter": "Ampere per Meter", - "ampere-per-meter-tags": "magnetic field strength, magnetic field intensity, ampere per meter, A/m", "oersted": "Oersted", - "oersted-tags": "magnetic field, oersted, Oe", "bohr-magneton": "Bohr Magneton", - "bohr-magneton-tags": "atomic physics, magnetic moment, bohr magneton, μB", "ampere-meter-squared": "Ampere-Meter Squared", - "ampere-meter-squared-tags": "magnetic moment, dipole moment, ampere-meter squared, A·m²", "ampere-meter": "Ampere-Meter", - "ampere-meter-tags": "magnetic field, current loop, ampere-meter, A·m", "nanovolt": "Nanovolt", "picovolt": "Picovolt", "millivolt": "Millivolts",