Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I like using mathematica to do my physics homework, and AstronomicalData is useful for that, but it doesn't seem to work properly with units.

[the question is, at what height is the gravitational acceleration 4.9 meters per second square enter image description here

Is there a way to get AstronomicalData to output with units?

share|improve this question
You should post actual code, not images. – Sektor Apr 4 '14 at 14:57
If I were your teacher, I would frown on the large amount of data you "consume", and would appreciate a lean and mean Solve[9.81*r^2 == 4.9*(r + \[Delta])^2, \[Delta]] which results in {\[Delta]->0.414935 r} as positive solution. So 141.49% of earth's radius. But then again, tastes differ. – Wouter Apr 4 '14 at 15:19
AstronomicalData is older than the units. But, from what we can see in the new WL documentation, they will start coming with units. – Rojo Apr 4 '14 at 15:26
up vote 5 down vote accepted

How about

m = Quantity[AstronomicalData["Earth", "Mass"], AstronomicalData["Earth", "Mass", "Units"]]
5.9721986*10^24 kg
m // FullForm
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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