quantity_si library

The core library containing the fundamental quantity classes and types consistent with the International System of Units (SI, in the French acronym).

Classes

AbsorbedDose
The mean energy imparted to matter per unit mass by ionizing radiation. See the Wikipedia entry for Absorbed Dose for more information.
AbsorbedDoseRate
The rate of mean energy imparted to matter per unit mass by ionizing radiation. See the Wikipedia entry for Absorbed Dose for more information.
AbsorbedDoseRateUnits
Units acceptable for use in describing AbsorbedDoseRate quantities.
AbsorbedDoseUnits
Units acceptable for use in describing AbsorbedDose quantities.
Acceleration
The rate of change of speed of an object. See the Wikipedia entry for Acceleration for more information.
AccelerationUnits
Units acceptable for use in describing Acceleration quantities.
Activity
A measure of the effective concentration of a species in a mixture. See the Wikipedia entry for Thermodynamic activity for more information.
ActivityUnits
Units acceptable for use in describing Activity quantities.
AmountOfSubstance
The size of an ensemble of elementary entities, such as atoms, molecules, electrons, and other particles. See the Wikipedia entry for Amount of substance for more information.
AmountOfSubstanceUnits
Units acceptable for use in describing AmountOfSubstance quantities.
Angle
A planar (2-dimensional) angle, which has dimensions of 1 and is a measure of the ratio of the length of a circular arc to its radius.
AngleUnits
Units acceptable for use in describing Angle quantities.
AngularAcceleration
The rate of change of angular speed. See the Wikipedia entry for Angular acceleration for more information.
AngularAccelerationUnits
Units acceptable for use in describing AngularAcceleration quantities.
AngularMomentum
A measure of the quantity of rotation of a system of matter, taking into account its mass, rotations, motions and shape. See the Wikipedia entry for Angular momentum for more information.
AngularMomentumUnits
Units acceptable for use in describing AngularMomentum quantities.
AngularSpeed
The rate of change of an angle. See the Wikipedia entry for Angular_velocity for more information.
AngularSpeedUnits
Units acceptable for use in describing AngularSpeed quantities.
Area
The extent of a two-dimensional figure or shape. See the Wikipedia entry for Area for more information.
AreaUnits
Units acceptable for use in describing Area quantities.
Capacitance
The ability of a body to store an electrical charge, See the Wikipedia entry for Capacitance for more information.
CapacitanceUnits
Units acceptable for use in describing Capacitance quantities.
CatalyticActivity
The increase in rate of a chemical reaction caused by the presence of a catalyst. See the Wikipedia entry for Catalysis for more information.
CatalyticActivityUnits
Units acceptable for use in describing CatalyticActivity quantities.
Charge
The property of matter that causes it to experience a force when placed in an electromagnetic field See the Wikipedia entry for Electric charge for more information.
ChargeDensity
Electric charge per unit volume of space. See the Wikipedia entry for Charge density for more information.
ChargeDensityUnits
Units acceptable for use in describing ChargeDensity quantities.
ChargeUnits
Units acceptable for use in describing Charge quantities.
Concentration
The abundance of a constituent divided by the total volume of a mixture. See the Wikipedia entry for Concentration for more information.
ConcentrationUnits
Units acceptable for use in describing Concentration quantities.
Conductance
The ease with which an electric current passes through a conductor (the inverse of Resistance). See the Wikipedia entry for Electrical resistance and conductance for more information.
ConductanceUnits
Units acceptable for use in describing Conductance quantities.
Currency
Money in any form when in actual use or circulation as a medium of exchange. See the Wikipedia entry for Currency for more information.
CurrencyUnits
Units acceptable for use in describing Currency quantities.
Current
The flow of electric charge. See the Wikipedia entry for Electric current for more information.
CurrentDensity
The electric current per unit area of cross section. See the Wikipedia entry for Current density for more information.
CurrentDensityUnits
Units acceptable for use in describing CurrentDensity quantities.
CurrentUnits
Units acceptable for use in describing Current quantities.
Dimensions
The Dimensions class represents the dimensions of a physical quantity.
DoseEquivalent
Represents the stochastic health effects (probability of cancer induction and genetic damage) of ionizing radiation on the human body. See the Wikipedia entry for Equivalent dose for more information.
DoseEquivalentUnits
Units acceptable for use in describing DoseEquivalent quantities.
DynamicViscosity
A measure of a fluid's resistance to gradual deformation by shear stress or tensile stress. See the Wikipedia entry for Viscosity for more information.
DynamicViscosityUnits
Units acceptable for use in describing DynamicViscosity quantities.
ElectricFieldStrength
The magnitude of the force per unit charge that an electric field exerts. See the Wikipedia entry for Electric field for more information.
ElectricFieldStrengthUnits
Units acceptable for use in describing ElectricFieldStrength quantities.
ElectricFluxDensity
A measure of the intensity of an electric field generated by a free electric charge, corresponding to the number of electric field lines passing through a given area. See the Wikipedia entry for Electric_flux for more information.
ElectricFluxDensityUnits
Units acceptable for use in describing ElectricFluxDensity quantities.
ElectricPotentialDifference
The difference in electric potential energy between two points per unit electric charge See the Wikipedia entry for Voltage for more information.
ElectricPotentialDifferenceUnits
Units acceptable for use in describing ElectricPotentialDifference quantities.
Energy
The ability of a system to perform work; cannot be created or destroyed but can take many forms. See the Wikipedia entry for Energy for more information.
EnergyDensity
The amount of energy stored in a given system or region of space per unit volume. See the Wikipedia entry for Energy density for more information.
EnergyDensityUnits
Units acceptable for use in describing EnergyDensity quantities.
EnergyFlux
The rate of transfer of energy through a surface. See the Wikipedia entry for Energy density for more information.
EnergyFluxUnits
Units acceptable for use in describing EnergyFlux quantities.
EnergyUnits
Units acceptable for use in describing Energy quantities.
EngineeringFormatSI
A version of scientific notation in which the exponent of ten must be divisible by three (e.g., 123.345 x 10^3).
Entropy
The number of specific ways in which a thermodynamic system may be arranged, commonly understood as a measure of disorder. See the Wikipedia entry for Entropy for more information.
EntropyUnits
Units acceptable for use in describing Entropy quantities.
Exposure
The radiant energy received by a surface per unit area. See the Wikipedia entry for Radiant exposure for more information.
ExposureUnits
Units acceptable for use in describing Exposure quantities.
FieldLevel
Represents a level of a field quantity, a logarithmic quantity. Level of a field quantity is defined as ln(F/F0), where F/F0 is the ratio of two field quantities and F0 is a reference amplitude of the appropriate type.
Force
Any interaction that, when unopposed, changes the motion of an object. See the Wikipedia entry for Force for more information.
ForceUnits
Units acceptable for use in describing Force quantities.
Frequency
The number of occurrences of a repeating event per unit time. See the Wikipedia entry for Frequency for more information.
FrequencyUnits
Units acceptable for use in describing Frequency quantities.
HeatFluxDensity
Heat rate per unit area. See the Wikipedia entry for Heat flux for more information.
HeatFluxDensityUnits
Units acceptable for use in describing HeatFluxDensity quantities.
Illuminance
The total luminous flux incident on a surface, per unit area. See the Wikipedia entry for Illuminance for more information.
IlluminanceUnits
Units acceptable for use in describing Illuminance quantities.
Inductance
The property of an electrical conductor by which a change in current flowing through it induces an electromotive force in both the conductor itself and in any nearby conductors by mutual inductance. See the Wikipedia entry for Inductance for more information.
InductanceUnits
Units acceptable for use in describing Inductance quantities.
Information
Amount of data. See the Wikipedia entry for Information for more information.
InformationRate
The flow of information, per unit time. See the Wikipedia entry for Information for more information.
InformationRateUnits
Units acceptable for use in describing InformationRate quantities.
InformationUnits
Units acceptable for use in describing Information quantities.
KinematicViscosity
The resistance to flow of a fluid, equal to its absolute viscosity divided by its density. See the Wikipedia entry for Viscosity for more information.
KinematicViscosityUnits
Units acceptable for use in describing KinematicViscosity quantities.
Length
Represents the length physical quantity (one of the seven base SI quantities). See the Wikipedia entry for Length for more information.
LengthUnits
Units acceptable for use in describing Length quantities.
Level
Represents logarithmic physical quantities and has dimensions of 1 (Scalar). Level of a field quantity and level of a power quantity are two common logarithmic quantities.
LevelUnits
Units acceptable for use in describing Level quantities.
Luminance
The intensity of light emitted from a surface per unit area. See the Wikipedia entry for Luminance for more information.
LuminanceUnits
Units acceptable for use in describing Luminance quantities.
LuminousFlux
The perceived power of light. It differs from radiant flux, the measure of the total power of electromagnetic radiation (including infrared, ultraviolet, and visible light), in that luminous flux is adjusted to reflect the varying sensitivity of the human eye to different wavelengths of light See the Wikipedia entry for Luminance for more information.
LuminousFluxUnits
Units acceptable for use in describing LuminousFlux quantities.
LuminousIntensity
Represents the luminous intensity physical quantity (one of the seven base SI quantities), the wavelength-weighted power emitted by a light source in a particular direction per unit solid angle. See the Wikipedia entry for Luminous intensity for more information.
LuminousIntensityUnits
Units acceptable for use in describing LuminousIntensity quantities.
MagneticFieldStrength
The intensity of a magnetic field. See the Wikipedia entry for Magnetic field for more information.
MagneticFieldStrengthUnits
Units acceptable for use in describing MagneticFieldStrength quantities.
MagneticFlux
The magnetic flux density passing through a closed surface. See the Wikipedia entry for Magnetic flux for more information.
MagneticFluxDensity
The amount of magnetic flux in an area taken perpendicular to a magnetic flux's direction See the Wikipedia entry for Magnetic flux for more information.
MagneticFluxDensityUnits
Units acceptable for use in describing MagneticFluxDensity quantities.
MagneticFluxUnits
Units acceptable for use in describing MagneticFlux quantities.
Mass
Represents the mass physical quantity (one of the seven base SI quantities), that determines the strength of a body's mutual gravitational attraction to other bodies. See the Wikipedia entry for Mass for more information.
MassDensity
Mass per unit volume. See the Wikipedia entry for Density for more information.
MassDensityUnits
Units acceptable for use in describing MassDensity quantities.
MassFlowRate
The mass of a substance which passes per unit of time. See the Wikipedia entry for Mass flow rate for more information.
MassFlowRateUnits
Units acceptable for use in describing MassFlowRate quantities.
MassFluxDensity
The mass of a substance which passes per unit of time. See the Wikipedia entry for Mass flow rate for more information.
MassFluxDensityUnits
Units acceptable for use in describing MassFluxDensity quantities.
MassUnits
Units acceptable for use in describing Mass quantities.
MiscQuantity
A MiscQuantity is a general (miscellaneous) Quantity having arbitrary dimensions (including possibly the same dimensions as a named Quantity subclass). MiscQuantity objects may be used, for example, in less common domains or as intermediate results in equations.
MolarEnergy
Energy per mole of a substance. See the Wikipedia entry for Specific energy for more information.
MolarEnergyUnits
Units acceptable for use in describing MolarEnergy quantities.
MolarEntropy
Entropy content per mole of substance. See the Wikipedia entry for Standard molar entropy for more information.
MolarEntropyUnits
Units acceptable for use in describing MolarEntropy quantities.
NumberFormatSI
NumberFormatSI implements the International System of Units (SI) style conventions for displaying values of quantities. Specifically:
Permeability
The ability of a material to support the formation of a magnetic field within itself. See the Wikipedia entry for Permeability (electromagnetism) for more information.
PermeabilityUnits
Units acceptable for use in describing Permeability quantities.
Permittivity
The resistance that is encountered when forming an electric field in a medium. See the Wikipedia entry for Permittivity for more information.
PermittivityUnits
Units acceptable for use in describing Permittivity quantities.
Power
Amount of energy per unit time. See the Wikipedia entry for Power (physics) for more information.
PowerLevel
Represents a level of a power quantity, a logarithmic quantity. Level of a power quantity is defined as 0.5*ln(P/P0), where P/P0 is the ratio of two powers and P0 is a reference power.
PowerUnits
Units acceptable for use in describing Power quantities.
Pressure
Force applied perpendicular to the surface of an object per unit area over which that force is distributed. See the Wikipedia entry for Pressure for more information.
PressureUnits
Units acceptable for use in describing Pressure quantities.
Quantity
The abstract base class for all quantities. The Quantity class represents the value of a physical quantity and its associated dimensions. It provides methods for constructing and getting the quantity's value in arbitrary units, methods for mathematical manipulation and comparison and optional features such as arbitrary precision and uncertainty.
Radiance
The radiant flux emitted, reflected, transmitted or received by a surface, per unit solid angle per unit projected area. See the Wikipedia entry for Radiance for more information.
RadianceUnits
Units acceptable for use in describing Radiance quantities.
RadiantFlux
Radiant flux is another way to express power.
RadiantIntensity
The radiant flux emitted, reflected, transmitted or received, per unit solid angle. See the Wikipedia entry for Radiant intensity for more information.
RadiantIntensityUnits
Units acceptable for use in describing RadiantIntensity quantities.
Resistance
A measure of the difficulty passing an electric current through a conductor. See the Wikipedia entry for Electrical resistance and conductance for more information.
ResistanceUnits
Units acceptable for use in describing Resistance quantities.
Scalar
A one-dimensional physical quantity that can be described by a single real number. See the Wikipedia entry for Scalar (physics) for more information.
ScalarUnits
Units acceptable for use in describing Scalar quantities.
ScientificFormatSI
Formats a number as a single integer digit, followed by decimal digits and raised to a power of 10 (e.g., 1.2345 x 10^3).
SolidAngle
A two-dimensional angle in three-dimensional space that an object subtends at a point. See the Wikipedia entry for Solid angle for more information.
SolidAngleUnits
Units acceptable for use in describing SolidAngle quantities.
SpecificEnergy
Energy per unit mass. See the Wikipedia entry for Specific energy for more information.
SpecificEnergyUnits
Units acceptable for use in describing SpecificEnergy quantities.
SpecificHeatCapacity
The heat capacity per unit mass of a material. See the Wikipedia entry for Heat capacity for more information.
SpecificHeatCapacityUnits
Units acceptable for use in describing SpecificHeatCapacity quantities.
SpecificVolume
The ratio of the substance's volume to its mass. See the Wikipedia entry for Specific volume for more information.
SpecificVolumeUnits
Units acceptable for use in describing SpecificVolume quantities.
SpectralIrradiance
Irradiance of a surface per unit frequency. See the Wikipedia entry for Radiometry for more information.
SpectralIrradianceUnits
Units acceptable for use in describing SpectralIrradiance quantities.
Speed
The rate of change of position. See the Wikipedia entry for Speed for more information.
SpeedUnits
Units acceptable for use in describing Speed quantities.
SurfaceTension
The elastic tendency of liquids which makes them acquire the least surface area possible. See the Wikipedia entry for Surface tension for more information.
SurfaceTensionUnits
Units acceptable for use in describing SurfaceTension quantities.
Temperature
An objective comparative measure of hot or cold. See the Wikipedia entry for Thermodynamic temperature for more information.
TemperatureInterval
The difference between two temperatures, where temperature is an objective comparative measure of hot or cold. See the Wikipedia entry for Thermodynamic temperature for more information.
TemperatureIntervalUnits
Units acceptable for use in describing TemperatureInterval quantities.
TemperatureUnits
Units acceptable for use in describing Temperature quantities.
ThermalConductivity
The ability of a material to conduct heat. See the Wikipedia entry for Thermal conductivity for more information.
ThermalConductivityUnits
Units acceptable for use in describing ThermalConductivity quantities.
Time
Represents the time interval physical quantity (one of the seven base SI quantities).
TimeInstant
TimeInstant represents a specific moment in time and its units enable conversion between various time scales.
TimeInstantUnits
Units acceptable for use in describing TimeInstant quantities.
TimeUnits
Units acceptable for use in describing Time quantities.
Torque
The tendency of a force to rotate an object about an axis, fulcrum, or pivot. See the Wikipedia entry for Torque for more information.
TorqueUnits
Units acceptable for use in describing Torque quantities.
Volume
The amount of three-dimensional space enclosed by some closed boundary. See the Wikipedia entry for Volume for more information.
VolumeFlowRate
The volume of fluid which passes per unit time. See the Wikipedia entry for Volumetric flow rate for more information.
VolumeFlowRateUnits
Units acceptable for use in describing VolumeFlowRate quantities.
VolumeUnits
Units acceptable for use in describing Volume quantities.
WaveNumber
The spatial frequency of a wave. See the Wikipedia entry for Wavenumber for more information.
WaveNumberUnits
Units acceptable for use in describing WaveNumber quantities.

