From 4efd0ea892afa43b53dc6106c484ab79daf6f428 Mon Sep 17 00:00:00 2001 From: Mohammed Anas Date: Tue, 2 Jan 2024 00:13:25 +0000 Subject: [PATCH] Add some units --- book/src/list-units.md | 7 ++++++- numbat/modules/units/misc.nbt | 18 +++++++++++++++++- numbat/modules/units/placeholder.nbt | 12 ++++++++++++ 3 files changed, 35 insertions(+), 2 deletions(-) diff --git a/book/src/list-units.md b/book/src/list-units.md index 37aa8cef..1e907731 100644 --- a/book/src/list-units.md +++ b/book/src/list-units.md @@ -14,7 +14,7 @@ and — where sensible — units allow for [binary prefixes](https://en.wikipedi | `Angle` | [Minute of arc](https://en.wikipedia.org/wiki/Minute_and_second_of_arc) | `arcmin`, `arcminute`, `arcminutes` | | `Angle` | [Second of arc](https://en.wikipedia.org/wiki/Minute_and_second_of_arc) | `arcsec`, `arcsecond`, `arcseconds` | | `Angle` | [Degree](https://en.wikipedia.org/wiki/Degree_(angle)) | `deg`, `degree`, `degrees`, `°` | -| `Angle` | [Gradian](https://en.wikipedia.org/wiki/Gradian) | `gon` | +| `Angle` | [Gradian](https://en.wikipedia.org/wiki/Gradian) | `gon`, `gons`, `grad`, `grade`, `grades`, `gradian`, `gradians`, `grads` | | `Angle` | [Radian](https://en.wikipedia.org/wiki/Radian) | `rad`, `radian`, `radians` | | `Angle` | [Revolution](https://en.wikipedia.org/wiki/Revolution_(unit)) | `rev`, `revolution`, `revolutions` | | `Angle` | [Turn](https://en.wikipedia.org/wiki/Turn_(geometry)) | `turn`, `turns` | @@ -23,6 +23,8 @@ and — where sensible — units allow for [binary prefixes](https://en.wikipedi | `Area` | [Barn](https://en.wikipedia.org/wiki/Barn_(unit)) | `barn`, `barns` | | `Area` | [Football field](https://en.wikipedia.org/wiki/Football_pitch) | `footballfield` | | `Area` | [Hectare](https://en.wikipedia.org/wiki/Hectare) | `ha`, `hectare`, `hectares` | +| `Beat` | [Beat](https://en.wikipedia.org/wiki/Beat_(music)) | `beat`, `beats` | +| `Beat / Time` | [Beats per minute](https://en.wikipedia.org/wiki/Tempo) | `bpm`, `BPM` | | `Capacitance` | [Farad](https://en.wikipedia.org/wiki/Farad) | `F`, `farad`, `farads` | | `CatalyticActivity` | [Katal](https://en.wikipedia.org/wiki/Katal) | `kat`, `katal`, `katals` | | `Current` | [Ampere](https://en.wikipedia.org/wiki/Ampere) | `A`, `ampere`, `amperes` | @@ -76,6 +78,7 @@ and — where sensible — units allow for [binary prefixes](https://en.wikipedi | `Length` | [Nautical Mile](https://en.wikipedia.org/wiki/Nautical_mile) | `nautical_mile`, `nautical_miles`, `NM`, `nmi` | | `Length` | [Parsec](https://en.wikipedia.org/wiki/Parsec) | `parsec`, `parsecs`, `pc` | | `Length` | [Planck length](https://en.wikipedia.org/wiki/Planck_length) | `planck_length` | +| `Length` | [Rack unit](https://en.wikipedia.org/wiki/Rack_unit) | `rackunit`, `rackunits`, `RU`, `U` | | `Length` | [US rod](https://en.wikipedia.org/wiki/Rod_(unit)) | `perch`, `rod`, `rods` | | `Length` | [Smoot](https://en.wikipedia.org/wiki/Smoot) | `smoot` | | `Length` | [Stoney length](https://en.wikipedia.org/wiki/Stoney_units) | `stoney_length` | @@ -142,7 +145,9 @@ and — where sensible — units allow for [binary prefixes](https://en.wikipedi | `Pressure` | [Standard atmosphere](https://en.wikipedia.org/wiki/Standard_atmosphere_(unit)) | `atm`, `atmosphere`, `atmospheres` | | `Pressure` | [Bar](https://en.wikipedia.org/wiki/Bar_(unit)) | `bar`, `bars` | | `Pressure` | [Inch of mercury](https://en.wikipedia.org/wiki/Inch_of_mercury) | `inHg` | +| `Pressure` | [Kilopound-force per square inch](https://en.wikipedia.org/wiki/Ksi_(unit)) | `ksi`, `KSI` | | `Pressure` | [Millimeter of mercury](https://en.wikipedia.org/wiki/Millimeter_of_mercury) | `mmHg` | +| `Pressure` | [Megapound-force per square inch](https://en.wikipedia.org/wiki/Ksi_(unit)) | `mpsi`, `MPSI` | | `Pressure` | [Pascal](https://en.wikipedia.org/wiki/Pascal_(unit)) | `Pa`, `pascal`, `pascals` | | `Pressure` | [Pound-force per square inch](https://en.wikipedia.org/wiki/Pounds_per_square_inch) | `psi`, `PSI` | | `Pressure` | [Torr](https://en.wikipedia.org/wiki/Torr) | `torr` | diff --git a/numbat/modules/units/misc.nbt b/numbat/modules/units/misc.nbt index 5600818e..2e35c909 100644 --- a/numbat/modules/units/misc.nbt +++ b/numbat/modules/units/misc.nbt @@ -77,6 +77,16 @@ unit torr: Pressure = 101325 / 760 × pascal @aliases(PSI: short) unit psi: Pressure = 6.894757 kPa +@name("Kilopound-force per square inch") +@url("https://en.wikipedia.org/wiki/Ksi_(unit)") +@aliases(KSI: short) +unit ksi: Pressure = 1000 psi + +@name("Megapound-force per square inch") +@url("https://en.wikipedia.org/wiki/Ksi_(unit)") +@aliases(MPSI: short) +unit mpsi: Pressure = 1000000 psi + @name("Standard atmosphere") @url("https://en.wikipedia.org/wiki/Standard_atmosphere_(unit)") @aliases(atmospheres, atm: short) @@ -100,6 +110,11 @@ unit footballfield: Area = 105 m × 68 m # Standard FIFA football pitch @url("https://en.wikipedia.org/wiki/Olympic-size_swimming_pool") unit swimmingpool: Volume = 50 m × 25 m × 2 m # Olympic-size swimming pool (FR3) +@name("Rack unit") +@url("https://en.wikipedia.org/wiki/Rack_unit") +@aliases(rackunits, RU: short, U: short) +unit rackunit: Length = 0.04445 meter + # Angles @name("Turn") @@ -109,7 +124,8 @@ unit turn: Angle = 2 π rad @name("Gradian") @url("https://en.wikipedia.org/wiki/Gradian") -unit gon: Angle = 90° / 100 +@aliases(gradians, grad, grads, grade, grades, gon, gons) +unit gradian: Angle = 90° / 100 ### Abbreviations diff --git a/numbat/modules/units/placeholder.nbt b/numbat/modules/units/placeholder.nbt index 44ca5945..d2aede01 100644 --- a/numbat/modules/units/placeholder.nbt +++ b/numbat/modules/units/placeholder.nbt @@ -39,6 +39,18 @@ unit frame: Frame @url("https://en.wikipedia.org/wiki/Frame_rate") unit fps: Frame / Time = frame / second +# Basic unit of time in music +dimension Beat + +@name("Beat") +@url("https://en.wikipedia.org/wiki/Beat_(music)") +@aliases(beats) +unit beat: Beat + +@name("Beats per minute") +@url("https://en.wikipedia.org/wiki/Tempo") +@aliases(BPM: short) +unit bpm: Beat / Time = beat / minute # A separate or limited portion or quantity of something dimension Piece