Philip P. Ide

Author, programmer, science enthusiast, half-wit.
Life is sweet. Have you tasted it lately?

User Tools

Site Tools


blog:articles:software:surface_gravity_calc

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
blog:articles:software:surface_gravity_calc [2019/03/14 12:27] Phil Ideblog:articles:software:surface_gravity_calc [2019/05/18 04:18] Phil Ide
Line 1: Line 1:
 ====== Surface Gravity Calculator ====== ====== Surface Gravity Calculator ======
-Want to know what the surface gravity is on any celestial object? You just need to know it's mass in terms of Earth masses (e.g. Earth = 1, Venus = 0.815, Mars = 0.107 etc.) and it's radius. This online calculator will do the rest.+Want to know what the surface gravity is on any celestial object? You just need to know it's mass in terms of Earth masses (e.g. Earth = 1, Venus = 0.815, Mars = 0.107 etc.) and it's radius. This calculator will do the rest.
 === === === ===
 | Radius of your planet|<html><input type=number step="0.01" id=radius value=3000></html> km| e.g. Earth=6378| | Radius of your planet|<html><input type=number step="0.01" id=radius value=3000></html> km| e.g. Earth=6378|
Line 7: Line 7:
 <html><div>Result: <div id=result style='display:inline;'></div></div></html> <html><div>Result: <div id=result style='display:inline;'></div></div></html>
  
-The result shows the gravity in terms of Earth gravities (1 Earth gravity = 1 gravity (aka gee)).\\+The result shows the gravity in terms of Earth gravities (1 Earth gravity = 1g).\\
 A result of 1 gravity = 1 Earth gravity, or put another way 100% Earth gravity\\ A result of 1 gravity = 1 Earth gravity, or put another way 100% Earth gravity\\
 A result of 1.5 gravity = 150% Earth gravity A result of 1.5 gravity = 150% Earth gravity
Line 20: Line 20:
     g = g/9.8; // newtons to kilograms     g = g/9.8; // newtons to kilograms
     g = Math.round(g*100)/100; // round with 2 decimal places     g = Math.round(g*100)/100; // round with 2 decimal places
-    document.getElementById('result').innerHTML = '<b>'+g+' gravity</b>';+    document.getElementById('result').innerHTML = '<b>'+g+'g</b>';
 } }
 </JS> </JS>
blog/articles/software/surface_gravity_calc.txt · Last modified: 2021/05/20 08:59 by Phil Ide

Except where otherwise noted, content on this wiki is licensed under the following license: Copyright © Phil Ide
Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki