Add the Universal Gravitational Constant
It would be nice if mathjs had the Universal Gravitational Constant (G) as one of it's constants. I would think that it would be an uppercase G, as it's referred to normally, although depending on how other constants are defined it could also be lowercase.
Because it's so hard to measure with accuracy though, there are many different values of G, but the one that seems to be most commonly used in code is 6.67430e-11.
Thanks for your suggestion. Would be nice to add this constant. I think it makes sense to name it G indeed.
Anyone interested in creating a PR with this new unit?
Impulsively committed. please ignore
This is the very first physical constant defined in this library. It would be nice to define more of them (e.g. Planck's constant, speed of light, electron's charge, Boltzmann constant, fine-structure constant, etc.) and classify them into separate categories. Additionally, defining some of them (eight will be enough to define time, meter, kilogram, ampere, kelvin, mole, and candela) and deriving the others from the basic and unitless constants is recommended. Despite the precision error, the value will likely always be in line with one another.
Actually there are quite some physical constants defined already, see /src/type/unit/physicalConstants.js
But aren't the gravitational constant already defined there? Are we adding some alias for this constant?
o wow you're right, I hadn't realized that.
@thonkinator does the gravitationConstant solve your problem? I think if you want you can always define G=gravitationConstant to have a shorter name.
As it appears the feature desired is already present in mathjs (albeit under a different name), closing.