Browse Source

UI: Updated unit definition

pull/13282/head
Vladyslav_Prykhodko 1 year ago
parent
commit
43488081fc
  1. 157
      ui-ngx/src/app/shared/models/unit.models.ts
  2. 37
      ui-ngx/src/app/shared/models/units/Magnetic-permeability.ts
  3. 8
      ui-ngx/src/app/shared/models/units/acceleration.ts
  4. 18
      ui-ngx/src/app/shared/models/units/air-quality-index.ts
  5. 32
      ui-ngx/src/app/shared/models/units/amount-of-substance.ts
  6. 20
      ui-ngx/src/app/shared/models/units/angle.ts
  7. 4
      ui-ngx/src/app/shared/models/units/angular-acceleration.ts
  8. 26
      ui-ngx/src/app/shared/models/units/area.ts
  9. 20
      ui-ngx/src/app/shared/models/units/blood-glucose.ts
  10. 34
      ui-ngx/src/app/shared/models/units/capacitance.ts
  11. 24
      ui-ngx/src/app/shared/models/units/catalytic-activity.ts
  12. 35
      ui-ngx/src/app/shared/models/units/catalytic-concentration.ts
  13. 16
      ui-ngx/src/app/shared/models/units/charge.ts
  14. 40
      ui-ngx/src/app/shared/models/units/concentration-gradient.ts
  15. 63
      ui-ngx/src/app/shared/models/units/concentration-volume.ts
  16. 26
      ui-ngx/src/app/shared/models/units/current-density.ts
  17. 25
      ui-ngx/src/app/shared/models/units/data-transfer-rate.ts
  18. 62
      ui-ngx/src/app/shared/models/units/density.ts
  19. 26
      ui-ngx/src/app/shared/models/units/digital.ts
  20. 35
      ui-ngx/src/app/shared/models/units/dimension-ratio.ts
  21. 21
      ui-ngx/src/app/shared/models/units/dimensionless-ratio.ts
  22. 30
      ui-ngx/src/app/shared/models/units/dynamic-viscosity.ts
  23. 18
      ui-ngx/src/app/shared/models/units/earthquake-magnitude.ts
  24. 22
      ui-ngx/src/app/shared/models/units/electric-current.ts
  25. 39
      ui-ngx/src/app/shared/models/units/electric-dipole-moment.ts
  26. 19
      ui-ngx/src/app/shared/models/units/electric-field-strength.ts
  27. 28
      ui-ngx/src/app/shared/models/units/electric-flux.ts
  28. 26
      ui-ngx/src/app/shared/models/units/electric-moment.ts
  29. 23
      ui-ngx/src/app/shared/models/units/electric-permittivity.ts
  30. 22
      ui-ngx/src/app/shared/models/units/electrical-conductance.ts
  31. 27
      ui-ngx/src/app/shared/models/units/electrical-conductivity.ts
  32. 26
      ui-ngx/src/app/shared/models/units/energy.ts
  33. 9
      ui-ngx/src/app/shared/models/units/force.ts
  34. 25
      ui-ngx/src/app/shared/models/units/frequency.ts
  35. 20
      ui-ngx/src/app/shared/models/units/fuel-efficiency.ts
  36. 26
      ui-ngx/src/app/shared/models/units/heat-capacity.ts
  37. 20
      ui-ngx/src/app/shared/models/units/humidity.ts
  38. 8
      ui-ngx/src/app/shared/models/units/illuminance.ts
  39. 16
      ui-ngx/src/app/shared/models/units/inductance.ts
  40. 26
      ui-ngx/src/app/shared/models/units/kinematic-viscosity.ts
  41. 50
      ui-ngx/src/app/shared/models/units/length.ts
  42. 24
      ui-ngx/src/app/shared/models/units/light-exposure.ts
  43. 24
      ui-ngx/src/app/shared/models/units/liner-charge-density.ts
  44. 45
      ui-ngx/src/app/shared/models/units/logarithmic-ratio.ts
  45. 29
      ui-ngx/src/app/shared/models/units/logarithmic-units.ts
  46. 24
      ui-ngx/src/app/shared/models/units/luminous-efficacy.ts
  47. 24
      ui-ngx/src/app/shared/models/units/luminous-flux.ts
  48. 24
      ui-ngx/src/app/shared/models/units/luminous-intensity.ts
  49. 23
      ui-ngx/src/app/shared/models/units/magnetic-field-gradient.ts
  50. 71
      ui-ngx/src/app/shared/models/units/magnetic-field.ts
  51. 84
      ui-ngx/src/app/shared/models/units/magnetic-flux-density.ts
  52. 31
      ui-ngx/src/app/shared/models/units/magnetic-flux.ts
  53. 28
      ui-ngx/src/app/shared/models/units/magnetic-moment.ts
  54. 40
      ui-ngx/src/app/shared/models/units/magnetic-permeability.ts
  55. 35
      ui-ngx/src/app/shared/models/units/mass-fraction.ts
  56. 32
      ui-ngx/src/app/shared/models/units/mass.ts
  57. 35
      ui-ngx/src/app/shared/models/units/molar-concentration.ts
  58. 23
      ui-ngx/src/app/shared/models/units/molar-energy.ts
  59. 23
      ui-ngx/src/app/shared/models/units/molar-heat-capacity.ts
  60. 19
      ui-ngx/src/app/shared/models/units/molar-mass.ts
  61. 35
      ui-ngx/src/app/shared/models/units/specific-humidity.ts
  62. 36
      ui-ngx/src/assets/locale/locale.constant-en_US.json

157
ui-ngx/src/app/shared/models/unit.models.ts

