Skip to content

Commit f038007

Browse files
committed
fixed Measurements algebra bug
1 parent 19a24aa commit f038007

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "MeasureSystems"
22
uuid = "ea45d09e-59d0-491b-a101-09823c6a9fd4"
33
authors = ["Michael Reed"]
4-
version = "0.1.3"
4+
version = "0.1.4"
55

66
[deps]
77
Similitude = "d70e672a-ff44-4dfc-8031-4cc812d84922"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ additional constants `molarmass`, `luminousefficacy`, `gravity`, `angle`, `turn`
4646

4747
Physics constant documentation is at https://geophysics.crucialflow.com/dev/constants
4848

49-
Standardized unit/derived quantities are `hyperfine`, `loschmidt`, `wienwavelength`, `wienfrequency`, `mechanicalheat`, `solarmass`, `jupitermass`, `earthmass`, `lunarmass`, `earthradius`, `greatcircle`, `radarmile`, `hubble`, `cosmological`, `radian`, `steradian`, `degree`, `gradian`, `arcminute`, `arcsecond`, `second`, `minute`, `hour`, `day`, `year`, `gaussianyear`, `siderealyear`, `angstrom`, `inch`, `foot`, `surveyfoot`, `yard`, `meter`, `earthmeter`, `mile`, `statutemile`, `meridianmile`, `admiraltymile`, `nauticalmile`, `lunardistance`, `astronomicalunit`, `lightyear`, `parsec`, `barn`, `hectare`, `acre`, `surveyacre`, `liter`, `gallon`, `quart`, `pint`, `cup`, `fluidounce`, `teaspoon`, `tablespoon`, `grain`, `gram`, `earthgram`, `kilogram`, `tonne`, `ton`, `pound`, `ounce`, `slug`, `slinch`, `hyl`, `dyne`, `newton`, `poundal`, `poundforce`, `kilopond`, `psi`, `pascal`, `bar`, `barye`, `technicalatmosphere`, `atmosphere`, `inchmercury`, `torr`, `electronvolt`, `erg`, `joule`, `footpound`, `calorie`, `kilocalorie`, `meancalorie`, `earthcalorie`, `thermalunit`, `gasgallon`, `tontnt`, `watt`, `horsepower`, `horsepowerwatt`, `horsepowermetric`, `electricalhorsepower`, `tonsrefrigeration`, `boilerhorsepower`, `coulomb`, `earthcoulomb`, `ampere`, `volt`, `henry`, `ohm`, `siemens`, `farad`, `weber`, `tesla`, `abcoulomb`, `abampere`, `abvolt`, `abhenry`, `abohm`, `abmho`, `abfarad`, `maxwell`, `gauss`, `oersted`, `gilbert`, `statcoulomb`, `statampere`, `statvolt`, `stathenry`, `statohm`, `statmho`, `statfarad`, `statweber`, `stattesla`, `kelvin`, `rankine`, `celsius`, `fahrenheit`, `sealevel`, `boiling`, `mole`, `earthmole`, `poundmole`, `slugmole`, `slinchmole`, `katal`, `amagat`, `lumen`, `candela`, `lux`, `phot`, `footcandle`, `nit`, `apostilb`, `stilb`, `lambert`, `footlambert`, `bril`, `neper`, `bel`, `decibel`, `hertz`, `rpm`, `kayser`, `diopter`, `bubnoff`, `gforce`, `galileo`, `eotvos`, `darcy`, `poise`, `reyn`, `stokes`, `rayl`, `mpge`, `langley`, `jansky`, `solarflux`, `curie`, `sievert`, `roentgen`, `rem`.
49+
Standardized unit/derived quantities are `hyperfine`, `loschmidt`, `wienwavelength`, `wienfrequency`, `mechanicalheat`, `solarmass`, `jupitermass`, `earthmass`, `lunarmass`, `earthradius`, `greatcircle`, `radarmile`, `hubble`, `cosmological`, `radian`, `steradian`, `degree`, `gradian`, `arcminute`, `arcsecond`, `second`, `minute`, `hour`, `day`, `gaussianmonth`, `siderealmonth`, `synodicmonth`, `year`, `gaussianyear`, `siderealyear`, `jovianyear`, `angstrom`, `inch`, `foot`, `surveyfoot`, `yard`, `meter`, `earthmeter`, `mile`, `statutemile`, `meridianmile`, `admiraltymile`, `nauticalmile`, `lunardistance`, `astronomicalunit`, `jupiterdistance`, `lightyear`, `parsec`, `bubnoff`, `ips`, `fps`, `fpm`, `ms`, `kmh`, `mph`, `knot`, `mps`, `barn`, `hectare`, `acre`, `surveyacre`, `liter`, `gallon`, `quart`, `pint`, `cup`, `fluidounce`, `teaspoon`, `tablespoon`, `grain`, `gram`, `earthgram`, `kilogram`, `tonne`, `ton`, `pound`, `ounce`, `slug`, `slinch`, `hyl`, `dyne`, `newton`, `poundal`, `poundforce`, `kilopond`, `psi`, `pascal`, `bar`, `barye`, `technicalatmosphere`, `atmosphere`, `inchmercury`, `torr`, `electronvolt`, `erg`, `joule`, `footpound`, `calorie`, `kilocalorie`, `meancalorie`, `earthcalorie`, `thermalunit`, `gasgallon`, `tontnt`, `watt`, `horsepower`, `horsepowerwatt`, `horsepowermetric`, `electricalhorsepower`, `tonsrefrigeration`, `boilerhorsepower`, `coulomb`, `earthcoulomb`, `ampere`, `volt`, `henry`, `ohm`, `siemens`, `farad`, `weber`, `tesla`, `abcoulomb`, `abampere`, `abvolt`, `abhenry`, `abohm`, `abmho`, `abfarad`, `maxwell`, `gauss`, `oersted`, `gilbert`, `statcoulomb`, `statampere`, `statvolt`, `stathenry`, `statohm`, `statmho`, `statfarad`, `statweber`, `stattesla`, `kelvin`, `rankine`, `celsius`, `fahrenheit`, `sealevel`, `boiling`, `mole`, `earthmole`, `poundmole`, `slugmole`, `slinchmole`, `katal`, `amagat`, `lumen`, `candela`, `lux`, `phot`, `footcandle`, `nit`, `apostilb`, `stilb`, `lambert`, `footlambert`, `bril`, `neper`, `bel`, `decibel`, `hertz`, `apm`, `rpm`, `kayser`, `diopter`, `gforce`, `galileo`, `eotvos`, `darcy`, `poise`, `reyn`, `stokes`, `rayl`, `mpge`, `langley`, `jansky`, `solarflux`, `curie`, `sievert`, `roentgen`, `rem`.
5050

