Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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
4  
You should post actual code, not images. –  Sektor Apr 4 at 14:57
1  
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 at 15:19
1  
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 at 15:26

1 Answer 1

up vote 5 down vote accepted

How about

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

Your Answer

 
discard

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.