Enums

UncertaintyFormat
Whether and how to display a quantity's uncertainty (e.g., compact is 32.324(12), not compact is (32.324 +/- 0.012)).

Mixins

Units
A unit is a particular physical quantity, defined and adopted by convention, with which other particular quantities of the same kind (dimensions) are compared to express their value.

Constants

expUnicodeMap → const Map<String, String>
Maps a digit, decimal point or minus sign string to a unicode exponent character.
twoPi → const double
The value 2 * pi, also known as tau.

Properties

allQuantityTypes Iterable<Type>
Returns an iterable of Type objects representing all of the quantity types supported by this library (for example, Angle, Length, etc.).
no setter
dynamicQuantityTyping bool
Dynamic quantity typing may be turned off for increased efficiency. If false, the result of operations where dimensions may change will be MiscQuantity type objects.
getter/setter pair
logger ↔ Logger
Logger for use across entire library
getter/setter pair

Functions

areWithin(Quantity q1, Quantity q2, Quantity tolerance) bool
Returns whether or not the magnitude of the difference between two quantities is less than or equal to the specified tolerance.
condenseUnicodeSequences(String? input) String?
cosine(Angle a) double
Calculates the cosine of an Angle (adjacent divided by hypotenuse).
createTypedQuantityInstance(Type t, dynamic value, Units? units, {double uncert = 0.0, Dimensions? dimensions}) Quantity
Creates an instance of a typed quantity of type t having the specified value in units.
getDeltaT(TimeInstant time) double
Returns the value 'Delta T,' in seconds, which relates the Terrestrial Dynamical Time scale to measured Universal Time (and indirectly UTC to TAI before 1972, when leap seconds were introduced).
getLeapSeconds(double tai, {bool pre1972LeapSeconds = false}) num
Returns the number of leap seconds in effect for the specified time instant, tai, specified in the TAI time scale. The number of leap seconds relates the UTC time scale to the TAI time scale.
secondsInUtcDay(double utc) double
Calculates and returns the number of seconds (including any leap seconds) that are in the UTC day containing the specified second, utc.
siBaseQuantity(Quantity q) bool
Returns whether or not q is one of the seven SI base quantities.
siDerivedQuantity(Quantity q) bool
Returns whether or not q is a derived quantity (as opposed to one of the seven base SI quantities).
sine(Angle a) double
Calculates the sine of an Angle (opposite divided by hypotenuse).
tangent(Angle a) double
Calculates the tangent of an Angle (opposite divided by adjacent).
unicodeExponent(num exp) String
Returns the unicode symbols that represent an exponent.

Typedefs

FromMksOverride = Number Function(dynamic mks)
ToMksOverride = Number Function(dynamic val)

Exceptions / Errors

DimensionsException
This Exception is thrown when an attempt is made to perform an operation on a Quantity having unexpected or illegal dimensions.
ImmutableQuantityException
This Exception is thrown when an attempt is made to modify an immutable Quantity object (for example through its setMKS method).
QuantityException
The base class for all exceptions thrown in relation to quantities.