zac-garby / solar-system

A strategy/simulation game.
MIT License
33 stars 17 forks source link

Calculate acceleration in planet surface due to Gravity #42

Open AleCamara opened 6 years ago

AleCamara commented 6 years ago

I think an interesting parameter for planet it's its acceleration due to Gravity in the surface. Given a planet mass (M) in Kg and radius (r) in metres, it's easily calculated using: a = GM/r^2 where G = 6.67x10^(-11) m^3 Kg^(-1) s^(-2). We can display it in the planet info display in multiples of Earth's surface acceleration (e.g. planet Akronos has 1.2 g)

This parameter wouldn't change much directly, but it can be used to affect other parameters. For example, population will be lower on planets with higher gravity, or richer minerals appear on planets with higher gravity.

AleCamara commented 6 years ago

OK, this task is a bit tricky because the current mass and radius of generated planets do not correspond to values similar to Earth.

For example, we generate planet radii around 100k AU, when Earth has radius around 6k Km. Also, generated mass is in the region of 10k yg, when Earth has around 5 yg.

@Zac-Garby I propose we change planet parameters so they fall into a similar region than Earth (in the end, many of them will host people!). This should help in the future when we want to use those parameters to calculate population growth or farming effectiveness, as we can always compare parameters with Earth's parameters.

zac-garby commented 6 years ago

Very nice idea :) Originally, most of the properties were about right, but I think over time people seemed to change them. If anyone wants to do that, you're welcome to, otherwise I'll do it when I get home.

AleCamara commented 6 years ago

I’ll give it a try tonigh. Sounds quite fun! :D