0
$\begingroup$

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?

$\endgroup$
  • 4
    $\begingroup$ You should post actual code, not images. $\endgroup$ – Sektor Apr 4 '14 at 14:57
  • 1
    $\begingroup$ 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. $\endgroup$ – Wouter Apr 4 '14 at 15:19
  • 1
    $\begingroup$ AstronomicalData is older than the units. But, from what we can see in the new WL documentation, they will start coming with units. $\endgroup$ – Rojo Apr 4 '14 at 15:26
5
$\begingroup$

How about

m = Quantity[AstronomicalData["Earth", "Mass"], AstronomicalData["Earth", "Mass", "Units"]]
5.9721986*10^24 kg
m // FullForm
Quantity[5.9721985999999999999999999999999999999999202`8.*^24,"Kilograms"]
$\endgroup$

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.