62 changed files with 1280 additions and 638 deletions
@ -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; |
|||
@ -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; |
|||
@ -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; |
|||
@ -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; |
|||
@ -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; |
|||
@ -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; |
|||
@ -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; |
|||
@ -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; |
|||
@ -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; |
|||
@ -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; |
|||
@ -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; |
|||
@ -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; |
|||
@ -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; |
|||
@ -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; |
|||
@ -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; |
|||
@ -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; |
|||
@ -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; |
|||
@ -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; |
|||
Loading…
Reference in new issue