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
blog:articles:software:surface_gravity_calc [2019/05/18 04:17] Phil Ideblog:articles:software:surface_gravity_calc [2021/05/20 08:59] (current) Phil Ide
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
 +
 +This function is included in [[blog:articles:software:orbital_calculator|Orbital Calculator]], where it automatically calculates this when displaying object data (in the menu item **Gravitational Masses/Manage**)
  
 <JS> <JS>
Line 20: Line 22:
     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.1558153037.txt.gz · Last modified: 2019/05/18 04:17 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