5151
Standard physics units are at https://geophysics.crucialflow.com/dev/units
5252

src/MeasureSystems.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ Base.:*(a::Constant{D},b::Measurements.Measurement) where D = constant(D)*b
147147
Base.:/(a::Measurements.Measurement,b::Constant{D}) where D = a*inv(b)
148148
Base.:/(a::Constant{D},b::Measurements.Measurement) where D = a*inv(b)
149149
Base.:+(a::Measurements.Measurement,b::Constant{D}) where D = a+constant(D)
150-
Base.:+(a::Constant{D},b::Measurements.Measurement) where D = constant(D)-b
150+
Base.:+(a::Constant{D},b::Measurements.Measurement) where D = constant(D)+b
151151
Base.:-(a::Measurements.Measurement,b::Constant{D}) where D = a-constant(D)
152152
Base.:-(a::Constant{D},b::Measurements.Measurement) where D = constant(D)-b
153153
#=Base.:*(a::Measurements.Measurement,b::Similitude.Constant{D}) where D = a*Constant{D}()
@@ -166,7 +166,7 @@ Base.:*(a::UnitSystems.Constant{D},b::Measurements.Measurement) where D = D*b
166166
Base.:/(a::Measurements.Measurement,b::UnitSystems.Constant{D}) where D = a*inv(b)
167167
Base.:/(a::UnitSystems.Constant{D},b::Measurements.Measurement) where D = a*inv(b)
168168
Base.:+(a::Measurements.Measurement,b::UnitSystems.Constant{D}) where D = a+D
169-
Base.:+(a::UnitSystems.Constant{D},b::Measurements.Measurement) where D = D-b
169+
Base.:+(a::UnitSystems.Constant{D},b::Measurements.Measurement) where D = D+b
170170
Base.:-(a::Measurements.Measurement,b::UnitSystems.Constant{D}) where D = a-D
171171
Base.:-(a::UnitSystems.Constant{D},b::Measurements.Measurement) where D = D-b
172172
const mP = measurement("0.00000002176434(24)")
@@ -191,7 +191,7 @@ import UnitSystems: RK1990,KJ1990,𝟏,𝟐,𝟑,𝟓,𝟕,𝟏𝟎,𝟏𝟏,
191191
const RK90,KJ90 = RK1990,KJ1990
192192
end
193193

194-
const LD = Constant(UnitSystems.LD)
194+
const LD,JD = Constant(384399)*𝟏𝟎^3,Constant(778479)*𝟏𝟎^6
195195
const μE☾ = Constant(measurement("81.300568(3)"))
196196

197197
import UnitSystems: GaussSystem, ElectricSystem, EntropySystem, AstronomicalSystem, unitname, normal

0 commit comments

Comments
 (0)