0
$\begingroup$

Hello all and thank you for reading.

I am creating a program in Unity where I recreate the earth-moon orbit. Unity struggles with numbers so large when I write code in meters and kilograms so I made my own units. 1 unit of mass = the earth's mass (5.9736f*10^24 kg). 1 unit of length is the Earth's Diameter (12,756,000m) and the distance between the earth and the moon at a supermoon is 28.222 units of length (360,000,000m). In this world, what is the gravitational constant? I have done the math in two ways and gotten answers orders of magnitude different. I am officially giving up and asking for help from the internet.

Any help is really appreciated and please show work, I am dying to know how this is done.

$\endgroup$
9
  • $\begingroup$ You need to specify an appropriate unit of time as well. $\endgroup$
    – G. Smith
    Apr 20, 2020 at 4:16
  • $\begingroup$ I was afraid someone would say this. Can I assume the framerate of the game is equal to a second? $\endgroup$ Apr 20, 2020 at 4:19
  • $\begingroup$ It takes a month for the Moon to go around the Earth. Do you want the player to have to play for a month to see one orbit? If not, “game time” can’t be “orbit time”. But you can certainly update the screen once per second, if you want a jerky game. $\endgroup$
    – G. Smith
    Apr 20, 2020 at 4:22
  • $\begingroup$ If you want a value of $G$ that isn’t too big or small, you need to pick a unit of time like a day or a month. $\endgroup$
    – G. Smith
    Apr 20, 2020 at 4:24
  • $\begingroup$ Agreed. I am new to unity as well as physics. This issue is on my radar, but I wanted to get the question above squared away first. If you have Unity experience, I'd love some guidance on accelerating time. $\endgroup$ Apr 20, 2020 at 4:25

2 Answers 2

0
$\begingroup$

The SI value of the gravitational constant is

$$G=6.674\times 10^{-11}\frac{\text{meter}^3}{\text{kilogram}\,\text{second}^2}.$$

Define your new units (with the time unit taken from your comment):

$$1\text{ MyLengthUnit}=1.2756\times 10^7\text{ meters};$$

$$1\text{ MyMassUnit}=5.9736\times 10^{24}\text{ kilograms};$$

$$1\text{ MyTimeUnit}=13.5\text{ days}=1.1664\times 10^6\text{ seconds}.$$

Then in terms of your units, the SI units are

$$1\text{ meter}=\frac{1}{1.2756\times 10^7}\text{ MyLengthUnit};$$

$$1\text{ kilogram}=\frac{1}{5.9736\times 10^{24}}\text{ MyMassUnit};$$

$$1\text{ second}=\frac{1}{1.1664\times 10^6}\text{ MyTimeUnit}.$$

This means that

$$\begin{align} G&=6.674\times 10^{-11}\frac{\left(\frac{1}{1.2756\times 10^7}\text{ MyLengthUnit}\right)^3}{\left(\frac{1}{5.9736\times 10^{24}}\text{ MyMassUnit}\right)\left(\frac{1}{1.1664\times 10^6}\text{ MyTimeUnit}\right)^2}\\ &=\frac{(6.674\times 10^{-11})(5.9736\times 10^{24})(1.1664\times 10^6)^2}{(1.2756\times 10^7)^3}\frac{\text{MyLengthUnit}^3}{\text{MyMassUnit}\,\text{MyTimeUnit}^2}\\ &=261321\frac{\text{MyLengthUnit}^3}{\text{MyMassUnit}\,\text{MyTimeUnit}^2}. \end{align}$$

(I kept a few too many (in)significant digits in the final integral value.)

$\endgroup$
1
  • $\begingroup$ This works perfectly. Thank you so much! $\endgroup$ Apr 20, 2020 at 17:13
0
$\begingroup$

Your answer is 1.4636*10^25

The unit is : Newton-"your unit for length"^2/"your unit for mass"^2

The Gravitational constant is the force between two unit mass separated with a distance between their centers equal to unit length. In your case you know the unit mass and unit length. Just use the law of gravitation of find the force.

F = (G * M^2)/R^2

where M is your unit mass = 5.9736*10^24 kg and R is your unit length = 12,756,000 m

when you put this in a calculator you get the answer as 1.463623783*10^25 (you can round this off).

$\endgroup$

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