Open Paalon opened 6 years ago
Yeah, my goal is to eventually include all constants, but first I'd like to sort out how to best serve users (see issues #1 and #2)
One of my favorite constants that shows up from time to time is the impedance of free space :). Z0 = 119.91698326550797 * pi Units are in Ohms :)
Is this issue still followed up?
Not really because I don't think I found a good way to automatically dump the entire list of constants, but you're definitely welcome to contribute your favourite ones! Feel free to ask for help in case you need it :wink:
I think an automatic dump is not really necessary, because it's a fixed list which doesn't change on a daily basis. Once the values are defined the maintenance effort updating it to a new CODATA list should be manageable. I think you will go for it with a PR the next few days ;-)
I tried to define the vacuum impedance as @derived_constant
, which looks like:
derived_constant(VacuumImpedance, Z_0, "Characteristic impedance of vacuum", 376.730_313_666_853_5, ustrip(big(µ_0) * big(c_0)), Ω, measurement(µ_0)*measurement(c_0), measurement(BigFloat, µ_0)*measurement(BigFloat, c_0), "CODATA 2018")
but I always get an error w.r.t. to the uncertainties (5.696056702e-8 != 5.6960567020000004e-8).
Can you help me out, where my definition fails? Thanks!
I've added Z_0 to CODATA 2018 in https://github.com/JuliaPhysics/PhysicalConstants.jl/commit/03abe02aca18c0d38c64a3c33b9fd025a86dc891 (not sure why I didn't include it initially :thinking:). Note that CODATA 2018 doesn't define it as a derived constant: https://physics.nist.gov/cgi-bin/cuu/Value?z0
module CODATA2014 lacks many constants https://physics.nist.gov/cuu/Constants/Table/allascii.txt They should be included.