@ -15,21 +15,59 @@
/// ///
import acceleration, { AccelerationUnits } from '@shared/models/units/acceleration'; import acceleration, { AccelerationUnits } from '@shared/models/units/acceleration';
import airQualityIndex, { AirQualityIndexUnits } from '@shared/models/units/air-quality-index';
import amountOfSubstance, { AmountOfSubstanceUnits } from '@shared/models/units/amount-of-substance';
import angle, { AngleUnits } from '@shared/models/units/angle'; import angle, { AngleUnits } from '@shared/models/units/angle';
import angularAcceleration, { AngularAccelerationUnits } from '@shared/models/units/angular-acceleration'; import angularAcceleration, { AngularAccelerationUnits } from '@shared/models/units/angular-acceleration';
import area, { AreaUnits } from '@shared/models/units/area'; import area, { AreaUnits } from '@shared/models/units/area';
import capacitance, { CapacitanceUnits } from '@shared/models/units/capacitance';
import catalyticActivity, { CatalyticActivityUnits } from '@shared/models/units/catalytic-activity';
import catalyticConcentration, { CatalyticConcentrationUnits } from '@shared/models/units/catalytic-concentration';
import charge, { ChargeUnits } from '@shared/models/units/charge'; import charge, { ChargeUnits } from '@shared/models/units/charge';
import currentDensity, { CurrentDensityUnits } from '@shared/models/units/current-density';
import dataTransferRate, { DataTransferRateUnits } from '@shared/models/units/data-transfer-rate';
import density, { DensityUnits } from '@shared/models/units/density';
import digital, { DigitalUnits } from '@shared/models/units/digital'; import digital, { DigitalUnits } from '@shared/models/units/digital';
import dimensionRatio, { DimensionRatioUnits } from '@shared/models/units/dimension-ratio';
import dynamicViscosity, { DynamicViscosityUnits } from '@shared/models/units/dynamic-viscosity';
import earthquakeMagnitude, { EarthquakeMagnitudeUnits } from '@shared/models/units/earthquake-magnitude';
import electricCurrent, { ElectricCurrentUnits } from '@shared/models/units/electric-current'; import electricCurrent, { ElectricCurrentUnits } from '@shared/models/units/electric-current';
import electricDipoleMoment, { ElectricDipoleMomentUnits } from '@shared/models/units/electric-dipole-moment';
import electricFieldStrength, { ElectricFieldStrengthUnits } from '@shared/models/units/electric-field-strength';
import electricFlux, { ElectricFluxUnits } from '@shared/models/units/electric-flux';
import electricPermittivity, { ElectricPermittivityUnits } from '@shared/models/units/electric-permittivity';
import electricalConductance, { ElectricalConductanceUnits } from '@shared/models/units/electrical-conductance';
import electricalConductivity, { ElectricalConductivityUnits } from '@shared/models/units/electrical-conductivity';
import energy, { EnergyUnits } from '@shared/models/units/energy'; import energy, { EnergyUnits } from '@shared/models/units/energy';
import force, { ForceUnits } from '@shared/models/units/force'; import force, { ForceUnits } from '@shared/models/units/force';
import fuelEfficiency, { FuelEfficiencyUnits } from '@shared/models/units/fuel-efficiency';
import frequency, { FrequencyUnits } from '@shared/models/units/frequency'; import frequency, { FrequencyUnits } from '@shared/models/units/frequency';
import heatCapacity, { HeatCapacityUnits } from '@shared/models/units/heat-capacity';
import illuminance, { IlluminanceUnits } from '@shared/models/units/illuminance'; import illuminance, { IlluminanceUnits } from '@shared/models/units/illuminance';
import inductance, { InductanceUnits } from '@shared/models/units/inductance';
import kinematicViscosity, { KinematicViscosityUnits } from '@shared/models/units/kinematic-viscosity';
import length, { LengthUnits } from '@shared/models/units/length'; import length, { LengthUnits } from '@shared/models/units/length';
import lightExposure, { LightExposureUnits } from '@shared/models/units/light-exposure';
import linerChargeDensity, { LinerChargeDensityUnits } from '@shared/models/units/liner-charge-density';
import logarithmicRatio, { LogarithmicRatioUnits } from '@shared/models/units/logarithmic-ratio';
import luminousEfficacy, { LuminousEfficacyUnits } from '@shared/models/units/luminous-efficacy';
import luminousFlux, { LuminousFluxUnits } from '@shared/models/units/luminous-flux';
import luminousIntensity, { LuminousIntensityUnits } from '@shared/models/units/luminous-intensity';
import magneticFieldGradient, { MagneticFieldGradientUnits } from '@shared/models/units/magnetic-field-gradient';
import magneticFlux, { MagneticFluxUnits } from '@shared/models/units/magnetic-flux';
import magneticFluxDensity, { MagneticFluxDensityUnits } from '@shared/models/units/magnetic-flux-density';
import magneticMoment, { MagneticMomentUnits } from '@shared/models/units/magnetic-moment';
import magneticPermeability, { MagneticPermeabilityUnits } from '@shared/models/units/magnetic-permeability';
import mass, { MassUnits } from '@shared/models/units/mass'; import mass, { MassUnits } from '@shared/models/units/mass';
import massFraction, { MassFractionUnits } from '@shared/models/units/mass-fraction';
import molarConcentration, { MolarConcentrationUnits } from '@shared/models/units/molar-concentration';
import molarEnergy, { MolarEnergyUnits } from '@shared/models/units/molar-energy';
import molarHeatCapacity, { MolarHeatCapacityUnits } from '@shared/models/units/molar-heat-capacity';
import molarMass, { MolarMassUnits } from '@shared/models/units/molar-mass';
import partsPer, { PartsPerUnits } from '@shared/models/units/parts-per'; import partsPer, { PartsPerUnits } from '@shared/models/units/parts-per';
import power, { PowerUnits } from '@shared/models/units/power'; import power, { PowerUnits } from '@shared/models/units/power';
import pressure, { PressureUnits } from '@shared/models/units/pressure'; import pressure, { PressureUnits } from '@shared/models/units/pressure';
import specificHumidity, { SpecificHumidityUnits } from '@shared/models/units/specific-humidity';
import speed, { SpeedUnits } from '@shared/models/units/speed'; import speed, { SpeedUnits } from '@shared/models/units/speed';
import temperature, { TemperatureUnits } from '@shared/models/units/temperature'; import temperature, { TemperatureUnits } from '@shared/models/units/temperature';
import time, { TimeUnits } from '@shared/models/units/time'; import time, { TimeUnits } from '@shared/models/units/time';
@ -41,21 +79,59 @@ import { TranslateService } from '@ngx-translate/core';
export type AllMeasuresUnits = export type AllMeasuresUnits =
| AccelerationUnits | AccelerationUnits
| AirQualityIndexUnits
| AmountOfSubstanceUnits
| AngleUnits | AngleUnits
| AngularAccelerationUnits | AngularAccelerationUnits
| AreaUnits | AreaUnits
| CapacitanceUnits
| CatalyticActivityUnits
| CatalyticConcentrationUnits
| ChargeUnits | ChargeUnits
| CurrentDensityUnits
| DataTransferRateUnits
| DensityUnits
| DigitalUnits | DigitalUnits
| DimensionRatioUnits
| DynamicViscosityUnits
| EarthquakeMagnitudeUnits
| ElectricCurrentUnits | ElectricCurrentUnits
| ElectricDipoleMomentUnits
| ElectricFieldStrengthUnits
| ElectricFluxUnits
| ElectricPermittivityUnits
| ElectricalConductanceUnits
| ElectricalConductivityUnits
| EnergyUnits | EnergyUnits
| ForceUnits | ForceUnits
| FrequencyUnits | FrequencyUnits
| FuelEfficiencyUnits
| HeatCapacityUnits
| IlluminanceUnits | IlluminanceUnits
| InductanceUnits
| KinematicViscosityUnits
| LengthUnits | LengthUnits
| LightExposureUnits
| LinerChargeDensityUnits
| LogarithmicRatioUnits
| LuminousEfficacyUnits
| LuminousFluxUnits
| LuminousIntensityUnits
| MagneticFieldGradientUnits
| MagneticFluxUnits
| MagneticFluxDensityUnits
| MagneticMomentUnits
| MagneticPermeabilityUnits
| MassUnits | MassUnits
| MassFractionUnits
| MolarConcentrationUnits
| MolarEnergyUnits
| MolarHeatCapacityUnits
| MolarMassUnits
| PartsPerUnits | PartsPerUnits
| PowerUnits | PowerUnits
| PressureUnits | PressureUnits
| SpecificHumidityUnits
| SpeedUnits | SpeedUnits
| TemperatureUnits | TemperatureUnits
| TimeUnits | TimeUnits
@ -66,21 +142,59 @@ export type AllMeasuresUnits =
export type AllMeasures = export type AllMeasures =
| 'acceleration' | 'acceleration'
| 'air-quality-index'
| 'amount-of-substance'
| 'angle' | 'angle'
| 'angular-acceleration' | 'angular-acceleration'
| 'area' | 'area'
| 'capacitance'
| 'catalytic-activity'
| 'catalytic-concentration'
| 'charge' | 'charge'
| 'current-density'
| 'data-transfer-rate'
| 'density'
| 'digital' | 'digital'
| 'dimension-ratio'
| 'dynamic-viscosity'
| 'earthquake-magnitude'
| 'electric-current' | 'electric-current'
| 'electric-dipole-moment'
| 'electric-field-strength'
| 'electric-flux'
| 'electric-permittivity'
| 'electrical-conductance'
| 'electrical-conductivity'
| 'energy' | 'energy'
| 'force' | 'force'
| 'frequency' | 'frequency'
| 'fuel-efficiency'
| 'heat-capacity'
| 'illuminance' | 'illuminance'
| 'inductance'
| 'kinematic-viscosity'
| 'length' | 'length'
| 'light-exposure'
| 'linear-charge-density'
| 'logarithmic-ratio'
| 'luminous-efficacy'
| 'luminous-flux'
| 'luminous-intensity'
| 'magnetic-field-gradient'
| 'magnetic-flux'
| 'magnetic-flux-density'
| 'magnetic-moment'
| 'magnetic-permeability'
| 'mass' | 'mass'
| 'mass-fraction'
| 'molar-concentration'
| 'molar-energy'
| 'molar-heat-capacity'
| 'molar-mass'
| 'parts-per' | 'parts-per'
| 'power' | 'power'
| 'pressure' | 'pressure'
| 'specific-humidity'
| 'speed' | 'speed'
| 'temperature' | 'temperature'
| 'time' | 'time'
@ -94,21 +208,59 @@ const allMeasures: Record<
TbMeasure<AllMeasuresUnits> TbMeasure<AllMeasuresUnits>
> = Object.freeze({ > = Object.freeze({
acceleration, acceleration,
'air-quality-index': airQualityIndex,
'amount-of-substance': amountOfSubstance,
angle, angle,
'angular-acceleration': angularAcceleration, 'angular-acceleration': angularAcceleration,
area, area,
capacitance,
'catalytic-activity': catalyticActivity,
'catalytic-concentration': catalyticConcentration,
charge, charge,
'current-density': currentDensity,
'data-transfer-rate': dataTransferRate,
density,
digital, digital,
'dimension-ratio': dimensionRatio,
'dynamic-viscosity': dynamicViscosity,
'earthquake-magnitude': earthquakeMagnitude,
'electric-current': electricCurrent, 'electric-current': electricCurrent,
'electric-dipole-moment': electricDipoleMoment,
'electric-field-strength': electricFieldStrength,
'electric-flux': electricFlux,
'electric-permittivity': electricPermittivity,
'electrical-conductance': electricalConductance,
'electrical-conductivity': electricalConductivity,
energy, energy,
force, force,
frequency, frequency,
'fuel-efficiency': fuelEfficiency,
'heat-capacity': heatCapacity,
illuminance, illuminance,
inductance,
'kinematic-viscosity': kinematicViscosity,
length, length,
'light-exposure': lightExposure,
'linear-charge-density': linerChargeDensity,
'logarithmic-ratio': logarithmicRatio,
'luminous-efficacy': luminousEfficacy,
'luminous-flux': luminousFlux,
'luminous-intensity': luminousIntensity,
'magnetic-field-gradient': magneticFieldGradient,
'magnetic-flux': magneticFlux,
'magnetic-flux-density': magneticFluxDensity,
'magnetic-moment': magneticMoment,
'magnetic-permeability': magneticPermeability,
mass, mass,
'mass-fraction': massFraction,
'molar-concentration': molarConcentration,
'molar-energy': molarEnergy,
'molar-heat-capacity': molarHeatCapacity,
'molar-mass': molarMass,
'parts-per': partsPer, 'parts-per': partsPer,
power, power,
pressure, pressure,
'specific-humidity': specificHumidity,
speed, speed,
temperature, temperature,
time, time,
@ -143,7 +295,7 @@ export const UnitSystems = Object.values(UnitSystem);
export interface Unit { export interface Unit {
name: string; name: string;
tags: string[]; tags?: string[];
to_anchor: number; to_anchor: number;
anchor_shift?: number; anchor_shift?: number;
transform?: (value: number) => number; transform?: (value: number) => number;
@ -407,6 +559,9 @@ function buildUnitCache(measures: Record<AllMeasures, TbMeasure<AllMeasuresUnits
AllMeasuresUnits AllMeasuresUnits
>[]) { >[]) {
unit.name = translate.instant(unit.name); unit.name = translate.instant(unit.name);
const measureNameTranslation = translate.instant('unit.measures.' + measureName);
unit.tags = unit.tags ?? [];
unit.tags.push(testAbbr, unit.name, measureNameTranslation);
unitCache.set(testAbbr, { unitCache.set(testAbbr, {
measure: measureName, measure: measureName,
system: systemName, system: systemName,

37
ui-ngx/src/app/shared/models/units/Magnetic-permeability.ts

@ -1,37 +0,0 @@
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type MagneticPermeabilityMetricUnits = 'H/m';
export type MagneticPermeabilityImperialUnits = 'G/Oe';
export type MagneticPermeabilityUnits =
| MagneticPermeabilityMetricUnits
| MagneticPermeabilityImperialUnits;
const METRIC: TbMeasureUnits<MagneticPermeabilityMetricUnits> = {
transform: (Hm) => Hm * 795774.715,
units: {
'H/m': {
name: 'unit.henry-per-meter',
tags: ['magnetic permeability', 'henry per meter', 'H/m'],
to_anchor: 1,
},
},
};
const IMPERIAL: TbMeasureUnits<MagneticPermeabilityImperialUnits> = {
transform: (GOe) => GOe / 795774.715,
units: {
'G/Oe': {
name: 'unit.gauss-per-oersted',
tags: ['magnetic field', 'Gauss per Oersted', 'G/Oe'],
to_anchor: 1,
},
},
};
const measure: TbMeasure<MagneticPermeabilityUnits> = {
METRIC,
IMPERIAL,
};
export default measure;

8
ui-ngx/src/app/shared/models/units/acceleration.ts

@ -26,22 +26,22 @@ const METRIC: TbMeasureUnits<AccelerationMetricUnits> = {
units: { units: {
'G': { 'G': {
name: 'unit.g-force', name: 'unit.g-force',
tags: ['acceleration', 'gravity', 'g-force', 'load', 'G'], tags: ['gravity', 'g-force', 'load'],
to_anchor: 9.80665, to_anchor: 9.80665,
}, },
'm/s²': { 'm/s²': {
name: 'unit.meters-per-second-squared', name: 'unit.meters-per-second-squared',
tags: ['peak', 'peak to peak', 'root mean square (RMS)', 'vibration', 'meters per second squared', 'm/s²'], tags: ['peak', 'peak to peak', 'root mean square (RMS)', 'vibration', 'meters per second squared'],
to_anchor: 1, to_anchor: 1,
}, },
'Gal': { 'Gal': {
name: 'unit.gal', name: 'unit.gal',
tags: ['acceleration', 'gravity', 'g-force', 'Gal'], tags: ['gravity', 'g-force'],
to_anchor: 1, to_anchor: 1,
}, },
'km/h²': { 'km/h²': {
name: 'unit.kilometer-per-hour-squared', name: 'unit.kilometer-per-hour-squared',
tags: ['acceleration', 'rate of change of velocity', 'kilometer per hour squared', 'km/h²'], tags: ['rate of change of velocity', 'kilometer per hour squared'],
to_anchor: 1 / 12960, to_anchor: 1 / 12960,
} }
} }

18
ui-ngx/src/app/shared/models/units/air-quality-index.ts

@ -1,3 +1,19 @@
///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type AirQualityIndexUnits = 'aqi'; export type AirQualityIndexUnits = 'aqi';
@ -6,7 +22,7 @@ const METRIC: TbMeasureUnits<AirQualityIndexUnits> = {
units: { units: {
aqi: { aqi: {
name: 'unit.aqi', name: 'unit.aqi',
tags: ['AQI', 'air quality index'], tags: ['pollutant concentration'],
to_anchor: 1, to_anchor: 1,
}, },
}, },

32
ui-ngx/src/app/shared/models/units/amount-of-substance.ts

@ -1,34 +1,48 @@
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; ///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
export type AmountOfSubstanceMetricUnits = 'mol' | 'nmol' | 'μmol' | 'mmol' | 'kmol'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type AmountOfSubstanceUnits = AmountOfSubstanceMetricUnits; export type AmountOfSubstanceUnits = 'mol' | 'nmol' | 'μmol' | 'mmol' | 'kmol';
const METRIC: TbMeasureUnits<AmountOfSubstanceMetricUnits> = { const METRIC: TbMeasureUnits<AmountOfSubstanceUnits> = {
units: { units: {
'mol': { 'mol': {
name: 'unit.mole', name: 'unit.mole',
tags: ['amount of substance', 'chemical amount', 'mole', 'mol'], tags: ['chemical amount'],
to_anchor: 1, to_anchor: 1,
}, },
'nmol': { 'nmol': {
name: 'unit.nanomole', name: 'unit.nanomole',
tags: ['amount of substance', 'nanomole', 'nmol'], tags: ['chemical amount'],
to_anchor: 0.000000001, to_anchor: 0.000000001,
}, },
'μmol': { 'μmol': {
name: 'unit.micromole', name: 'unit.micromole',
tags: ['amount of substance', 'micromole', 'μmol'], tags: ['chemical amount'],
to_anchor: 0.000001, to_anchor: 0.000001,
}, },
'mmol': { 'mmol': {
name: 'unit.millimole', name: 'unit.millimole',
tags: ['amount of substance', 'millimole', 'mmol'], tags: ['chemical amount'],
to_anchor: 0.001, to_anchor: 0.001,
}, },
'kmol': { 'kmol': {
name: 'unit.kilomole', name: 'unit.kilomole',
tags: ['amount of substance', 'kilomole', 'kmol'], tags: ['chemical amount'],
to_anchor: 1000, to_anchor: 1000,
}, },
}, },

20
ui-ngx/src/app/shared/models/units/angle.ts

@ -16,45 +16,43 @@
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type AngleUnits = AngleMetricUnits; export type AngleUnits = 'rad' | 'deg' | 'grad' | 'arcmin' | 'arcsec' | 'mrad' | 'rev';
export type AngleMetricUnits = 'rad' | 'deg' | 'grad' | 'arcmin' | 'arcsec' | 'mrad' | 'rev'; const METRIC: TbMeasureUnits<AngleUnits> = {
const METRIC: TbMeasureUnits<AngleMetricUnits> = {
units: { units: {
rad: { rad: {
name: 'unit.rad', name: 'unit.rad',
tags: ['angle', 'radian', 'radians', 'rad'], tags: ['radians'],
to_anchor: 180 / Math.PI, to_anchor: 180 / Math.PI,
}, },
deg: { deg: {
name: 'unit.degree', name: 'unit.degree',
tags: ['angle', 'degree', 'degrees', 'deg'], tags: ['degrees'],
to_anchor: 1, to_anchor: 1,
}, },
grad: { grad: {
name: 'unit.gradian', name: 'unit.gradian',
tags: ['angle', 'gradian', 'grades', 'grad'], tags: ['grades'],
to_anchor: 9 / 10, to_anchor: 9 / 10,
}, },
arcmin: { arcmin: {
name: 'unit.arcminute', name: 'unit.arcminute',
tags: ['angle', 'arcminute', 'arcminutes', 'arcmin'], tags: ['arcminutes'],
to_anchor: 1 / 60 to_anchor: 1 / 60
}, },
arcsec: { arcsec: {
name: 'unit.arcsecond', name: 'unit.arcsecond',
tags: ['angle', 'arcsecond', 'arcseconds', 'arcsec'], tags: ['arcseconds'],
to_anchor: 1 / 3600 to_anchor: 1 / 3600
}, },
mrad: { mrad: {
name: 'unit.milliradian', name: 'unit.milliradian',
tags: ['angle', 'military angle', 'angular mil', 'mil'], tags: ['military angle', 'angular mil', 'mil'],
to_anchor: 9 / (50 * Math.PI), to_anchor: 9 / (50 * Math.PI),
}, },
rev: { rev: {
name: 'unit.revolution', name: 'unit.revolution',
tags: ['angle', 'revolution', 'full circle', 'complete turn', 'rev'], tags: ['full circle', 'complete turn'],
to_anchor: 360, to_anchor: 360,
}, },
} }

4
ui-ngx/src/app/shared/models/units/angular-acceleration.ts

@ -26,7 +26,7 @@ const METRIC: TbMeasureUnits<AngularAccelerationMetricUnits> = {
units: { units: {
'rad/s²': { 'rad/s²': {
name: 'unit.radian-per-second-squared', name: 'unit.radian-per-second-squared',
tags: ['angular acceleration', 'rotation rate of change', 'rad/s²'], tags: ['rotation rate of change'],
to_anchor: 1, to_anchor: 1,
} }
} }
@ -37,7 +37,7 @@ const IMPERIAL: TbMeasureUnits<AngularAccelerationImperialUnits> = {
units: { units: {
'rpm/s': { 'rpm/s': {
name: 'unit.revolutions-per-minute-per-second', name: 'unit.revolutions-per-minute-per-second',
tags: ['angular acceleration', 'rotation rate of change', 'rpm/s'], tags: ['rotation rate of change'],
to_anchor: 1 to_anchor: 1
} }
} }

26
ui-ngx/src/app/shared/models/units/area.ts

@ -26,37 +26,37 @@ const METRIC: TbMeasureUnits<AreaMetricUnits> = {
units: { units: {
'mm²': { 'mm²': {
name: 'unit.square-millimeter', name: 'unit.square-millimeter',
tags: ['area','lot','zone','space','region','square millimeter','square millimeters','mm²','sq-mm'], tags: ['lot', 'zone', 'space', 'region', 'square millimeters', 'sq-mm'],
to_anchor: 1 / 1000000, to_anchor: 1 / 1000000,
}, },
'cm²': { 'cm²': {
name: 'unit.square-centimeter', name: 'unit.square-centimeter',
tags: ['area','lot','zone','space','region','square centimeter','square centimeters','cm²','sq-cm'], tags: ['lot', 'zone', 'space', 'region', 'square centimeters', 'sq-cm'],
to_anchor: 1 / 10000, to_anchor: 1 / 10000,
}, },
'm²': { 'm²': {
name: 'unit.square-meter', name: 'unit.square-meter',
tags: ['area','lot','zone','space','region','square meter','square meters','m²','sq-m'], tags: ['lot', 'zone', 'space', 'region', 'square meters', 'sq-m'],
to_anchor: 1, to_anchor: 1,
}, },
a: { a: {
name: 'unit.are', name: 'unit.are',
tags: ['area','land measurement','are'], tags: ['land measurement'],
to_anchor: 100, to_anchor: 100,
}, },
ha: { ha: {
name: 'unit.hectare', name: 'unit.hectare',
tags: ['area','lot','zone','space','region','hectare','hectares','ha'], tags: ['lot', 'zone', 'space', 'region', 'hectares'],
to_anchor: 10000, to_anchor: 10000,
}, },
'km²': { 'km²': {
name: 'unit.square-kilometer', name: 'unit.square-kilometer',
tags: ['area','lot','zone','space','region','square kilometer','square kilometers','km²','sq-km'], tags: ['lot', 'zone', 'space', 'region', 'square kilometers', 'sq-km'],
to_anchor: 1000000, to_anchor: 1000000,
}, },
barn: { barn: {
name: 'unit.barn', name: 'unit.barn',
tags: ['cross-sectional area', 'particle physics', 'nuclear physics', 'barn'], tags: ['cross-sectional area', 'particle physics', 'nuclear physics'],
to_anchor: 1e-28, to_anchor: 1e-28,
}, },
} }
@ -67,32 +67,32 @@ const IMPERIAL: TbMeasureUnits<AreaImperialUnits> = {
units: { units: {
'in²': { 'in²': {
name: 'unit.square-inch', name: 'unit.square-inch',
tags: ['area','lot','zone','space','region','square inch','square inches','in²','sq-in'], tags: ['lot', 'zone', 'space', 'region', 'square inches', 'sq-in'],
to_anchor: 1 / 144, to_anchor: 1 / 144,
}, },
'yd²': { 'yd²': {
name: 'unit.square-yard', name: 'unit.square-yard',
tags: ['area','lot','zone','space','region','square yard','square yards','yd²','sq-yd'], tags: ['lot', 'zone', 'space', 'region', 'square yards', 'sq-yd'],
to_anchor: 9, to_anchor: 9,
}, },
'ft²': { 'ft²': {
name: 'unit.square-foot', name: 'unit.square-foot',
tags: ['area','lot','zone','space','region','square foot','square feet','ft²','sq-ft'], tags: ['lot', 'zone', 'space', 'region', 'square feet', 'sq-ft'],
to_anchor: 1, to_anchor: 1,
}, },
ac: { ac: {
name: 'unit.acre', name: 'unit.acre',
tags: ['area','lot','zone','space','region','acre','acres','a'], tags: ['lot', 'zone', 'space', 'region', 'acres', 'a'],
to_anchor: 43560, to_anchor: 43560,
}, },
'ml²': { 'ml²': {
name: 'unit.square-mile', name: 'unit.square-mile',
tags: ['area','lot','zone','space','region','square mile','square miles','ml²','sq-mi'], tags: ['lot', 'zone', 'space', 'region', 'square mile', 'sq-mi'],
to_anchor: 27878400, to_anchor: 27878400,
}, },
cin: { cin: {
name: 'unit.circular-inch', name: 'unit.circular-inch',
tags: ['area','circular measurement','circular inch','circin'], tags: ['circular measurement', 'circin'],
to_anchor: Math.PI / 576 to_anchor: Math.PI / 576
} }
} }

20
ui-ngx/src/app/shared/models/units/blood-glucose.ts

@ -1,20 +0,0 @@
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type BloodGlucoseUnits = BloodGlucoseMetricUnits;
export type BloodGlucoseMetricUnits = 'mg/dL';
const METRIC: TbMeasureUnits<BloodGlucoseMetricUnits> = {
units: {
'mg/dL': {
name: 'unit.milligrams-per-deciliter',
tags: ['glucose', 'blood sugar', 'glucose level', 'mg/dL'],
to_anchor: 1,
},
},
};
const measure: TbMeasure<BloodGlucoseUnits> = {
METRIC,
};
export default measure;

34
ui-ngx/src/app/shared/models/units/capacitance.ts

@ -1,3 +1,19 @@
///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type CapacitanceUnits = 'F' | 'mF' | 'μF' | 'nF' | 'pF' | 'kF' | 'MF' | 'GF' | 'TF'; export type CapacitanceUnits = 'F' | 'mF' | 'μF' | 'nF' | 'pF' | 'kF' | 'MF' | 'GF' | 'TF';
@ -6,47 +22,47 @@ const METRIC: TbMeasureUnits<CapacitanceUnits> = {
units: { units: {
'F': { 'F': {
name: 'unit.farad', name: 'unit.farad',
tags: ['electric capacitance', 'capacitance', 'farad', 'F'], tags: ['electric capacitance'],
to_anchor: 1, to_anchor: 1,
}, },
'mF': { 'mF': {
name: 'unit.millifarad', name: 'unit.millifarad',
tags: ['electric capacitance', 'capacitance', 'millifarad', 'mF'], tags: ['electric capacitance'],
to_anchor: 1e-3, to_anchor: 1e-3,
}, },
'μF': { 'μF': {
name: 'unit.microfarad', name: 'unit.microfarad',
tags: ['electric capacitance', 'capacitance', 'microfarad', 'μF'], tags: ['electric capacitance'],
to_anchor: 1e-6, to_anchor: 1e-6,
}, },
'nF': { 'nF': {
name: 'unit.nanofarad', name: 'unit.nanofarad',
tags: ['electric capacitance', 'capacitance', 'nanofarad', 'nF'], tags: ['electric capacitance'],
to_anchor: 1e-9, to_anchor: 1e-9,
}, },
'pF': { 'pF': {
name: 'unit.picofarad', name: 'unit.picofarad',
tags: ['electric capacitance', 'capacitance', 'picofarad', 'pF'], tags: ['electric capacitance'],
to_anchor: 1e-12, to_anchor: 1e-12,
}, },
'kF': { 'kF': {
name: 'unit.kilofarad', name: 'unit.kilofarad',
tags: ['electric capacitance', 'capacitance', 'kilofarad', 'kF'], tags: ['electric capacitance'],
to_anchor: 1e3, to_anchor: 1e3,
}, },
'MF': { 'MF': {
name: 'unit.megafarad', name: 'unit.megafarad',
tags: ['electric capacitance', 'capacitance', 'megafarad', 'MF'], tags: ['electric capacitance'],
to_anchor: 1e6, to_anchor: 1e6,
}, },
'GF': { 'GF': {
name: 'unit.gigafarad', name: 'unit.gigafarad',
tags: ['electric capacitance', 'capacitance', 'gigafarad', 'GF'], tags: ['electric capacitance'],
to_anchor: 1e9, to_anchor: 1e9,
}, },
'TF': { 'TF': {
name: 'unit.terafarad', name: 'unit.terafarad',
tags: ['electric capacitance', 'capacitance', 'terafarad', 'TF'], tags: ['electric capacitance'],
to_anchor: 1e12, to_anchor: 1e12,
}, },
}, },

24
ui-ngx/src/app/shared/models/units/catalytic-activity.ts

@ -1,18 +1,34 @@
///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type AirQualityIndexUnits = 'kat'; export type CatalyticActivityUnits = 'kat';
const METRIC: TbMeasureUnits<AirQualityIndexUnits> = { const METRIC: TbMeasureUnits<CatalyticActivityUnits> = {
units: { units: {
kat: { kat: {
name: 'unit.katal', name: 'unit.katal',
tags: ['catalytic activity', 'enzyme activity', 'kat'], tags: ['catalytic activity', 'enzyme activity'],
to_anchor: 1, to_anchor: 1,
}, },
}, },
}; };
const measure: TbMeasure<AirQualityIndexUnits> = { const measure: TbMeasure<CatalyticActivityUnits> = {
METRIC, METRIC,
}; };

35
ui-ngx/src/app/shared/models/units/catalytic-concentration.ts

@ -0,0 +1,35 @@
///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type CatalyticConcentrationUnits = 'kat/m³';
const METRIC: TbMeasureUnits<CatalyticConcentrationUnits> = {
units: {
'kat/m³': {
name: 'unit.katal-per-cubic-metre',
tags: ['enzyme concentration'],
to_anchor: 1,
}
},
};
const measure: TbMeasure<CatalyticConcentrationUnits> = {
METRIC,
};
export default measure;

16
ui-ngx/src/app/shared/models/units/charge.ts

@ -24,42 +24,42 @@ const METRIC: TbMeasureUnits<ChargeMetricUnits> = {
units: { units: {
c: { c: {
name: 'unit.coulomb', name: 'unit.coulomb',
tags: ['charge', 'electricity', 'electrostatics', 'Coulomb', 'C'], tags: ['electricity', 'electrostatics'],
to_anchor: 1, to_anchor: 1,
}, },
mC: { mC: {
name: 'unit.millicoulomb', name: 'unit.millicoulomb',
tags: ['charge', 'electricity', 'electrostatics', 'millicoulombs', 'mC'], tags: ['electricity', 'electrostatics'],
to_anchor: 1 / 1000, to_anchor: 1 / 1000,
}, },
μC: { μC: {
name: 'unit.microcoulomb', name: 'unit.microcoulomb',
tags: ['charge', 'electricity', 'electrostatics', 'microcoulomb', 'µC'], tags: [ 'electricity', 'electrostatics'],
to_anchor: 1 / 1000000, to_anchor: 1 / 1000000,
}, },
nC: { nC: {
name: 'unit.nanocoulomb', name: 'unit.nanocoulomb',
tags: ['charge', 'electricity', 'electrostatics', 'nanocoulomb', 'nC'], tags: ['electricity', 'electrostatics',],
to_anchor: 1e-9, to_anchor: 1e-9,
}, },
pC: { pC: {
name: 'unit.picocoulomb', name: 'unit.picocoulomb',
tags: ['charge', 'electricity', 'electrostatics', 'picocoulomb', 'pC'], tags: ['electricity', 'electrostatics'],
to_anchor: 1e-12, to_anchor: 1e-12,
}, },
mAh: { mAh: {
name: 'unit.milliampere-hour', name: 'unit.milliampere-hour',
tags: ['electric current', 'current flow', 'electric charge', 'current capacity', 'flow of electricity', 'electrical flow', 'milliampere-hour', 'milliampere-hours', 'mAh'], tags: ['electric current', 'current flow', 'electric charge', 'current capacity', 'flow of electricity', 'electrical flow', 'milliampere-hours'],
to_anchor: 3.6, to_anchor: 3.6,
}, },
Ah: { Ah: {
name: 'unit.ampere-hours', name: 'unit.ampere-hours',
tags: ['electric current', 'current flow', 'electric charge', 'current capacity', 'flow of electricity', 'electrical flow', 'ampere', 'ampere-hours', 'Ah'], tags: ['electric current', 'current flow', 'electric charge', 'current capacity', 'flow of electricity', 'electrical flow', 'ampere'],
to_anchor: 3600, to_anchor: 3600,
}, },
kAh: { kAh: {
name: 'unit.kiloampere-hours', name: 'unit.kiloampere-hours',
tags: ['electric current', 'current flow', 'electric charge', 'current capacity', 'flow of electricity', 'electrical flow', 'kiloampere-hours', 'kiloampere-hour', 'kAh'], tags: ['electric current', 'current flow', 'electric charge', 'current capacity', 'flow of electricity', 'electrical flow', 'kiloampere-hours'],
to_anchor: 3600000, to_anchor: 3600000,
}, },
} }

40
ui-ngx/src/app/shared/models/units/concentration-gradient.ts

@ -1,40 +0,0 @@
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type ConcentrationMetricUnits = 'mol/m³' | 'mg/mL' | 'mg/m³' | 'µg/m³' | 'particles/mL';
export type ConcentrationUnits = ConcentrationMetricUnits;
const METRIC: TbMeasureUnits<ConcentrationMetricUnits> = {
units: {
'mol/m³': {
name: 'unit.mole-per-cubic-meter',
tags: ['concentration', 'amount of substance per unit volume', 'mole per cubic meter', 'mol/m³'],
to_anchor: 1,
},
'mg/mL': {
name: 'unit.milligram-per-milliliter',
tags: ['concentration', 'mass per unit volume', 'milligram per milliliter', 'mg/mL'],
to_anchor: 1,
},
'mg/m³': {
name: 'unit.milligram-per-cubic-meter',
tags: ['concentration', 'mass per unit volume', 'milligram per cubic meter', 'mg/m³'],
to_anchor: 1,
},
'µg/m³': {
name: 'unit.micrograms-per-cubic-meter',
tags: ['concentration', 'air quality', 'particulate matter', 'PM2.5', 'PM10', 'micrograms per cubic meter', 'µg/m³'],
to_anchor: 1,
},
'particles/mL': {
name: 'unit.particle-density',
tags: ['concentration', 'particle density', 'particles per milliliter', 'particles/mL'],
to_anchor: 1,
},
},
};
const measure: TbMeasure<ConcentrationUnits> = {
METRIC,
};
export default measure;

63
ui-ngx/src/app/shared/models/units/concentration-volume.ts

@ -1,63 +0,0 @@
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type ConcentrationVolumeMetricUnits =
'mol/m³'
| 'µg/m³'
| 'mg/m³'
| 'g/m³'
| 'mg/L'
| 'mg/mL'
| 'kat/m³'
| '°Bx';
export type ConcentrationVolumeUnits = ConcentrationVolumeMetricUnits;
const METRIC: TbMeasureUnits<ConcentrationVolumeMetricUnits> = {
units: {
'mol/m³': {
name: 'unit.mole-per-cubic-meter',
tags: ['concentration', 'amount of substance', 'mole per cubic meter', 'mol/m³'],
to_anchor: 1,
},
'µg/m³': {
name: 'unit.micrograms-per-cubic-meter',
tags: ['coarse particulate matter', 'pm10', 'fine particulate matter', 'pm2.5', 'aqi', 'air quality', 'total volatile organic compounds', 'tvoc', 'micrograms per cubic meter', 'µg/m³'],
to_anchor: 1e-9,
},
'mg/m³': {
name: 'unit.milligram-per-cubic-meter',
tags: ['concentration', 'mass per volume', 'mg/m³'],
to_anchor: 1e-6,
},
'g/m³': {
name: 'unit.gram-per-cubic-meter',
tags: ['humidity', 'moisture', 'absolute humidity', 'g/m³'],
to_anchor: 1 / 1000,
},
'mg/L': {
name: 'unit.mg-per-liter',
tags: ['dissolved oxygen', 'water quality', 'mg/L'],
to_anchor: 1e-6,
},
'mg/mL': {
name: 'unit.milligram-per-milliliter',
tags: ['concentration', 'mass per volume', 'mg/mL'],
to_anchor: 1 / 1000,
},
'kat/m³': {
name: 'unit.katal-per-cubic-metre',
tags: ['catalytic activity concentration', 'enzyme concentration', 'kat/m³'],
to_anchor: 1,
},
'°Bx': {
name: 'unit.degrees-brix',
tags: ['sugar content', 'fruit ripeness', 'Bx'],
to_anchor: 10.04 * 1e-3,
},
},
};
const measure: TbMeasure<ConcentrationVolumeUnits> = {
METRIC,
};
export default measure;

26
ui-ngx/src/app/shared/models/units/current-density.ts

@ -1,19 +1,33 @@
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; ///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
export type CurrentDensityMetricUnits = 'µA/cm²' | 'A/m²'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type CurrentDensityUnits = CurrentDensityMetricUnits; export type CurrentDensityUnits = 'µA/cm²' | 'A/m²';
const METRIC: TbMeasureUnits<CurrentDensityMetricUnits> = { const METRIC: TbMeasureUnits<CurrentDensityUnits> = {
units: { units: {
'µA/cm²': { 'µA/cm²': {
name: 'unit.microampere-per-square-centimeter', name: 'unit.microampere-per-square-centimeter',
tags: ['current density', 'microampere per square centimeter', 'µA/cm²'], tags: ['current per unit area'],
to_anchor: 10000, to_anchor: 10000,
}, },
'A/m²': { 'A/m²': {
name: 'unit.ampere-per-square-meter', name: 'unit.ampere-per-square-meter',
tags: ['current density', 'current per unit area', 'ampere per square meter', 'A/m²'], tags: ['current per unit area'],
to_anchor: 1, to_anchor: 1,
}, },
}, },

25
ui-ngx/src/app/shared/models/units/data-transfer-rate.ts

@ -1,3 +1,19 @@
///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type DataTransferRateUnits = 'bps' | 'kbps' | 'Mbps' | 'Gbps' | 'Tbps' | 'B/s' | 'KB/s' | 'MB/s' | 'GB/s'; export type DataTransferRateUnits = 'bps' | 'kbps' | 'Mbps' | 'Gbps' | 'Tbps' | 'B/s' | 'KB/s' | 'MB/s' | 'GB/s';
@ -6,47 +22,38 @@ const METRIC: TbMeasureUnits<DataTransferRateUnits> = {
units: { units: {
'bps': { 'bps': {
name: 'unit.bit-per-second', name: 'unit.bit-per-second',
tags: ['data transfer rate', 'bps'],
to_anchor: 1, to_anchor: 1,
}, },
'kbps': { 'kbps': {
name: 'unit.kilobit-per-second', name: 'unit.kilobit-per-second',
tags: ['data transfer rate', 'kbps'],
to_anchor: 1e3, to_anchor: 1e3,
}, },
'Mbps': { 'Mbps': {
name: 'unit.megabit-per-second', name: 'unit.megabit-per-second',
tags: ['data transfer rate', 'Mbps'],
to_anchor: 1e6, to_anchor: 1e6,
}, },
'Gbps': { 'Gbps': {
name: 'unit.gigabit-per-second', name: 'unit.gigabit-per-second',
tags: ['data transfer rate', 'Gbps'],
to_anchor: 1e9, to_anchor: 1e9,
}, },
'Tbps': { 'Tbps': {
name: 'unit.terabit-per-second', name: 'unit.terabit-per-second',
tags: ['data transfer rate', 'Tbps'],
to_anchor: 1e12, to_anchor: 1e12,
}, },
'B/s': { 'B/s': {
name: 'unit.byte-per-second', name: 'unit.byte-per-second',
tags: ['data transfer rate', 'B/s'],
to_anchor: 8, to_anchor: 8,
}, },
'KB/s': { 'KB/s': {
name: 'unit.kilobyte-per-second', name: 'unit.kilobyte-per-second',
tags: ['data transfer rate', 'KB/s'],
to_anchor: 8e3, to_anchor: 8e3,
}, },
'MB/s': { 'MB/s': {
name: 'unit.megabyte-per-second', name: 'unit.megabyte-per-second',
tags: ['data transfer rate', 'MB/s'],
to_anchor: 8e6, to_anchor: 8e6,
}, },
'GB/s': { 'GB/s': {
name: 'unit.gigabyte-per-second', name: 'unit.gigabyte-per-second',
tags: ['data transfer rate', 'GB/s'],
to_anchor: 8e9, to_anchor: 8e9,
}, },
}, },

62
ui-ngx/src/app/shared/models/units/density.ts

@ -1,6 +1,22 @@
///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type DensityMetricUnits = 'kg/m³' | 'g/cm³'; export type DensityMetricUnits = 'kg/m³' | 'g/cm³' | 'mg/dL' | 'g/m³' | 'mg/mL' | 'mg/L' | 'mg/m³' | 'µg/m³';
export type DensityImperialUnits = 'lb/ft³' | 'oz/in³' | 'ton/yd³'; export type DensityImperialUnits = 'lb/ft³' | 'oz/in³' | 'ton/yd³';
export type DensityUnits = DensityMetricUnits | DensityImperialUnits; export type DensityUnits = DensityMetricUnits | DensityImperialUnits;
@ -10,13 +26,43 @@ const METRIC: TbMeasureUnits<DensityMetricUnits> = {
units: { units: {
'kg/m³': { 'kg/m³': {
name: 'unit.kilogram-per-cubic-meter', name: 'unit.kilogram-per-cubic-meter',
tags: ['density', 'mass per unit volume', 'kg/m³'], tags: ['mass per unit volume'],
to_anchor: 1, // Base unit: kg/m³ to_anchor: 1,
}, },
'g/cm³': { 'g/cm³': {
name: 'unit.gram-per-cubic-centimeter', name: 'unit.gram-per-cubic-centimeter',
tags: ['density', 'mass per unit volume', 'g/cm³'], tags: ['mass per unit volume'],
to_anchor: 1000, // 1 g/cm³ = 10³ kg/m³ to_anchor: 1000,
},
'mg/dL': {
name: 'unit.milligrams-per-deciliter',
tags: ['glucose', 'blood sugar', 'glucose level', 'concentration'],
to_anchor: 0.01,
},
'g/m³': {
name: 'unit.gram-per-cubic-meter',
tags: ['humidity', 'moisture', 'absolute humidity', 'concentration'],
to_anchor: 0.001,
},
'mg/L': {
name: 'unit.mg-per-liter',
tags: ['dissolved oxygen', 'water quality', 'mg/L', 'concentration'],
to_anchor: 0.001,
},
'mg/mL': {
name: 'unit.milligram-per-milliliter',
tags: ['mass per unit volume', 'concentration'],
to_anchor: 1,
},
'mg/m³': {
name: 'unit.milligram-per-cubic-meter',
tags: ['mass per unit volume', 'concentration'],
to_anchor: 1e-6,
},
'µg/m³': {
name: 'unit.micrograms-per-cubic-meter',
tags: ['coarse particulate matter', 'pm10', 'fine particulate matter', 'pm2.5', 'aqi', 'air quality', 'total volatile organic compounds', 'tvoc', 'concentration'],
to_anchor: 1e-9,
}, },
}, },
}; };
@ -26,17 +72,17 @@ const IMPERIAL: TbMeasureUnits<DensityImperialUnits> = {
units: { units: {
'lb/ft³': { 'lb/ft³': {
name: 'unit.pound-per-cubic-foot', name: 'unit.pound-per-cubic-foot',
tags: ['density', 'mass per unit volume', 'lb/ft³'], tags: ['mass per unit volume'],
to_anchor: 1, to_anchor: 1,
}, },
'oz/in³': { 'oz/in³': {
name: 'unit.ounces-per-cubic-inch', name: 'unit.ounces-per-cubic-inch',
tags: ['density', 'mass per unit volume', 'oz/in³'], tags: ['mass per unit volume'],
to_anchor: 1728, to_anchor: 1728,
}, },
'ton/yd³': { 'ton/yd³': {
name: 'unit.tons-per-cubic-yard', name: 'unit.tons-per-cubic-yard',
tags: ['density', 'mass per unit volume', 'ton/yd³'], tags: ['mass per unit volume'],
to_anchor: 74.074, to_anchor: 74.074,
}, },
}, },

26
ui-ngx/src/app/shared/models/units/digital.ts

@ -16,60 +16,58 @@
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type DigitalUnits = DigitalMetricUnits; export type DigitalUnits = 'bit' | 'B' | 'KB' | 'MB' | 'GB' | 'TB' | 'PB' | 'EB' | 'ZB' | 'YB';
export type DigitalMetricUnits = 'bit' | 'B' | 'KB' | 'MB' | 'GB' | 'TB' | 'PB' | 'EB' | 'ZB' | 'YB'; const METRIC: TbMeasureUnits<DigitalUnits> = {
const METRIC: TbMeasureUnits<DigitalMetricUnits> = {
units: { units: {
bit: { bit: {
name: 'unit.bit', name: 'unit.bit',
tags: ['data', 'binary digit', 'information', 'bit'], tags: ['data', 'binary digit', 'information'],
to_anchor: 1.25e-1, to_anchor: 1.25e-1,
}, },
B: { B: {
name: 'unit.byte', name: 'unit.byte',
tags: ['data', 'byte', 'information', 'storage', 'memory', 'B'], tags: ['data', 'information', 'storage', 'memory'],
to_anchor: 1 to_anchor: 1
}, },
KB: { KB: {
name: 'unit.kilobyte', name: 'unit.kilobyte',
tags: ['data', 'kilobyte', 'KB'], tags: ['data'],
to_anchor: 1024, to_anchor: 1024,
}, },
MB: { MB: {
name: 'unit.megabyte', name: 'unit.megabyte',
tags: ['data', 'megabyte', 'MB'], tags: ['data'],
to_anchor: 1024 ** 2, to_anchor: 1024 ** 2,
}, },
GB: { GB: {
name: 'unit.gigabyte', name: 'unit.gigabyte',
tags: ['data', 'gigabyte', 'GB'], tags: ['data'],
to_anchor: 1024 ** 3, to_anchor: 1024 ** 3,
}, },
TB: { TB: {
name: 'unit.terabyte', name: 'unit.terabyte',
tags: ['data', 'terabyte', 'TB'], tags: ['data'],
to_anchor: 1024 ** 4, to_anchor: 1024 ** 4,
}, },
PB: { PB: {
name: 'unit.petabyte', name: 'unit.petabyte',
tags: ['data', 'petabyte', 'PB'], tags: ['data'],
to_anchor: 1024 ** 5, to_anchor: 1024 ** 5,
}, },
EB: { EB: {
name: 'unit.exabyte', name: 'unit.exabyte',
tags: ['data', 'exabyte', 'EB'], tags: ['data'],
to_anchor: 1024 ** 6, to_anchor: 1024 ** 6,
}, },
ZB: { ZB: {
name: 'unit.zettabyte', name: 'unit.zettabyte',
tags: ['data', 'zettabyte', 'EB'], tags: ['data'],
to_anchor: 1024 ** 7, to_anchor: 1024 ** 7,
}, },
YB: { YB: {
name: 'unit.yottabyte', name: 'unit.yottabyte',
tags: ['data', 'yottabyte', 'EB'], tags: ['data'],
to_anchor: 1024 ** 8, to_anchor: 1024 ** 8,
}, },
} }

35
ui-ngx/src/app/shared/models/units/dimension-ratio.ts

@ -0,0 +1,35 @@
///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type DimensionRatioUnits = 'm/m';
const METRIC: TbMeasureUnits<DimensionRatioUnits> = {
units: {
'm/m': {
name: 'unit.meter-per-meter',
tags: ['ratio of length to length'],
to_anchor: 1,
},
},
};
const measure: TbMeasure<DimensionRatioUnits> = {
METRIC,
};
export default measure;

21
ui-ngx/src/app/shared/models/units/dimensionless-ratio.ts

@ -1,21 +0,0 @@
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type DimensionlessRatioMetricUnits = 'm/m';
export type DimensionRatioUnits = DimensionlessRatioMetricUnits;
const METRIC: TbMeasureUnits<DimensionlessRatioMetricUnits> = {
units: {
'm/m': {
name: 'unit.meter-per-meter',
tags: ['ratio of length to length', 'meter per meter', 'm/m'],
to_anchor: 1,
},
},
};
const measure: TbMeasure<DimensionRatioUnits> = {
METRIC,
};
export default measure;

30
ui-ngx/src/app/shared/models/units/dynamic-viscosity.ts

@ -1,3 +1,19 @@
///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type DynamicViscosityMetricUnits = 'Pa·s' | 'cP' | 'P' | 'N·s/m²' | 'dyn·s/cm²' | 'kg/(m·s)'; export type DynamicViscosityMetricUnits = 'Pa·s' | 'cP' | 'P' | 'N·s/m²' | 'dyn·s/cm²' | 'kg/(m·s)';
@ -10,32 +26,32 @@ const METRIC: TbMeasureUnits<DynamicViscosityMetricUnits> = {
units: { units: {
'Pa·s': { 'Pa·s': {
name: 'unit.pascal-second', name: 'unit.pascal-second',
tags: ['dynamic viscosity', 'viscosity', 'fluid mechanics', 'Pa·s'], tags: ['fluid mechanics'],
to_anchor: 1, to_anchor: 1,
}, },
'cP': { 'cP': {
name: 'unit.centipoise', name: 'unit.centipoise',
tags: ['viscosity', 'dynamic viscosity', 'fluid viscosity', 'centipoise', 'cP'], tags: ['fluid mechanics'],
to_anchor: 0.001, to_anchor: 0.001,
}, },
'P': { 'P': {
name: 'unit.poise', name: 'unit.poise',
tags: ['viscosity', 'dynamic viscosity', 'fluid viscosity', 'poise', 'P'], tags: ['fluid mechanics'],
to_anchor: 0.1, to_anchor: 0.1,
}, },
'N·s/m²': { 'N·s/m²': {
name: 'unit.newton-second-per-square-meter', name: 'unit.newton-second-per-square-meter',
tags: ['newton second per square meter', 'N·s/m²'], tags: ['fluid mechanics'],
to_anchor: 1, to_anchor: 1,
}, },
'dyn·s/cm²': { 'dyn·s/cm²': {
name: 'unit.dyne-second-per-square-centimeter', name: 'unit.dyne-second-per-square-centimeter',
tags: ['dyne second per square centimeter', 'dyn·s/cm²'], tags: ['fluid mechanics'],
to_anchor: 0.1, to_anchor: 0.1,
}, },
'kg/(m·s)': { 'kg/(m·s)': {
name: 'unit.kilogram-per-meter-second', name: 'unit.kilogram-per-meter-second',
tags: ['kilogram per meter-second', 'kg/(m·s)'], tags: ['fluid mechanics'],
to_anchor: 1, to_anchor: 1,
}, },
}, },
@ -46,7 +62,7 @@ const IMPERIAL: TbMeasureUnits<DynamicViscosityImperialUnits> = {
units: { units: {
'lb/(ft·h)': { 'lb/(ft·h)': {
name: 'unit.pound-per-foot-hour', name: 'unit.pound-per-foot-hour',
tags: ['pound per foot-hour', 'lb/(ft·h)'], tags: ['fluid mechanics'],
to_anchor: 1, to_anchor: 1,
}, },
}, },

18
ui-ngx/src/app/shared/models/units/earthquake-magnitude.ts

@ -1,3 +1,19 @@
///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type EarthquakeMagnitudeUnits = 'richter'; export type EarthquakeMagnitudeUnits = 'richter';
@ -6,7 +22,7 @@ const METRIC: TbMeasureUnits<EarthquakeMagnitudeUnits> = {
units: { units: {
richter: { richter: {
name: 'unit.richter-scale', name: 'unit.richter-scale',
tags: ['earthquake', 'seismic activity', 'richter'], tags: ['seismic activity'],
to_anchor: 1, to_anchor: 1,
}, },
}, },

22
ui-ngx/src/app/shared/models/units/electric-current.ts

@ -16,50 +16,48 @@
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type ElectricCurrentUnits = ElectricCurrentMetricalUnits; export type ElectricCurrentUnits = 'A' | 'pA' | 'nA' | 'μA' | 'mA' | 'kA' | 'MA' | 'GA';
export type ElectricCurrentMetricalUnits = 'A' | 'pA' | 'nA' | 'μA' | 'mA' | 'kA' | 'MA' | 'GA'; const METRIC: TbMeasureUnits<ElectricCurrentUnits> = {
const METRIC: TbMeasureUnits<ElectricCurrentMetricalUnits> = {
units: { units: {
A: { A: {
name: 'unit.ampere', name: 'unit.ampere',
tags: ['electric current', 'current flow', 'flow of electricity', 'electrical flow', 'ampere', 'amperes', 'amperage', 'A'], tags: ['current flow', 'flow of electricity', 'electrical flow', 'amperes', 'amperage'],
to_anchor: 1, to_anchor: 1,
}, },
pA: { pA: {
name: 'unit.picoampere', name: 'unit.picoampere',
tags: ['current', 'amperes', 'picoampere', 'pA'], tags: ['picoamperes'],
to_anchor: 1e-12, to_anchor: 1e-12,
}, },
nA: { nA: {
name: 'unit.nanoampere', name: 'unit.nanoampere',
tags: ['electric current', 'amperes', 'nanoampere', 'nA'], tags: ['nanoamperes'],
to_anchor: 1e-9, to_anchor: 1e-9,
}, },
μA: { μA: {
name: 'unit.microampere', name: 'unit.microampere',
tags: ['electric current', 'microampere', 'microamperes', 'μA'], tags: ['microamperes'],
to_anchor: 1e-6, to_anchor: 1e-6,
}, },
mA: { mA: {
name: 'unit.milliampere', name: 'unit.milliampere',
tags: ['electric current', 'milliampere', 'milliamperes', 'mA'], tags: ['milliamperes'],
to_anchor: 0.001, to_anchor: 0.001,
}, },
kA: { kA: {
name: 'unit.kiloampere', name: 'unit.kiloampere',
tags: ['electric current', 'kiloampere', 'kiloamperes', 'kA'], tags: ['kiloamperes'],
to_anchor: 1000, to_anchor: 1000,
}, },
MA: { MA: {
name: 'unit.megaampere', name: 'unit.megaampere',
tags: ['electric current', 'megaampere', 'megaamperes', 'MA'], tags: ['megaamperes'],
to_anchor: 1e6, to_anchor: 1e6,
}, },
GA: { GA: {
name: 'unit.gigaampere', name: 'unit.gigaampere',
tags: ['electric current', 'gigaampere', 'gigaamperes', 'GA'], tags: ['gigaamperes'],
to_anchor: 1e9, to_anchor: 1e9,
}, },
} }

39
ui-ngx/src/app/shared/models/units/electric-dipole-moment.ts

@ -0,0 +1,39 @@
///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type ElectricDipoleMomentUnits = 'C·m' | 'D';
const METRIC: TbMeasureUnits<ElectricDipoleMomentUnits> = {
units: {
'C·m': {
name: 'unit.electric-dipole-moment',
to_anchor: 1,
},
'D': {
name: 'unit.debye',
tags: ['polarization'],
to_anchor: 3.33564e-30
},
},
};
const measure: TbMeasure<ElectricDipoleMomentUnits> = {
METRIC,
};
export default measure;

19
ui-ngx/src/app/shared/models/units/electric-field-strength.ts

@ -1,3 +1,19 @@
///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type ElectricFieldStrengthUnits = 'V/m' | 'mV/m' | 'kV/m'; export type ElectricFieldStrengthUnits = 'V/m' | 'mV/m' | 'kV/m';
@ -6,17 +22,14 @@ const METRIC: TbMeasureUnits<ElectricFieldStrengthUnits> = {
units: { units: {
'V/m': { 'V/m': {
name: 'unit.volts-per-meter', name: 'unit.volts-per-meter',
tags: ['electric field strength', 'volts per meter', 'V/m'],
to_anchor: 1, to_anchor: 1,
}, },
'mV/m': { 'mV/m': {
name: 'unit.millivolts-per-meter', name: 'unit.millivolts-per-meter',
tags: ['electric field strength', 'millivolts per meter', 'mV/m'],
to_anchor: 1e-3, to_anchor: 1e-3,
}, },
'kV/m': { 'kV/m': {
name: 'unit.kilovolts-per-meter', name: 'unit.kilovolts-per-meter',
tags: ['electric field strength', 'kilovolts per meter', 'kV/m'],
to_anchor: 1e3, to_anchor: 1e3,
}, },
}, },

28
ui-ngx/src/app/shared/models/units/electric-flux.ts

@ -1,39 +1,47 @@
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; ///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
export type ElectricFluxMetricUnits = 'V·m' | 'kV·m' | 'MV·m' | 'µV·m' | 'mV·m' | 'nV·m'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type ElectricFluxUnits = ElectricFluxMetricUnits; export type ElectricFluxUnits = 'V·m' | 'kV·m' | 'MV·m' | 'µV·m' | 'mV·m' | 'nV·m';
const METRIC: TbMeasureUnits<ElectricFluxMetricUnits> = { const METRIC: TbMeasureUnits<ElectricFluxUnits> = {
units: { units: {
'V·m': { 'V·m': {
name: 'unit.volt-meter', name: 'unit.volt-meter',
tags: ['electric flux', 'volt-meter', 'V·m'],
to_anchor: 1, to_anchor: 1,
}, },
'kV·m': { 'kV·m': {
name: 'unit.kilovolt-meter', name: 'unit.kilovolt-meter',
tags: ['electric flux', 'kilovolt-meter', 'kV·m'],
to_anchor: 1000, to_anchor: 1000,
}, },
'MV·m': { 'MV·m': {
name: 'unit.megavolt-meter', name: 'unit.megavolt-meter',
tags: ['electric flux', 'megavolt-meter', 'MV·m'],
to_anchor: 1000000, to_anchor: 1000000,
}, },
'µV·m': { 'µV·m': {
name: 'unit.microvolt-meter', name: 'unit.microvolt-meter',
tags: ['electric flux', 'microvolt-meter', 'µV·m'],
to_anchor: 0.000001, to_anchor: 0.000001,
}, },
'mV·m': { 'mV·m': {
name: 'unit.millivolt-meter', name: 'unit.millivolt-meter',
tags: ['electric flux', 'millivolt-meter', 'mV·m'],
to_anchor: 0.001, to_anchor: 0.001,
}, },
'nV·m': { 'nV·m': {
name: 'unit.nanovolt-meter', name: 'unit.nanovolt-meter',
tags: ['electric flux', 'nanovolt-meter', 'nV·m'],
to_anchor: 0.000000001, to_anchor: 0.000000001,
}, },
}, },

26
ui-ngx/src/app/shared/models/units/electric-moment.ts

@ -1,26 +0,0 @@
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type ElectricMomentMetricUnits = 'C·m' | 'D';
export type ElectricMomentUnits = ElectricMomentMetricUnits;
const METRIC: TbMeasureUnits<ElectricMomentMetricUnits> = {
units: {
'C·m': {
name: 'unit.electric-dipole-moment',
tags: ['electric dipole', 'dipole moment', 'coulomb meter', 'C·m'],
to_anchor: 1,
},
'D': {
name: 'unit.debye',
tags: ['polarization', 'electric dipole moment', 'debye', 'D'],
to_anchor: 3.33564e-30
},
},
};
const measure: TbMeasure<ElectricMomentUnits> = {
METRIC,
};
export default measure;

23
ui-ngx/src/app/shared/models/units/electric-permittivity.ts

@ -1,14 +1,27 @@
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; ///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
export type ElectricPermittivityMetricUnits = 'F/m'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type ElectricPermittivityUnits = ElectricPermittivityMetricUnits; export type ElectricPermittivityUnits = 'F/m';
const METRIC: TbMeasureUnits<ElectricPermittivityMetricUnits> = { const METRIC: TbMeasureUnits<ElectricPermittivityUnits> = {
units: { units: {
'F/m': { 'F/m': {
name: 'unit.farad-per-meter', name: 'unit.farad-per-meter',
tags: ['electric permittivity', 'farad per meter', 'F/m'],
to_anchor: 1, to_anchor: 1,
}, },
}, },

22
ui-ngx/src/app/shared/models/units/electrical-conductance.ts

@ -1,3 +1,19 @@
///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type ElectricalConductanceUnits = 'S' | 'mS' | 'μS' | 'kS' | 'MS' | 'GS'; export type ElectricalConductanceUnits = 'S' | 'mS' | 'μS' | 'kS' | 'MS' | 'GS';
@ -6,32 +22,26 @@ const METRIC: TbMeasureUnits<ElectricalConductanceUnits> = {
units: { units: {
'S': { 'S': {
name: 'unit.siemens', name: 'unit.siemens',
tags: ['electrical conductance', 'conductance', 'siemens', 'S'],
to_anchor: 1, to_anchor: 1,
}, },
'mS': { 'mS': {
name: 'unit.millisiemens', name: 'unit.millisiemens',
tags: ['electrical conductance', 'conductance', 'millisiemens', 'mS'],
to_anchor: 1e-3, to_anchor: 1e-3,
}, },
'μS': { 'μS': {
name: 'unit.microsiemens', name: 'unit.microsiemens',
tags: ['electrical conductance', 'conductance', 'microsiemens', 'μS'],
to_anchor: 1e-6, to_anchor: 1e-6,
}, },
'kS': { 'kS': {
name: 'unit.kilosiemens', name: 'unit.kilosiemens',
tags: ['electrical conductance', 'conductance', 'kilosiemens', 'kS'],
to_anchor: 1e3, to_anchor: 1e3,
}, },
'MS': { 'MS': {
name: 'unit.megasiemens', name: 'unit.megasiemens',
tags: ['electrical conductance', 'conductance', 'megasiemens', 'MS'],
to_anchor: 1e6, to_anchor: 1e6,
}, },
'GS': { 'GS': {
name: 'unit.gigasiemens', name: 'unit.gigasiemens',
tags: ['electrical conductance', 'conductance', 'gigasiemens', 'GS'],
to_anchor: 1e9, to_anchor: 1e9,
}, },
}, },

27
ui-ngx/src/app/shared/models/units/electrical-conductivity.ts

@ -1,23 +1,38 @@
///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type ElectricalConductivityMetricUnits = 'µS/cm' | 'mS/m' | 'S/m'; export type ElectricalConductivityUnits = 'µS/cm' | 'mS/m' | 'S/m';
export type ElectricalConductivityUnits = ElectricalConductivityMetricUnits;
const METRIC: TbMeasureUnits<ElectricalConductivityMetricUnits> = { const METRIC: TbMeasureUnits<ElectricalConductivityUnits> = {
units: { units: {
'S/m': { 'S/m': {
name: 'unit.siemens-per-meter', name: 'unit.siemens-per-meter',
tags: ['Electrical conductivity', 'water quality', 'soil quality', 'siemens per meter', 'S/m'], tags: [ 'water quality', 'soil quality'],
to_anchor: 1, to_anchor: 1,
}, },
'µS/cm': { 'µS/cm': {
name: 'unit.microsiemens-per-centimeter', name: 'unit.microsiemens-per-centimeter',
tags: ['Electrical conductivity', 'water quality', 'soil quality', 'microsiemens per centimeter', 'µS/cm'], tags: ['water quality', 'soil quality'],
to_anchor: 0.0001, to_anchor: 0.0001,
}, },
'mS/m': { 'mS/m': {
name: 'unit.millisiemens-per-meter', name: 'unit.millisiemens-per-meter',
tags: ['Electrical conductivity', 'water quality', 'soil quality', 'millisiemens per meter', 'mS/m'], tags: ['water quality', 'soil quality'],
to_anchor: 0.001, to_anchor: 0.001,
}, },
}, },

26
ui-ngx/src/app/shared/models/units/energy.ts

@ -40,42 +40,36 @@ const METRIC: TbMeasureUnits<EnergyMetricUnits> = {
units: { units: {
Wm: { Wm: {
name: 'unit.watt-minute', name: 'unit.watt-minute',
tags: ['energy', 'watt-minute', 'watt-minutes', 'Wm'],
to_anchor: 60, to_anchor: 60,
}, },
Wh: { Wh: {
name: 'unit.watt-hour', name: 'unit.watt-hour',
tags: ['energy', 'watt-hour', 'watt-hours', 'energy usage', 'power consumption', 'energy consumption', 'electricity usage'], tags: ['energy usage', 'power consumption', 'energy consumption', 'electricity usage'],
to_anchor: 3600, to_anchor: 3600,
}, },
mWh: { mWh: {
name: 'unit.milliwatt-hour', name: 'unit.milliwatt-hour',
tags: ['energy', 'milliwatt-hour', 'milliwatt-hours', 'mWh'],
to_anchor: 3.6, to_anchor: 3.6,
}, },
kWh: { kWh: {
name: 'unit.kilowatt-hour', name: 'unit.kilowatt-hour',
tags: ['energy', 'kilowatt-hour', 'kilowatt-hours', 'energy usage', 'power consumption', 'energy consumption', 'electricity usage'], tags: ['energy usage', 'power consumption', 'energy consumption', 'electricity usage'],
to_anchor: 3600000, to_anchor: 3600000,
}, },
MWh: { MWh: {
name: 'unit.megawatt-hour', name: 'unit.megawatt-hour',
tags: ['energy', 'megawatt-hour', 'megawatt-hours', 'MWh'],
to_anchor: 3600000000, to_anchor: 3600000000,
}, },
GWh: { GWh: {
name: 'unit.gigawatt-hour', name: 'unit.gigawatt-hour',
tags: ['energy', 'gigawatt-hour', 'gigawatt-hours', 'GWh'],
to_anchor: 3600000000000, to_anchor: 3600000000000,
}, },
μJ: { μJ: {
name: 'unit.microjoule', name: 'unit.microjoule',
tags: ['energy', 'microjoule', 'microjoules', 'μJ'],
to_anchor: 0.000001, to_anchor: 0.000001,
}, },
mJ: { mJ: {
name: 'unit.millijoule', name: 'unit.millijoule',
tags: ['energy', 'millijoule', 'millijoules', 'mJ'],
to_anchor: 0.001, to_anchor: 0.001,
}, },
J: { J: {
@ -85,22 +79,19 @@ const METRIC: TbMeasureUnits<EnergyMetricUnits> = {
}, },
kJ: { kJ: {
name: 'unit.kilojoule', name: 'unit.kilojoule',
tags: ['energy', 'kilojoule', 'kilojoules', 'kJ'],
to_anchor: 1000, to_anchor: 1000,
}, },
MJ: { MJ: {
name: 'unit.megajoule', name: 'unit.megajoule',
tags: ['energy', 'megajoule', 'megajoules', 'MJ'],
to_anchor: 1000000, to_anchor: 1000000,
}, },
GJ: { GJ: {
name: 'unit.gigajoule', name: 'unit.gigajoule',
tags: ['energy', 'gigajoule', 'gigajoules', 'GJ'],
to_anchor: 1000000000, to_anchor: 1000000000,
}, },
eV: { eV: {
name: 'unit.electron-volts', name: 'unit.electron-volts',
tags: ['energy', 'subatomic particles', 'radiation'], tags: ['subatomic particles', 'radiation'],
to_anchor: 1.602176634e-19, to_anchor: 1.602176634e-19,
}, },
}, },
@ -111,32 +102,31 @@ const IMPERIAL: TbMeasureUnits<EnergyImperialUnits> = {
units: { units: {
cal: { cal: {
name: 'unit.small-calorie', name: 'unit.small-calorie',
tags: ['energy', 'small calorie', 'calories', 'cal'],
to_anchor: 1, to_anchor: 1,
}, },
Cal: { Cal: {
name: 'unit.calorie', name: 'unit.calorie',
tags: ['energy', 'food energy', 'Calorie', 'Calories', 'Cal'], tags: ['food energy'],
to_anchor: 1000, to_anchor: 1000,
}, },
kcal: { kcal: {
name: 'unit.kilocalorie', name: 'unit.kilocalorie',
tags: ['energy', 'small calorie', 'kilocalories', 'kcal'], tags: ['small calorie'],
to_anchor: 1000, to_anchor: 1000,
}, },
BTU: { BTU: {
name: 'unit.british-thermal-unit', name: 'unit.british-thermal-unit',
tags: ['energy', 'heat', 'work done', 'british thermal unit', 'british thermal units', 'BTU'], tags: ['heat', 'work done'],
to_anchor: 252.164401, to_anchor: 252.164401,
}, },
'ft·lb': { 'ft·lb': {
name: 'unit.foot-pound', name: 'unit.foot-pound',
tags: ['energy', 'foot-pound', 'foot-pounds', 'ft·lb', 'ft⋅lbf'], tags: ['ft⋅lbf'],
to_anchor: 0.32404875717017, to_anchor: 0.32404875717017,
}, },
thm: { thm: {
name: 'unit.therm', name: 'unit.therm',
tags: ['energy', 'natural gas consumption', 'BTU', 'therm', 'thm'], tags: ['natural gas consumption', 'BTU'],
to_anchor: 25219021.687207, to_anchor: 25219021.687207,
}, },
}, },

9
ui-ngx/src/app/shared/models/units/force.ts

@ -26,17 +26,15 @@ const METRIC: TbMeasureUnits<ForceMetricUnits> = {
units: { units: {
N: { N: {
name: 'unit.newton', name: 'unit.newton',
tags: ['force', 'pressure', 'newton', 'newtons', 'N', 'push', 'pull', 'weight', 'gravity', 'N'], tags: ['pressure', 'push', 'pull', 'weight'],
to_anchor: 1, to_anchor: 1,
}, },
kN: { kN: {
name: 'unit.kilonewton', name: 'unit.kilonewton',
tags: ['force', 'kN'],
to_anchor: 1000, to_anchor: 1000,
}, },
dyn: { dyn: {
name: 'unit.dyne', name: 'unit.dyne',
tags: ['force', 'dyn'],
to_anchor: 0.00001, to_anchor: 0.00001,
}, },
}, },
@ -47,27 +45,22 @@ const IMPERIAL: TbMeasureUnits<ForceImperialUnits> = {
units: { units: {
lbf: { lbf: {
name: 'unit.pound-force', name: 'unit.pound-force',
tags: ['force', 'lbf'],
to_anchor: 1, to_anchor: 1,
}, },
kgf: { kgf: {
name: 'unit.kilogram-force', name: 'unit.kilogram-force',
tags: ['force', 'kgf'],
to_anchor: 2.20462, to_anchor: 2.20462,
}, },
klbf: { klbf: {
name: 'unit.kilopound-force', name: 'unit.kilopound-force',
tags: ['force', 'klbf'],
to_anchor: 1000, to_anchor: 1000,
}, },
pdl: { pdl: {
name: 'unit.poundal', name: 'unit.poundal',
tags: ['force', 'pdl'],
to_anchor: 0.031081, to_anchor: 0.031081,
}, },
kip: { kip: {
name: 'unit.kip', name: 'unit.kip',
tags: ['force', 'kip'],
to_anchor: 1000, to_anchor: 1000,
}, },
}, },

25
ui-ngx/src/app/shared/models/units/frequency.ts

@ -23,62 +23,61 @@ const METRIC: TbMeasureUnits<FrequencyMetricUnits> = {
units: { units: {
mHz: { mHz: {
name: 'unit.millihertz', name: 'unit.millihertz',
tags: ['frequency', 'cycles per second', 'millihertz', 'mHz'], tags: ['cycles per second'],
to_anchor: 1 / 1000, to_anchor: 1 / 1000,
}, },
Hz: { Hz: {
name: 'unit.hertz', name: 'unit.hertz',
tags: ['frequency', 'cycles per second', 'hertz', 'Hz'], tags: ['cycles per second'],
to_anchor: 1, to_anchor: 1,
}, },
kHz: { kHz: {
name: 'unit.kilohertz', name: 'unit.kilohertz',
tags: ['frequency', 'cycles per second', 'kilohertz', 'kHz'], tags: ['cycles per second'],
to_anchor: 1000, to_anchor: 1000,
}, },
MHz: { MHz: {
name: 'unit.megahertz', name: 'unit.megahertz',
tags: ['frequency', 'cycles per second', 'megahertz', 'MHz'], tags: ['cycles per second'],
to_anchor: 1000 * 1000, to_anchor: 1000 * 1000,
}, },
GHz: { GHz: {
name: 'unit.gigahertz', name: 'unit.gigahertz',
tags: ['frequency', 'cycles per second', 'gigahertz', 'GHz'], tags: ['cycles per second'],
to_anchor: 1000 * 1000 * 1000, to_anchor: 1000 * 1000 * 1000,
}, },
THz: { THz: {
name: 'unit.terahertz', name: 'unit.terahertz',
tags: ['frequency', 'terahertz', 'THz'],
to_anchor: 1000 * 1000 * 1000 * 1000, to_anchor: 1000 * 1000 * 1000 * 1000,
}, },
rpm: { rpm: {
name: 'unit.rotation-per-minute', name: 'unit.rotation-per-minute',
tags: ['frequency', 'rotation per minute', 'rotations per minute', 'rpm', 'angular velocity'], tags: ['rotations per minute', 'angular velocity'],
to_anchor: 1 / 60, to_anchor: 1 / 60,
}, },
RPM: { RPM: {
name: 'unit.rpm', name: 'unit.rpm',
tags: ['rotational speed', 'angular velocity', 'revolutions per minute', 'RPM'], tags: ['rotational speed', 'angular velocity'],
to_anchor: 1 / 60, to_anchor: 1 / 60,
}, },
'λ': { 'λ': {
name: 'unit.lambda', name: 'unit.lambda',
tags: ['wavelength', 'lambda', 'λ'], tags: ['wavelength'],
to_anchor: 299792458, to_anchor: 299792458,
}, },
bpm: { bpm: {
name: 'unit.beats-per-minute', name: 'unit.beats-per-minute',
tags: ['heart rate', 'pulse', 'bpm'], tags: ['heart rate', 'pulse'],
to_anchor: 0.0167 to_anchor: 0.0167
}, },
'deg/s': { 'deg/s': {
name: 'unit.deg-per-second', name: 'unit.deg-per-second',
tags: ['angular velocity', 'degrees per second', 'deg/s'], tags: ['angular velocity'],
to_anchor: 1 / 360, // 1 deg/s = 1/360 Hz to_anchor: 1 / 360,
}, },
'rad/s': { 'rad/s': {
name: 'unit.radian-per-second', name: 'unit.radian-per-second',
tags: ['angular velocity', 'rotation speed', 'rad/s'], tags: ['angular velocity'],
to_anchor: 1 / (Math.PI * 2), to_anchor: 1 / (Math.PI * 2),
}, },
}, },

20
ui-ngx/src/app/shared/models/units/fuel-efficiency.ts

@ -1,3 +1,19 @@
///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type FuelEfficiencyMetricUnits = 'km/L' | 'L/100km'; export type FuelEfficiencyMetricUnits = 'km/L' | 'L/100km';
@ -10,12 +26,10 @@ const METRIC: TbMeasureUnits<FuelEfficiencyMetricUnits> = {
units: { units: {
'km/L': { 'km/L': {
name: 'unit.kilometers-per-liter', name: 'unit.kilometers-per-liter',
tags: ['fuel efficiency', 'km/L'],
to_anchor: 1, to_anchor: 1,
}, },
'L/100km': { 'L/100km': {
name: 'unit.liters-per-100-km', name: 'unit.liters-per-100-km',
tags: ['fuel efficiency', 'L/100km'],
to_anchor: 1, to_anchor: 1,
transform: (value) => 100 / value, transform: (value) => 100 / value,
}, },
@ -27,12 +41,10 @@ const IMPERIAL: TbMeasureUnits<FuelEfficiencyImperialUnits> = {
units: { units: {
'mpg': { 'mpg': {
name: 'unit.miles-per-gallon', name: 'unit.miles-per-gallon',
tags: ['fuel efficiency', 'mpg'],
to_anchor: 0.425144, to_anchor: 0.425144,
}, },
'gal/mi': { 'gal/mi': {
name: 'unit.gallons-per-mile', name: 'unit.gallons-per-mile',
tags: ['fuel efficiency', 'gal/mi'],
to_anchor: 2.35214583, to_anchor: 2.35214583,
}, },
}, },

26
ui-ngx/src/app/shared/models/units/heat-capacity.ts

@ -1,15 +1,29 @@
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; ///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
export type HeatCapacityMetricUnits = 'J/K'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type HeatCapacityUnits = HeatCapacityMetricUnits; export type HeatCapacityUnits = 'J/K';
const METRIC: TbMeasureUnits<HeatCapacityMetricUnits> = { const METRIC: TbMeasureUnits<HeatCapacityUnits> = {
units: { units: {
'J/K': { 'J/K': {
name: 'unit.joule-per-kelvin', name: 'unit.joule-per-kelvin',
tags: ['specific heat capacity', 'heat capacity per unit temperature', 'joule per kelvin', 'J/K'], tags: ['heat capacity per unit temperature'],
to_anchor: 1, // Base unit: J/K to_anchor: 1,
}, },
}, },
}; };

20
ui-ngx/src/app/shared/models/units/humidity.ts

@ -1,20 +0,0 @@
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type HumidityUnits = HumidityMetricUnits;
export type HumidityMetricUnits = 'g/kg';
const METRIC: TbMeasureUnits<HumidityMetricUnits> = {
units: {
'g/kg': {
name: 'unit.gram-per-kilogram',
tags: ['humidity', 'moisture', 'specific humidity', 'g/kg'],
to_anchor: 1,
},
},
};
const measure: TbMeasure<HumidityUnits> = {
METRIC,
};
export default measure;

8
ui-ngx/src/app/shared/models/units/illuminance.ts

@ -26,17 +26,17 @@ const METRIC: TbMeasureUnits<IlluminanceMetricUnits> = {
units: { units: {
lx: { lx: {
name: 'unit.lux', name: 'unit.lux',
tags: ['illumination', 'light level on a surface', 'illuminance', 'Lux', 'lx'], tags: ['light level on a surface', 'illuminance', 'Lux', 'lx'],
to_anchor: 1, to_anchor: 1,
}, },
'cd/m²': { 'cd/m²': {
name: 'unit.candela-per-square-meter', name: 'unit.candela-per-square-meter',
tags: ['brightness', 'light level', 'Luminance', 'Candela per square meter', 'cd/m²'], tags: ['brightness', 'light level', 'Luminance'],
to_anchor: 1, to_anchor: 1,
}, },
'lm/m²': { 'lm/m²': {
name: 'unit.lumen-per-square-meter', name: 'unit.lumen-per-square-meter',
tags: ['illumination', 'light level', 'lumen per square meter', 'lm/m²'], tags: ['light level'],
to_anchor: 1, to_anchor: 1,
}, },
}, },
@ -47,7 +47,7 @@ const IMPERIAL: TbMeasureUnits<IlluminanceImperialUnits> = {
units: { units: {
'fc': { 'fc': {
name: 'unit.foot-candle', name: 'unit.foot-candle',
tags: ['illuminance', 'light level', 'foot-candle', 'fc'], tags: ['illuminance', 'light level'],
to_anchor: 1, to_anchor: 1,
}, },
}, },

16
ui-ngx/src/app/shared/models/units/inductance.ts

@ -1,3 +1,19 @@
///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type InductanceMetricUnits = 'H' | 'mH' | 'µH' | 'nH' | 'T·m/A'; export type InductanceMetricUnits = 'H' | 'mH' | 'µH' | 'nH' | 'T·m/A';

26
ui-ngx/src/app/shared/models/units/kinematic-viscosity.ts

@ -1,3 +1,19 @@
///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type KinematicViscosityMetricUnits = 'm²/s' | 'cm²/s' | 'St' | 'cSt'; export type KinematicViscosityMetricUnits = 'm²/s' | 'cm²/s' | 'St' | 'cSt';
@ -10,23 +26,19 @@ const METRIC: TbMeasureUnits<KinematicViscosityMetricUnits> = {
units: { units: {
'm²/s': { 'm²/s': {
name: 'unit.square-meter-per-second', name: 'unit.square-meter-per-second',
tags: ['kinematic viscosity', 'm²/s'],
to_anchor: 1, to_anchor: 1,
}, },
'cm²/s': { 'cm²/s': {
name: 'unit.square-centimeter-per-second', name: 'unit.square-centimeter-per-second',
tags: ['kinematic viscosity', 'cm²/s'],
to_anchor: 1e-4, to_anchor: 1e-4,
}, },
'St': { 'St': {
name: 'unit.stoke', name: 'unit.stoke',
tags: ['kinematic viscosity', 'stokes', 'St'], to_anchor: 1e-4,
to_anchor: 1e-4, // St to m²/s
}, },
'cSt': { 'cSt': {
name: 'unit.centistokes', name: 'unit.centistokes',
tags: ['kinematic viscosity', 'centistokes', 'cSt'], to_anchor: 1e-6,
to_anchor: 1e-6, // cSt to m²/s
}, },
}, },
}; };
@ -36,12 +48,10 @@ const IMPERIAL: TbMeasureUnits<KinematicViscosityImperialUnits> = {
units: { units: {
'ft²/s': { 'ft²/s': {
name: 'unit.square-foot-per-second', name: 'unit.square-foot-per-second',
tags: ['kinematic viscosity', 'ft²/s'],
to_anchor: 0.09290304, to_anchor: 0.09290304,
}, },
'in²/s': { 'in²/s': {
name: 'unit.square-inch-per-second', name: 'unit.square-inch-per-second',
tags: ['kinematic viscosity', 'in²/s'],
to_anchor: 0.00064516, to_anchor: 0.00064516,
}, },
}, },

50
ui-ngx/src/app/shared/models/units/length.ts

@ -43,42 +43,42 @@ const METRIC: TbMeasureUnits<LengthMetricUnits> = {
units: { units: {
nm: { nm: {
name: 'unit.nanometer', name: 'unit.nanometer',
tags: ['level', 'height', 'distance', 'length', 'width', 'gap', 'depth', 'nanoscale', 'atomic scale', 'molecular scale', 'nanometer', 'nanometers', 'nm'], tags: ['level', 'height', 'distance', 'width', 'gap', 'depth', 'nanoscale', 'atomic scale', 'molecular scale'],
to_anchor: 1e-9, to_anchor: 1e-9,
}, },
μm: { μm: {
name: 'unit.micrometer', name: 'unit.micrometer',
tags: ['level', 'height', 'distance', 'length', 'width', 'gap', 'depth', 'microns', 'micrometer', 'micrometers', 'µm'], tags: ['level', 'height', 'distance', 'width', 'gap', 'depth', 'microns'],
to_anchor: 1e-6, to_anchor: 1e-6,
}, },
mm: { mm: {
name: 'unit.millimeter', name: 'unit.millimeter',
tags: ['level', 'height', 'distance', 'length', 'width', 'gap', 'depth', 'millimeter', 'millimeters', 'rainfall', 'precipitation', 'displacement', 'position', 'movement', 'transition', 'mm'], tags: ['level', 'height', 'distance', 'width', 'gap', 'depth', 'rainfall', 'precipitation', 'displacement', 'position', 'movement', 'transition'],
to_anchor: 1e-3, to_anchor: 1e-3,
}, },
cm: { cm: {
name: 'unit.centimeter', name: 'unit.centimeter',
tags: ['level', 'height', 'distance', 'length', 'width', 'gap', 'depth', 'centimeter', 'centimeters', 'rainfall', 'precipitation', 'displacement', 'position', 'movement', 'transition', 'cm'], tags: ['level', 'height', 'distance', 'width', 'gap', 'depth', 'rainfall', 'precipitation', 'displacement', 'position', 'movement', 'transition'],
to_anchor: 1e-2, to_anchor: 1e-2,
}, },
dm: { dm: {
name: 'unit.decimeter', name: 'unit.decimeter',
tags: ['level', 'height', 'distance', 'length', 'width', 'gap', 'depth', 'decimeter', 'decimeters', 'dm'], tags: ['level', 'height', 'distance', 'width', 'gap', 'depth'],
to_anchor: 1e-1, to_anchor: 1e-1,
}, },
m: { m: {
name: 'unit.meter', name: 'unit.meter',
tags: ['level', 'height', 'distance', 'length', 'width', 'gap', 'depth', 'meter', 'meters', 'm'], tags: ['level', 'height', 'distance', 'width', 'gap', 'depth'],
to_anchor: 1, to_anchor: 1,
}, },
km: { km: {
name: 'unit.kilometer', name: 'unit.kilometer',
tags: ['distance', 'height', 'length', 'width', 'gap', 'depth', 'kilometer', 'kilometers', 'km'], tags: ['distance', 'height', 'width', 'gap', 'depth'],
to_anchor: 1e3, to_anchor: 1e3,
}, },
angstrom: { angstrom: {
name: 'unit.angstrom', name: 'unit.angstrom',
tags: ['level', 'height', 'distance', 'length', 'width', 'gap', 'depth', 'atomic scale', 'atomic distance', 'nanoscale', 'angstrom', 'angstroms', 'Å'], tags: ['level', 'height', 'distance', 'width', 'gap', 'depth', 'atomic scale', 'atomic distance', 'nanoscale'],
to_anchor: 1e-10, to_anchor: 1e-10,
}, },
}, },
@ -89,87 +89,87 @@ const IMPERIAL: TbMeasureUnits<LengthImperialUnits> = {
units: { units: {
in: { in: {
name: 'unit.inch', name: 'unit.inch',
tags: ['level', 'height', 'distance', 'length', 'width', 'gap', 'depth', 'inch', 'inches', 'in'], tags: ['level', 'height', 'distance', 'width', 'gap', 'depth'],
to_anchor: 1 / 12, to_anchor: 1 / 12,
}, },
yd: { yd: {
name: 'unit.yard', name: 'unit.yard',
tags: ['level', 'height', 'distance', 'length', 'width', 'gap', 'depth', 'yard', 'yards', 'yd'], tags: ['level', 'height', 'distance', 'width', 'gap', 'depth'],
to_anchor: 3, to_anchor: 3,
}, },
'ft-us': { 'ft-us': {
name: 'unit.foot-us', name: 'unit.foot-us',
tags: ['length', 'us survey foot', 'us survey feet', 'ft-us', 'surveying'], tags: ['us survey foot', 'us survey feet', 'ft-us', 'surveying'],
to_anchor: 1.000002, to_anchor: 1.000002,
}, },
ft: { ft: {
name: 'unit.foot', name: 'unit.foot',
tags: ['level', 'height', 'distance', 'length', 'width', 'gap', 'depth', 'foot', 'feet', 'ft'], tags: ['level', 'height', 'distance', 'width', 'gap', 'depth', 'feet'],
to_anchor: 1, to_anchor: 1,
}, },
fathom: { fathom: {
name: 'unit.fathom', name: 'unit.fathom',
tags: ['depth', 'nautical measurement', 'fathom'], tags: ['depth', 'nautical measurement'],
to_anchor: 6, to_anchor: 6,
}, },
mi: { mi: {
name: 'unit.mile', name: 'unit.mile',
tags: ['level', 'height', 'distance', 'length', 'width', 'gap', 'depth', 'mile', 'miles', 'mi'], tags: ['level', 'height', 'distance', 'width', 'gap', 'depth'],
to_anchor: 5280, to_anchor: 5280,
}, },
nmi: { nmi: {
name: 'unit.nautical-mile', name: 'unit.nautical-mile',
tags: ['level', 'height', 'distance', 'length', 'width', 'gap', 'depth', 'nautical mile', 'nmi'], tags: ['level', 'height', 'distance', 'width', 'gap', 'depth', 'nautical mile'],
to_anchor: 6076.12, to_anchor: 6076.12,
}, },
thou: { thou: {
name: 'unit.thou', name: 'unit.thou',
tags: ['length', 'measurement', 'thou'], tags: ['measurement'],
to_anchor: 0.001 / 12, to_anchor: 0.001 / 12,
}, },
barleycorn: { barleycorn: {
name: 'unit.barleycorn', name: 'unit.barleycorn',
tags: ['length', 'shoe size', 'barleycorn'], tags: ['shoe size'],
to_anchor: 1 / 36, to_anchor: 1 / 36,
}, },
hand: { hand: {
name: 'unit.hand', name: 'unit.hand',
tags: ['length', 'horse measurement', 'hand'], tags: ['horse measurement'],
to_anchor: 4 / 12, to_anchor: 4 / 12,
}, },
ch: { ch: {
name: 'unit.chain', name: 'unit.chain',
tags: ['length', 'land surveying', 'ch'], tags: ['land surveying'],
to_anchor: 66, to_anchor: 66,
}, },
fur: { fur: {
name: 'unit.furlong', name: 'unit.furlong',
tags: ['length', 'land surveying', 'fur'], tags: ['land surveying'],
to_anchor: 660, to_anchor: 660,
}, },
league: { league: {
name: 'unit.league', name: 'unit.league',
tags: ['length', 'historical measurement', 'league'], tags: ['historical measurement'],
to_anchor: 3 * 5280, to_anchor: 3 * 5280,
}, },
link: { link: {
name: 'unit.link', name: 'unit.link',
tags: ['length', 'land surveying', 'link'], tags: ['land surveying'],
to_anchor: 0.66, to_anchor: 0.66,
}, },
rod: { rod: {
name: 'unit.rod', name: 'unit.rod',
tags: ['length', 'land surveying', 'rod'], tags: ['land surveying'],
to_anchor: 16.5, to_anchor: 16.5,
}, },
cable: { cable: {
name: 'unit.cable', name: 'unit.cable',
tags: ['distance', 'nautical measurement', 'cable'], tags: ['distance', 'nautical measurement'],
to_anchor: 600, to_anchor: 600,
}, },
AU: { AU: {
name: 'unit.astronomical-unit', name: 'unit.astronomical-unit',
tags: ['distance', 'celestial bodies', 'solar system', 'AU'], tags: ['distance', 'celestial bodies', 'solar system'],
to_anchor: 149597870700 * 3.28084, to_anchor: 149597870700 * 3.28084,
}, },
}, },

24
ui-ngx/src/app/shared/models/units/light-exposure.ts

@ -1,14 +1,28 @@
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; ///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
export type LightExposureMetricUnits = 'lx·s'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type LightExposureUnits = LightExposureMetricUnits; export type LightExposureUnits = 'lx·s';
const METRIC: TbMeasureUnits<LightExposureMetricUnits> = { const METRIC: TbMeasureUnits<LightExposureUnits> = {
units: { units: {
'lx·s': { 'lx·s': {
name: 'unit.lux-second', name: 'unit.lux-second',
tags: ['light exposure', 'illuminance over time', 'lux-second', 'lx·s'], tags: ['illuminance over time'],
to_anchor: 1, to_anchor: 1,
}, },
}, },

24
ui-ngx/src/app/shared/models/units/liner-charge-density.ts

@ -1,14 +1,28 @@
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; ///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
export type LinerChargeDensityMetricUnits = 'C/m'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type LinerChargeDensityUnits = LinerChargeDensityMetricUnits; export type LinerChargeDensityUnits = 'C/m';
const METRIC: TbMeasureUnits<LinerChargeDensityMetricUnits> = { const METRIC: TbMeasureUnits<LinerChargeDensityUnits> = {
units: { units: {
'C/m': { 'C/m': {
name: 'unit.coulomb-per-meter', name: 'unit.coulomb-per-meter',
tags: ['electric displacement field per length', 'coulomb per meter', 'C/m'], tags: ['electric displacement field per length'],
to_anchor: 1, to_anchor: 1,
}, },
}, },

45
ui-ngx/src/app/shared/models/units/logarithmic-ratio.ts

@ -0,0 +1,45 @@
///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type LogarithmicRatioUnits = 'dB' | 'B' | 'Np';
const METRIC: TbMeasureUnits<LogarithmicRatioUnits> = {
units: {
'dB': {
name: 'unit.decibel',
tags: ['noise level', 'sound level', 'volume', 'acoustics'],
to_anchor: 1,
},
'B': {
name: 'unit.bel',
tags: ['power ratio', 'intensity ratio'],
to_anchor: 10,
},
'Np': {
name: 'unit.neper',
tags: ['gain', 'loss', 'attenuation'],
to_anchor: 8.685889638,
},
},
};
const measure: TbMeasure<LogarithmicRatioUnits> = {
METRIC,
};
export default measure;

29
ui-ngx/src/app/shared/models/units/logarithmic-units.ts

@ -1,29 +0,0 @@
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type LogarithmicUnits = 'dB' | 'B' | 'Np';
const METRIC: TbMeasureUnits<LogarithmicUnits> = {
units: {
'dB': {
name: 'unit.decibel',
tags: ['noise level', 'sound level', 'volume', 'acoustics', 'decibel', 'dB'],
to_anchor: 1,
},
'B': {
name: 'unit.bel',
tags: ['logarithmic unit', 'power ratio', 'intensity ratio', 'bel', 'B'],
to_anchor: 10,
},
'Np': {
name: 'unit.neper',
tags: ['logarithmic unit', 'ratio', 'gain', 'loss', 'attenuation', 'neper', 'Np'],
to_anchor: 8.685889638,
},
},
};
const measure: TbMeasure<LogarithmicUnits> = {
METRIC,
};
export default measure;

24
ui-ngx/src/app/shared/models/units/luminous-efficacy.ts

@ -1,14 +1,28 @@
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; ///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
export type LuminousEfficacyMetricUnits = 'lm/W'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type LuminousEfficacyUnits = LuminousEfficacyMetricUnits; export type LuminousEfficacyUnits = 'lm/W';
const METRIC: TbMeasureUnits<LuminousEfficacyMetricUnits> = { const METRIC: TbMeasureUnits<LuminousEfficacyUnits> = {
units: { units: {
'lm/W': { 'lm/W': {
name: 'unit.lumens-per-watt', name: 'unit.lumens-per-watt',
tags: ['luminous efficacy', 'lighting efficiency', 'lumens per watt', 'lm/W'], tags: ['lighting efficiency'],
to_anchor: 1, to_anchor: 1,
}, },
}, },

24
ui-ngx/src/app/shared/models/units/luminous-flux.ts

@ -1,14 +1,28 @@
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; ///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
export type LuminousFluxMetricUnits = 'lm'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type LuminousFluxUnits = LuminousFluxMetricUnits; export type LuminousFluxUnits = 'lm';
const METRIC: TbMeasureUnits<LuminousFluxMetricUnits> = { const METRIC: TbMeasureUnits<LuminousFluxUnits> = {
units: { units: {
'lm': { 'lm': {
name: 'unit.lumen', name: 'unit.lumen',
tags: ['luminous flux', 'total light output', 'lumen', 'lm'], tags: ['total light output'],
to_anchor: 1, to_anchor: 1,
}, },
}, },

24
ui-ngx/src/app/shared/models/units/luminous-intensity.ts

@ -1,14 +1,28 @@
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; ///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
export type LuminousIntensityMetricUnits = 'cd'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type LuminousIntensityUnits = LuminousIntensityMetricUnits; export type LuminousIntensityUnits = 'cd';
const METRIC: TbMeasureUnits<LuminousIntensityMetricUnits> = { const METRIC: TbMeasureUnits<LuminousIntensityUnits> = {
units: { units: {
'cd': { 'cd': {
name: 'unit.candela', name: 'unit.candela',
tags: ['luminous intensity', 'light intensity', 'candela', 'cd'], tags: ['light intensity'],
to_anchor: 1, to_anchor: 1,
}, },
}, },

23
ui-ngx/src/app/shared/models/units/magnetic-field-gradient.ts

@ -1,18 +1,31 @@
///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type MagneticFieldGradientUnits = MagneticFieldGradientMetricUnits; export type MagneticFieldGradientUnits = 'T/m' | 'G/cm';
export type MagneticFieldGradientMetricUnits = 'T/m' | 'G/cm';
const METRIC: TbMeasureUnits<MagneticFieldGradientMetricUnits> = { const METRIC: TbMeasureUnits<MagneticFieldGradientUnits> = {
units: { units: {
'T/m': { 'T/m': {
name: 'unit.tesla-per-meter', name: 'unit.tesla-per-meter',
tags: ['magnetic field', 'tesla per meter', 'T/m'],
to_anchor: 1, to_anchor: 1,
}, },
'G/cm': { 'G/cm': {
name: 'unit.gauss-per-centimeter', name: 'unit.gauss-per-centimeter',
tags: ['magnetic field', 'gauss per centimeter', 'G/cm'],
to_anchor: 0.01, to_anchor: 0.01,
}, },
}, },

71
ui-ngx/src/app/shared/models/units/magnetic-field.ts

@ -1,71 +0,0 @@
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type MagneticFieldMetricUnits = 'T' | 'mT' | 'μT' | 'nT' | 'kT' | 'MT' | 'G' | 'kG' | 'γ' | 'A/m' | 'Oe';
export type MagneticFieldUnits = MagneticFieldMetricUnits;
const METRIC: TbMeasureUnits<MagneticFieldMetricUnits> = {
units: {
'T': {
name: 'unit.tesla',
tags: ['magnetic field', 'magnetic field strength', 'tesla', 'T', 'magnetic flux density'],
to_anchor: 1,
},
'mT': {
name: 'unit.millitesla',
tags: ['magnetic field', 'magnetic field strength', 'millitesla', 'mT'],
to_anchor: 0.001,
},
'μT': {
name: 'unit.microtesla',
tags: ['magnetic field', 'magnetic field strength', 'microtesla', 'μT'],
to_anchor: 0.000001,
},
'nT': {
name: 'unit.nanotesla',
tags: ['magnetic field', 'magnetic field strength', 'nanotesla', 'nT'],
to_anchor: 0.000000001,
},
'kT': {
name: 'unit.kilotesla',
tags: ['magnetic field', 'magnetic field strength', 'kilotesla', 'kT'],
to_anchor: 1000,
},
'MT': {
name: 'unit.megatesla',
tags: ['magnetic field', 'magnetic field strength', 'megatesla', 'MT'],
to_anchor: 1000000,
},
'G': {
name: 'unit.gauss',
tags: ['magnetic field', 'magnetic field strength', 'gauss', 'G', 'magnetic flux density'],
to_anchor: 0.0001,
},
'kG': {
name: 'unit.kilogauss',
tags: ['magnetic field', 'magnetic field strength', 'kilogauss', 'kG', 'magnetic flux density'],
to_anchor: 0.1,
},
'γ': {
name: 'unit.gamma',
tags: ['magnetic flux density', 'gamma', 'γ'],
to_anchor: 0.000000001,
},
'A/m': {
name: 'unit.ampere-per-meter',
tags: ['magnetic field strength', 'magnetic field intensity', 'ampere per meter', 'A/m'],
to_anchor: 0.00000125663706143591,
},
'Oe': {
name: 'unit.oersted',
tags: ['magnetic field', 'oersted', 'Oe'],
to_anchor: 0.0001,
},
},
};
const measure: TbMeasure<MagneticFieldUnits> = {
METRIC,
};
export default measure;

84
ui-ngx/src/app/shared/models/units/magnetic-flux-density.ts

@ -0,0 +1,84 @@
///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type MagneticFluxDensityUnits = 'T' | 'mT' | 'μT' | 'nT' | 'kT' | 'MT' | 'G' | 'kG' | 'γ' | 'A/m' | 'Oe';
const METRIC: TbMeasureUnits<MagneticFluxDensityUnits> = {
units: {
T: {
name: 'unit.tesla',
tags: ['magnetic field strength'],
to_anchor: 1,
},
mT: {
name: 'unit.millitesla',
tags: ['magnetic field strength'],
to_anchor: 0.001,
},
μT: {
name: 'unit.microtesla',
tags: ['magnetic field strength'],
to_anchor: 0.000001,
},
nT: {
name: 'unit.nanotesla',
tags: ['magnetic field strength'],
to_anchor: 0.000000001,
},
kT: {
name: 'unit.kilotesla',
tags: ['magnetic field strength'],
to_anchor: 1000,
},
MT: {
name: 'unit.megatesla',
tags: ['magnetic field strength'],
to_anchor: 1000000,
},
G: {
name: 'unit.gauss',
tags: ['magnetic field strength'],
to_anchor: 0.0001,
},
kG: {
name: 'unit.kilogauss',
tags: ['magnetic field strength'],
to_anchor: 0.1,
},
γ: {
name: 'unit.gamma',
to_anchor: 0.000000001,
},
'A/m': {
name: 'unit.ampere-per-meter',
tags: ['magnetic field strength', 'magnetic field intensity'],
to_anchor: 0.00000125663706143591,
},
Oe: {
name: 'unit.oersted',
tags: ['magnetic field strength'],
to_anchor: 0.0001,
},
},
};
const measure: TbMeasure<MagneticFluxDensityUnits> = {
METRIC,
};
export default measure;

31
ui-ngx/src/app/shared/models/units/magnetic-flux.ts

@ -1,37 +1,48 @@
///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type MagneticFluxUnits = 'Wb' | 'µWb' | 'mWb' | 'Mx' | 'G·cm²' | 'kG·cm²'; export type MagneticFluxUnits = 'Wb' | 'µWb' | 'mWb' | 'Mx' | 'G·cm²' | 'kG·cm²';
const METRIC: TbMeasureUnits<MagneticFluxUnits> = { const METRIC: TbMeasureUnits<MagneticFluxUnits> = {
units: { units: {
'Wb': { Wb: {
name: 'unit.weber', name: 'unit.weber',
tags: ['magnetic flux', 'weber', 'Wb'],
to_anchor: 1, to_anchor: 1,
}, },
'µWb': { µWb: {
name: 'unit.microweber', name: 'unit.microweber',
tags: ['magnetic flux', 'microweber', 'µWb'],
to_anchor: 1e-6, to_anchor: 1e-6,
}, },
'mWb': { mWb: {
name: 'unit.milliweber', name: 'unit.milliweber',
tags: ['magnetic flux', 'milliweber', 'mWb'],
to_anchor: 1e-3, to_anchor: 1e-3,
}, },
'Mx': { Mx: {
name: 'unit.maxwell', name: 'unit.maxwell',
tags: ['magnetic flux', 'magnetic field', 'maxwell', 'Mx'], tags: ['magnetic field'],
to_anchor: 1e-8, to_anchor: 1e-8,
}, },
'G·cm²': { 'G·cm²': {
name: 'unit.gauss-square-centimeter', name: 'unit.gauss-square-centimeter',
tags: ['magnetic flux', 'gauss-square centimeter', 'G·cm²'],
to_anchor: 1e-8, to_anchor: 1e-8,
}, },
'kG·cm²': { 'kG·cm²': {
name: 'unit.kilogauss-square-centimeter', name: 'unit.kilogauss-square-centimeter',
tags: ['magnetic flux', 'kilogauss-square centimeter', 'kG·cm²'],
to_anchor: 1e-5, to_anchor: 1e-5,
}, },
}, },

28
ui-ngx/src/app/shared/models/units/magnetic-moment.ts

@ -1,19 +1,33 @@
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; ///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
export type MagneticMomentMetricUnits = 'A·m²' | 'μB'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type MagneticMomentUnits = MagneticMomentMetricUnits; export type MagneticMomentUnits = 'A·m²' | 'μB';
const METRIC: TbMeasureUnits<MagneticMomentMetricUnits> = { const METRIC: TbMeasureUnits<MagneticMomentUnits> = {
units: { units: {
'A·m²': { 'A·m²': {
name: 'unit.magnetic-dipole-moment', name: 'unit.magnetic-dipole-moment',
tags: ['magnetic dipole', 'dipole moment', 'ampere square meter', 'A·m²'], tags: ['magnetic dipole moment'],
to_anchor: 1, to_anchor: 1,
}, },
'μB': { μB: {
name: 'unit.bohr-magneton', name: 'unit.bohr-magneton',
tags: ['atomic physics', 'magnetic moment', 'bohr magneton', 'μB'], tags: ['atomic physics'],
to_anchor: 9.274e-24, to_anchor: 9.274e-24,
}, },
}, },

40
ui-ngx/src/app/shared/models/units/magnetic-permeability.ts

@ -0,0 +1,40 @@
///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type MagneticPermeabilityUnits = 'H/m' | 'G/Oe';
const METRIC: TbMeasureUnits<MagneticPermeabilityUnits> = {
units: {
'H/m': {
name: 'unit.henry-per-meter',
to_anchor: 1,
},
'G/Oe': {
name: 'unit.gauss-per-oersted',
tags: ['magnetic field'],
to_anchor: 1/ 795774.715,
},
},
};
const measure: TbMeasure<MagneticPermeabilityUnits> = {
METRIC,
};
export default measure;

35
ui-ngx/src/app/shared/models/units/mass-fraction.ts

@ -0,0 +1,35 @@
///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type MassFractionUnits = '°Bx';
const METRIC: TbMeasureUnits<MassFractionUnits> = {
units: {
'°Bx': {
name: 'unit.degrees-brix',
tags: ['sugar content', 'fruit ripeness'],
to_anchor: 1,
},
},
};
const measure: TbMeasure<MassFractionUnits> = {
METRIC,
};
export default measure;

32
ui-ngx/src/app/shared/models/units/mass.ts

@ -26,37 +26,37 @@ const METRIC: TbMeasureUnits<MassMetricUnits> = {
units: { units: {
ng: { ng: {
name: 'unit.nanogram', name: 'unit.nanogram',
tags: ['mass', 'weight', 'heaviness', 'load', 'nanogram', 'nanograms', 'ng'], tags: ['weight', 'heaviness', 'load'],
to_anchor: 1e-9, to_anchor: 1e-9,
}, },
mcg: { mcg: {
name: 'unit.microgram', name: 'unit.microgram',
tags: ['mass', 'weight', 'heaviness', 'load', 'μg', 'microgram'], tags: ['weight', 'heaviness', 'load'],
to_anchor: 1e-6, to_anchor: 1e-6,
}, },
mg: { mg: {
name: 'unit.milligram', name: 'unit.milligram',
tags: ['mass', 'weight', 'heaviness', 'load', 'milligram', 'miligrams', 'mg'], tags: ['weight', 'heaviness', 'load'],
to_anchor: 1e-3, to_anchor: 1e-3,
}, },
g: { g: {
name: 'unit.gram', name: 'unit.gram',
tags: ['mass', 'weight', 'heaviness', 'load', 'gram', 'grams', 'g'], tags: ['weight', 'heaviness', 'load'],
to_anchor: 1, to_anchor: 1,
}, },
kg: { kg: {
name: 'unit.kilogram', name: 'unit.kilogram',
tags: ['mass', 'weight', 'heaviness', 'load', 'kilogram', 'kilograms', 'kg'], tags: ['weight', 'heaviness', 'load'],
to_anchor: 1000, to_anchor: 1000,
}, },
t: { t: {
name: 'unit.tonne', name: 'unit.tonne',
tags: ['mass', 'weight', 'heaviness', 'load', 'tonne', 'tons', 't'], tags: ['weight', 'heaviness', 'load'],
to_anchor: 1000000, to_anchor: 1000000,
}, },
Da: { Da: {
name: 'unit.dalton', name: 'unit.dalton',
tags: ['atomic mass unit', 'AMU', 'unified atomic mass unit', 'dalton', 'Da'], tags: ['atomic mass unit', 'AMU', 'unified atomic mass unit'],
to_anchor: 1.66053906660e-24, to_anchor: 1.66053906660e-24,
}, },
ct: { ct: {
@ -72,47 +72,47 @@ const IMPERIAL: TbMeasureUnits<MassImperialUnits> = {
units: { units: {
oz: { oz: {
name: 'unit.ounce', name: 'unit.ounce',
tags: ['mass', 'weight', 'heaviness', 'load', 'ounce', 'ounces', 'oz'], tags: ['weight', 'heaviness', 'load'],
to_anchor: 1 / 16, to_anchor: 1 / 16,
}, },
lb: { lb: {
name: 'unit.pound', name: 'unit.pound',
tags: ['mass', 'weight', 'heaviness', 'load', 'pound', 'pounds', 'lb'], tags: ['weight', 'heaviness', 'load'],
to_anchor: 1, to_anchor: 1,
}, },
st: { st: {
name: 'unit.stone', name: 'unit.stone',
tags: ['mass', 'weight', 'heaviness', 'load', 'stone', 'stones', 'st'], tags: ['weight', 'heaviness', 'load'],
to_anchor: 14, to_anchor: 14,
}, },
'short tons': { 'short tons': {
name: 'unit.short-tons', name: 'unit.short-tons',
tags: ['mass', 'weight', 'heaviness', 'load', 'short ton', 'short tons'], tags: ['weight', 'heaviness', 'load'],
to_anchor: 2000, to_anchor: 2000,
}, },
gr: { gr: {
name: 'unit.grain', name: 'unit.grain',
tags: ['mass', 'measurement', 'grain', 'gr'], tags: ['measurement'],
to_anchor: 1 / 7000, to_anchor: 1 / 7000,
}, },
dr: { dr: {
name: 'unit.drachm', name: 'unit.drachm',
tags: ['mass', 'measurement', 'drachm', 'dr'], tags: ['measurement'],
to_anchor: 1 / 256, to_anchor: 1 / 256,
}, },
qr: { qr: {
name: 'unit.quarter', name: 'unit.quarter',
tags: ['mass', 'measurement', 'quarter', 'qr'], tags: ['measurement'],
to_anchor: 28, to_anchor: 28,
}, },
cwt: { cwt: {
name: 'unit.hundredweight-count', name: 'unit.hundredweight-count',
tags: ['mass', 'weight', 'heaviness', 'load', 'hundredweight count', 'cwt'], tags: ['weight', 'heaviness', 'load'],
to_anchor: 100, to_anchor: 100,
}, },
slug: { slug: {
name: 'unit.slug', name: 'unit.slug',
tags: ['mass', 'measurement', 'slug'], tags: ['measurement'],
to_anchor: 32.174, to_anchor: 32.174,
}, },
}, },

35
ui-ngx/src/app/shared/models/units/molar-concentration.ts

@ -0,0 +1,35 @@
///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type MolarConcentrationUnits = 'mol/m³';
const METRIC: TbMeasureUnits<MolarConcentrationUnits> = {
units: {
'mol/m³': {
name: 'unit.mole-per-cubic-meter',
tags: ['amount of substance per unit volume'],
to_anchor: 1,
}
},
};
const measure: TbMeasure<MolarConcentrationUnits> = {
METRIC,
};
export default measure;

23
ui-ngx/src/app/shared/models/units/molar-energy.ts

@ -1,14 +1,27 @@
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; ///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
export type MolarEnergyMetricUnits = 'J/mol'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type MolarEnergyUnits = MolarEnergyMetricUnits; export type MolarEnergyUnits = 'J/mol';
const METRIC: TbMeasureUnits<MolarEnergyMetricUnits> = { const METRIC: TbMeasureUnits<MolarEnergyUnits> = {
units: { units: {
'J/mol': { 'J/mol': {
name: 'unit.joule-per-mole', name: 'unit.joule-per-mole',
tags: ['molar energy', 'joule per mole', 'J/mol'],
to_anchor: 1, to_anchor: 1,
}, },
}, },

23
ui-ngx/src/app/shared/models/units/molar-heat-capacity.ts

@ -1,14 +1,27 @@
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; ///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
export type MolarHeatCapacityMetricUnits = 'J/(mol·K)'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type MolarHeatCapacityUnits = MolarHeatCapacityMetricUnits; export type MolarHeatCapacityUnits = 'J/(mol·K)';
const METRIC: TbMeasureUnits<MolarHeatCapacityMetricUnits> = { const METRIC: TbMeasureUnits<MolarHeatCapacityUnits> = {
units: { units: {
'J/(mol·K)': { 'J/(mol·K)': {
name: 'unit.joule-per-mole-kelvin', name: 'unit.joule-per-mole-kelvin',
tags: ['molar heat capacity', 'joule per mole-kelvin', 'J/(mol·K)'],
to_anchor: 1, to_anchor: 1,
}, },
}, },

19
ui-ngx/src/app/shared/models/units/molar-mass.ts

@ -1,3 +1,19 @@
///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type MolarMassUnits = 'kg/mol' | 'g/mol' | 'mg/mol'; export type MolarMassUnits = 'kg/mol' | 'g/mol' | 'mg/mol';
@ -6,17 +22,14 @@ const METRIC: TbMeasureUnits<MolarMassUnits> = {
units: { units: {
'g/mol': { 'g/mol': {
name: 'unit.gram-per-mole', name: 'unit.gram-per-mole',
tags: ['molar mass', 'gram per mole', 'g/mol'],
to_anchor: 1, to_anchor: 1,
}, },
'kg/mol': { 'kg/mol': {
name: 'unit.kilogram-per-mole', name: 'unit.kilogram-per-mole',
tags: ['molar mass', 'kilogram per mole', 'kg/mol'],
to_anchor: 1e3, to_anchor: 1e3,
}, },
'mg/mol': { 'mg/mol': {
name: 'unit.milligram-per-mole', name: 'unit.milligram-per-mole',
tags: ['molar mass', 'milligram per mole', 'mg/mol'],
to_anchor: 1e-3, to_anchor: 1e-3,
}, },
}, },

35
ui-ngx/src/app/shared/models/units/specific-humidity.ts

@ -0,0 +1,35 @@
///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type SpecificHumidityUnits = 'g/kg';
const METRIC: TbMeasureUnits<SpecificHumidityUnits> = {
units: {
'g/kg': {
name: 'unit.gram-per-kilogram',
tags: ['humidity', 'moisture', 'specific humidity', 'g/kg'],
to_anchor: 1,
},
},
};
const measure: TbMeasure<SpecificHumidityUnits> = {
METRIC,
};
export default measure;

36
ui-ngx/src/assets/locale/locale.constant-en_US.json

@ -5866,18 +5866,54 @@
}, },
"measures": { "measures": {
"acceleration": "Acceleration", "acceleration": "Acceleration",
"air-quality-index": "Air quality index",
"amount-of-substance": "Amount of substance",
"angle": "Angle", "angle": "Angle",
"angular-acceleration": "Angular acceleration", "angular-acceleration": "Angular acceleration",
"area": "Area", "area": "Area",
"capacitance": "Capacitance",
"catalytic-activity": "Catalytic activity",
"catalytic-concetration": "Catalytic concetration",
"charge": "Charge", "charge": "Charge",
"current-density": "Current density",
"data-transfer-rate": "Data transfer rate",
"digital": "Digital", "digital": "Digital",
"dimension-ratio": "Dimension ratio",
"dynamic-viscosity": "Dynamic viscosity",
"earthquake-magnitude": "Earthquake magnitude",
"electric-current": "Electric current", "electric-current": "Electric current",
"electric-dipole-moment": "Electric dipole moment",
"electric-field-strength": "Electric field strength",
"electric-flux": "Electric flux",
"electric-permittivity": "Electric permittivity",
"electrical-conductance": "Electrical conductance",
"electrical-conductivity": "Electrical conductivity",
"energy": "Energy", "energy": "Energy",
"force": "Force", "force": "Force",
"frequency": "Frequency", "frequency": "Frequency",
"fuel-efficiency": "fuel efficiency",
"heat-capacity": "Heat capacity",
"illuminance": "Illuminance", "illuminance": "Illuminance",
"inductance": "Inductance",
"kinematic-viscosity": "Kinematic viscosity",
"length": "Length", "length": "Length",
"light-exposure": "Light exposure",
"logarithmic-ratio": "Logarithmic ratio",
"luminous-efficacy": "Luminous efficacy",
"luminous-flux": "Luminous flux",
"luminous-intensity": "Luminous intensity",
"magnetic-field-gradient": "Magnetic field gradient",
"magnetic-flux": "Magnetic flux",
"magnetic-flux-density": "Magnetic flux density",
"magnetic-moment": "Magnetic moment",
"magnetic-permeability": "Magnetic permeability",
"mass": "Mass", "mass": "Mass",
"mass-fraction": "Mass fraction",
"molar-concetration": "Molar concetration",
"molar-energy": "Molar energy",
"molar-heat-capacity": "Molar heat capacity",
"molar-mass": "Molar mass",
"specific-humidity": "Specific humidity",
"temperature": "Temperature", "temperature": "Temperature",
"time": "Time" "time": "Time"
}, },

Loading…
Cancel
Save