11
$\begingroup$

AstronomicalData objects are consistently in SI units:

AstronomicalData["Mars", "Radius"]
(* Quantity[3.386*10^6, "Meters"] *)

AstronomicalData["Mars", "Density"]
(* Quantity[3934.0, ("Kilograms")/("Meters")^3] *)

However, PlanetData objects are not consistent anymore (miles are not cgs!):

PlanetData["Mars", "Radius"]
(* Quantity[2104., "Miles"] *)

PlanetData["Mars", "Density"]
(* Quantity[3.9340, ("Grams")/("Centimeters")^3] *)

Is there any way to force Mathematica into using consistent units and, even better, into SI units? I do not want to use UnitConvert as this makes the code really unreadable, what I want is curated data delivered in SI units.

$\endgroup$
  • $\begingroup$ At least, PlanetData["Mars", "Radius"] will now return a result in kilometers. $\endgroup$ – J. M. will be back soon May 31 '16 at 9:54
15
$\begingroup$

At the beginning of your notebook set the Metric system as default.

$UnitSystem = "Metric"

This works for me. If not try below suggestion Remember you are reading the data from wolfram alpha! it's a regional thing so if the upper solution didn't work, you can try something like (I don't remember exactly though)

SetOptions[WolframAlpha, PodStates -> {"Show metric"}]
$\endgroup$
  • 1
    $\begingroup$ Thank you, that at least gives answers in km instead of miles. However, the inconsistency is still there (cgs for PlanetData and SI for AstronomicalData). $\endgroup$ – leosenko Sep 16 '15 at 18:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.