Difference between revisions of "User:Aru"

From Kerbal Space Program Wiki
Jump to: navigation, search
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
I am working on it.
+
I made a bunch of changes.
  
There's something wrong which only manifests on the Mun page. The given errors seem to be misleading, I am searching for what I did wrong.
+
The idea is that the wiki now calculates all of the same stats as the game itself, from the same base stats, with the same formulas. Optimal accuracy, no redundancy. I also copied many of those exact base stats over. Many people use the wiki's calculations as references, so it makes sense for it to use the same exact underlying constants which define the KSP universe, rounding errors and all.
  
The idea is that the wiki now calculates all of the same stats as the game itself, from the same base stats, with the same formulas. Optimal accuracy, no redundancy.
+
Note that while surface gravity and pressure were presumably chosen as multiples of Kerbin's (9.81 m/s^2 and atm), the base numbers directly used by the game now are in units of surface gravity of Earth (9.80665 m/s^2) and kPa. For example 1.00034160493135 is Kerbin's true, exact surface gravity (except for the rounding error from a single conversion from binary to decimal), which when multiplied by 9.80665 is 9.810000000000024.
  
Circular references maybe? But, I did not yet remove any of the existing values. I've gone back and changed a few other formulas to use the new base stats instead of the old anyway, trying to fix whatever's wrong.
+
I'm way too tired for anything else now, my mad confused scramble to get the pages displaying without red error text is done and that's good enough for now. Please have patience and don't be mad at me, I will make sure everything is tidy, consistent and sensible later. Things did not click into place like I'd hoped, I scrambled in self doubt, but it turns out editing templates is messy because of server cache and I was on the right track to start with.
 +
 
 +
NOW I learn about this thing here:
 +
https://meta.wikimedia.org/w/index.php?title=Template:Purge&action=edit
 +
If I'd known this existed, I probably could have immediately stopped after the first large edit to infobox/Part, instead of mixing my changes together to try to get it to work. Oh well, could have saved myself some stress. I will still clean things up and finish the job later, including the template documentation.
 +
 
 +
Here have some numbers.
 +
http://freetexthost.com/0u2zxcxepd
 +
The "curve"s are splines of cubic equations, each line of numbers ("key" / keyframe) is a point between equations, giving altitude (x), value (y), and slope on each side. This is Unity engine's AnimationCurve. It is almost the same as a cubic Hermite spline, except that Unity's version allows different slopes on each side of the keyframes (discontinuous in the first derivative). Kerbin's pressure curve uses the same slope on both sides, but others do not.
 +
 
 +
 
 +
To do: update template documentation, remove gravity subtemplate, maybe add new subtemplates to replace it (only if they can be used more than once), make sure apside and mass references are gone, /Param pages: change pressure from atm to base kPa, remove apsides and mass.
 +
 
 +
Right now I'm trying to derive a fully accurate formula for calculating the duration in umbra (complete shadow) while orbiting a planet. It's quite complicated, to do it right involves finding positions which have a tangent line touching the surface of both Kerbol and the planet which also intersects the subject's orbit. One for entering umbra, one for exiting, and calculating the time between them. Anyway, I suspect that the current calculation of eclipse duration, which is only shown on moon pages, is so inaccurate that it should be taken down. I've read other people complaining about them. In the process, this will remove the last calculation which requires apoapsis and periapsis, and THEN I will remove the orphaned values from the body /Param pages. But, I may not make any changes until I finish this derivation. I figured out how to find the satellite's true anomaly at the two syzygy points (perfect alignment of sun, planet, satellite), but I'm not yet certain that this is necessarily always the longest total eclipse.

Latest revision as of 21:20, 10 September 2017

I made a bunch of changes.

The idea is that the wiki now calculates all of the same stats as the game itself, from the same base stats, with the same formulas. Optimal accuracy, no redundancy. I also copied many of those exact base stats over. Many people use the wiki's calculations as references, so it makes sense for it to use the same exact underlying constants which define the KSP universe, rounding errors and all.

Note that while surface gravity and pressure were presumably chosen as multiples of Kerbin's (9.81 m/s^2 and atm), the base numbers directly used by the game now are in units of surface gravity of Earth (9.80665 m/s^2) and kPa. For example 1.00034160493135 is Kerbin's true, exact surface gravity (except for the rounding error from a single conversion from binary to decimal), which when multiplied by 9.80665 is 9.810000000000024.

I'm way too tired for anything else now, my mad confused scramble to get the pages displaying without red error text is done and that's good enough for now. Please have patience and don't be mad at me, I will make sure everything is tidy, consistent and sensible later. Things did not click into place like I'd hoped, I scrambled in self doubt, but it turns out editing templates is messy because of server cache and I was on the right track to start with.

NOW I learn about this thing here: https://meta.wikimedia.org/w/index.php?title=Template:Purge&action=edit If I'd known this existed, I probably could have immediately stopped after the first large edit to infobox/Part, instead of mixing my changes together to try to get it to work. Oh well, could have saved myself some stress. I will still clean things up and finish the job later, including the template documentation.

Here have some numbers. http://freetexthost.com/0u2zxcxepd The "curve"s are splines of cubic equations, each line of numbers ("key" / keyframe) is a point between equations, giving altitude (x), value (y), and slope on each side. This is Unity engine's AnimationCurve. It is almost the same as a cubic Hermite spline, except that Unity's version allows different slopes on each side of the keyframes (discontinuous in the first derivative). Kerbin's pressure curve uses the same slope on both sides, but others do not.


To do: update template documentation, remove gravity subtemplate, maybe add new subtemplates to replace it (only if they can be used more than once), make sure apside and mass references are gone, /Param pages: change pressure from atm to base kPa, remove apsides and mass.

Right now I'm trying to derive a fully accurate formula for calculating the duration in umbra (complete shadow) while orbiting a planet. It's quite complicated, to do it right involves finding positions which have a tangent line touching the surface of both Kerbol and the planet which also intersects the subject's orbit. One for entering umbra, one for exiting, and calculating the time between them. Anyway, I suspect that the current calculation of eclipse duration, which is only shown on moon pages, is so inaccurate that it should be taken down. I've read other people complaining about them. In the process, this will remove the last calculation which requires apoapsis and periapsis, and THEN I will remove the orphaned values from the body /Param pages. But, I may not make any changes until I finish this derivation. I figured out how to find the satellite's true anomaly at the two syzygy points (perfect alignment of sun, planet, satellite), but I'm not yet certain that this is necessarily always the longest total eclipse.