Difference between revisions of "User:Aru"

From Kerbal Space Program Wiki
Jump to: navigation, search
 
(5 intermediate revisions by the same user not shown)
Line 2: Line 2:
  
 
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. 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.
 
There were some spastic issues which I had a hard time fixing. I honestly don't understand what was wrong, but it has fixed itself. Perhaps, the more I messed with it, the more I forced the wiki to re-update, and eventually things settled into place. That doesn't entirely make sense, because I added new values to all bodies, didn't remove any, then changed some formulas to use the new values, which doesn't really explain anything. For example, I added and removed an equals sign next to the empty apoapsis property for the Mun, and the set of errors displayed by the page was different each time I toggled it, until the final one removed all the errors. But I'm pretty sure that it should technically be the same either way.
 
 
Anyway, I will convert some more stuff later, fix and maybe remove/add Body data sub-templates, for example nothing uses Body data/Gravity now that it's a base stat, but maybe I'll move something else to a sub template? Also change the pressure unit in /Param from atm to kPa as the game code uses, but that requires editing all the param pages again. 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.
 
  
 
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.
 
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.
  
Apoapsis, periapsis, and mass will be removed from the param pages later, once no more formulas use them.
+
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:
 
NOW I learn about this thing here:
Line 17: Line 13:
 
Here have some numbers.
 
Here have some numbers.
 
http://freetexthost.com/0u2zxcxepd
 
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.
 
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.