-
Posts
3,934 -
Joined
-
Last visited
Content Type
Profiles
Forums
Developer Articles
KSP2 Release Notes
Status Replies posted by OhioBob
-
Hi Bob. I was told that you wrote http://www.braeunig.us/space/orbmech.htm. Thanks a lot - it's really useful, but I am a bit stuck on the math in the article. I've posted my questions on reddit. I would appreciate if you helped me to understand your article better and perhaps you could also improve it to make it more easy to understand for dummies like me :-).
-
Currently creating a spreadsheet to compute a majority of the config file of a planet automatically, up to automatically generating a majority of the atmo curves and creating a basic config file that can easily be copied-N-pasted into a text editor for further editing.
I'm now making a generator for temperatureAxialSunBiasCurve, which definitely has the most complicated formula's of all of these curves.
It'll still take quite a while to finish it, but it should greatly speed up the generation process of realistic planets.
Special thanks goes to @OhioBob for explaining the complicated yet fascinating subject of atmospheres to me.
-
I presume the three curves are pressureCurve, temperatureCurve, and temperatureSunMultCurve? Those curves are all important, but it's incomplete. At a minimum there should also be temperatureLatitudeBiasCurve and temperatureLatitudeSunMultCurve. These additional curves define the latitudinal and diurnal temperature variations of the planet. By not providing these curves, the curves of the template are used by default.
And even if KillAshley does keep his spreadsheet complete and up to date, there's no harm in having another one. There is certainly more than one way to automate this process. A planet developer can choose which spreadsheet he likes better.
-
-
Currently creating a spreadsheet to compute a majority of the config file of a planet automatically, up to automatically generating a majority of the atmo curves and creating a basic config file that can easily be copied-N-pasted into a text editor for further editing.
I'm now making a generator for temperatureAxialSunBiasCurve, which definitely has the most complicated formula's of all of these curves.
It'll still take quite a while to finish it, but it should greatly speed up the generation process of realistic planets.
Special thanks goes to @OhioBob for explaining the complicated yet fascinating subject of atmospheres to me.
-
@Axilourous, yes, that's my understanding, though I've never seen it. I'm also pretty sure that it omits some of the temperature curves. If most of the planet mods out there had their atmospheres computed using KillAshley's spreadsheet, then it appears the spreadsheet includes only a small number of the available features. All the Kopernicus configs I've seen (not counting the ones for which I did the atmospheres) include only three atmosphere curves. There are, in fact, eight different curves, five of which I'd consider essential. The other three curves were added about a year ago, and I'm pretty sure KillAshley's spreadsheet is older than that. KillAshley's spreadsheet was probably a terrific tool when it was first introduced, but I believe it is likely now outdated.
My spreadsheet will implement all the available features, and produce all eight atmosphere curves.
-
-
Currently creating a spreadsheet to compute a majority of the config file of a planet automatically, up to automatically generating a majority of the atmo curves and creating a basic config file that can easily be copied-N-pasted into a text editor for further editing.
I'm now making a generator for temperatureAxialSunBiasCurve, which definitely has the most complicated formula's of all of these curves.
It'll still take quite a while to finish it, but it should greatly speed up the generation process of realistic planets.
Special thanks goes to @OhioBob for explaining the complicated yet fascinating subject of atmospheres to me.
-
@The White Guardian, I'm also currently working on a spreadsheet that will auto-generate the atmosphere curves. The user still has to input quite a bit of information, but there shouldn't be an math needed. The spreadsheet should do all the computations. I'm not quite sure how I'm going to handle the ending point of an atmosphere, however. That's the last part I plan to work on. I'll share it with you when I'm finished.
-
-
Hi OhioBob.
Nathankell suggested I contact you about the nature of the atmosphere in KSP...so here I am. I am at this time working on the static pressures (will tackle static temp after and am collecting data for both) on Kerbin using graphotron 2000. I really don't know much since I have only run numbers on one csv data output (though I have several more wait for analysis) at this point but I will give you my best guess on how I expect static pressure on kerbin to work.
I am guessing that all though the planet rotates every 6 hours the Atmosphere behaves as if it only rotates once a year. (which is to say there should be a174 mph wind at the equator but ... there is no wind in ksp) In other words the temp and pressure above the point 0o 0' 0" latitude and 0o 0' 0" longitude at noon each kerbin day has the highest Temp and lowest pressure at the surface of any point on kerbin at that time. I am further guessing that the pressure with altitude follows the following formula Atmospheric Pressure= Caltitude*e-(A)*Altitude(m)
Pressure versus change in longitude with a fixed time and fixed altitude would follow; pressure=Clogitude*cos(beta)and pressure versus change in latitude with a fixed time and fixed altitude would be; pressure=Clatitude*sin(theta/2)
(this should all be in spherical coordinates)
Am I even in the right ball park? Please feel free to correct me or to tell me I am crazy. I really am looking to derive, from experimental data if necessary a three dimensional formula that will yield the static air pressure (and temperature eventually) for any place and time on kerbin and eventually the other planets with atmospheres as well.
I of course don't have a strong need to do all the work myself, no need to reinvent the wheel if the work is already done, so if you have already figured all this out please feel free to share.
Much of my calculus is very rusty so please go easy on me.
Looking forward to your thoughts.and Thank You,
mcirish3
-
I just thought of something... For a planet in an elliptical orbit, the length of the solar day is not constant. This isn't a problem for Kerbin since its orbit is circular, but it will be for the other planets. A planet's angular velocity is greater near perihelion, therefore it should take slightly longer for the Sun to return to the same meridian each day than it does when the planet is near aphelion. (The formula given earlier gives the average length of the solar day.) Therefore, computing the hour angle at a specific location and time requires computing the celestial longitude of the sun, the celestial longitude of the surface site, and taking the difference.
I think the method described in my last post can be used to compute the longitude of the surface site (first half of post), but the part about computing the hour angle I think is useless (second half of post). Once you have the longitude of the prime meridian at 0s UT, you should be able to compute the longitude of any site and any time.
You can use the following method to compute the heliocentric longitude of the planet, getting the orbital elements from the Wiki.
http://www.braeunig.us/space/plntpos.htm#coordinates
-
-
Hi OhioBob.
Nathankell suggested I contact you about the nature of the atmosphere in KSP...so here I am. I am at this time working on the static pressures (will tackle static temp after and am collecting data for both) on Kerbin using graphotron 2000. I really don't know much since I have only run numbers on one csv data output (though I have several more wait for analysis) at this point but I will give you my best guess on how I expect static pressure on kerbin to work.
I am guessing that all though the planet rotates every 6 hours the Atmosphere behaves as if it only rotates once a year. (which is to say there should be a174 mph wind at the equator but ... there is no wind in ksp) In other words the temp and pressure above the point 0o 0' 0" latitude and 0o 0' 0" longitude at noon each kerbin day has the highest Temp and lowest pressure at the surface of any point on kerbin at that time. I am further guessing that the pressure with altitude follows the following formula Atmospheric Pressure= Caltitude*e-(A)*Altitude(m)
Pressure versus change in longitude with a fixed time and fixed altitude would follow; pressure=Clogitude*cos(beta)and pressure versus change in latitude with a fixed time and fixed altitude would be; pressure=Clatitude*sin(theta/2)
(this should all be in spherical coordinates)
Am I even in the right ball park? Please feel free to correct me or to tell me I am crazy. I really am looking to derive, from experimental data if necessary a three dimensional formula that will yield the static air pressure (and temperature eventually) for any place and time on kerbin and eventually the other planets with atmospheres as well.
I of course don't have a strong need to do all the work myself, no need to reinvent the wheel if the work is already done, so if you have already figured all this out please feel free to share.
Much of my calculus is very rusty so please go easy on me.
Looking forward to your thoughts.and Thank You,
mcirish3
-
Hi OhioBob.
Nathankell suggested I contact you about the nature of the atmosphere in KSP...so here I am. I am at this time working on the static pressures (will tackle static temp after and am collecting data for both) on Kerbin using graphotron 2000. I really don't know much since I have only run numbers on one csv data output (though I have several more wait for analysis) at this point but I will give you my best guess on how I expect static pressure on kerbin to work.
I am guessing that all though the planet rotates every 6 hours the Atmosphere behaves as if it only rotates once a year. (which is to say there should be a174 mph wind at the equator but ... there is no wind in ksp) In other words the temp and pressure above the point 0o 0' 0" latitude and 0o 0' 0" longitude at noon each kerbin day has the highest Temp and lowest pressure at the surface of any point on kerbin at that time. I am further guessing that the pressure with altitude follows the following formula Atmospheric Pressure= Caltitude*e-(A)*Altitude(m)
Pressure versus change in longitude with a fixed time and fixed altitude would follow; pressure=Clogitude*cos(beta)and pressure versus change in latitude with a fixed time and fixed altitude would be; pressure=Clatitude*sin(theta/2)
(this should all be in spherical coordinates)
Am I even in the right ball park? Please feel free to correct me or to tell me I am crazy. I really am looking to derive, from experimental data if necessary a three dimensional formula that will yield the static air pressure (and temperature eventually) for any place and time on kerbin and eventually the other planets with atmospheres as well.
I of course don't have a strong need to do all the work myself, no need to reinvent the wheel if the work is already done, so if you have already figured all this out please feel free to share.
Much of my calculus is very rusty so please go easy on me.
Looking forward to your thoughts.and Thank You,
mcirish3
-
One thing you might do is to land a probe on each planet and use KER to record, for a specific time, your geographic longitude and celestial longitude. From that you should be able to compute the longitude of the prime meridian at a particular data and time.
For example, let's say you're on Eve at a geographic longitude of 60.00000o W. At the time of Y10, D100, 0:00, you note that your probe's longitude of Pe is 90.00000o. The celestial longitude of your landed probe is that of Pe + 180o, i.e. 90+180 = 270o. Since you're 60o west of 0o longitude, the celestial longitude of the prime meridian at the time of the observation is 270+60 = 330o.
Given the date and time of Y10, D100, 0:00, we know that exactly 9 years, 99 days has passed since Y1, D1, 0:00 (i.e. 0s UT). In seconds this is, (9*426+99)*21600 = 84,952,800 s. Since Eve's sidereal rotation period is 80500 s, the number of rotations it has made since 0s UT is, 84952800/80500 = 1055.314285714. This tells us that the prime meridian is currently 0.314285714 of a rotation east of where it was at 0s UT. Therefore, the celestial longitude of the prime meridian at 0s UT is, 330-(0.314285714*360) = 216.85714o.
Of course these numbers are just made up, but it shows the method. It would probably be wise to make several observations and average them to try to eliminate error.
The above should give you the longitude of the prime meridian, but to know the hour angle you also need to know the longitude of the Sun. This can be computed from the orbital elements given in the Wiki. Eve's argument of periapsis is 0o, its longitude of ascending node is 15o, and its mean anomaly at 0s UT is 3.14 radians (which I assume is pi exactly). I'm quite sure these numbers haven't changed because things like this launch window planner depends on them being accurate.
From the orbital elements we know that Eve's celestial longitude at 0s UT is 195 degrees. Of course this is the direction of Eve relative to the Sun. The longitude of the Sun relative to Eve is 195-180 = 15o. Assuming our example calculation of the prime meridian's longitude is correct, then the hour angle at 0o longitude at 0s UT is, (15+360)-216.85714 = 158.14286o.
I think this method should give you what you want; however, you should check my logical and math to make sure I didn't make a stupid mistake, like subtracting angles when I should have added. If you do this, I'm interested to see what results you get. I suspect that Squad probably set the initial hour angle at some even fraction of a rotation, so if you get an answer like 90o or 180o, then I think that is good evidence that you're getting a correct answer.
-
-
Hi OhioBob.
Nathankell suggested I contact you about the nature of the atmosphere in KSP...so here I am. I am at this time working on the static pressures (will tackle static temp after and am collecting data for both) on Kerbin using graphotron 2000. I really don't know much since I have only run numbers on one csv data output (though I have several more wait for analysis) at this point but I will give you my best guess on how I expect static pressure on kerbin to work.
I am guessing that all though the planet rotates every 6 hours the Atmosphere behaves as if it only rotates once a year. (which is to say there should be a174 mph wind at the equator but ... there is no wind in ksp) In other words the temp and pressure above the point 0o 0' 0" latitude and 0o 0' 0" longitude at noon each kerbin day has the highest Temp and lowest pressure at the surface of any point on kerbin at that time. I am further guessing that the pressure with altitude follows the following formula Atmospheric Pressure= Caltitude*e-(A)*Altitude(m)
Pressure versus change in longitude with a fixed time and fixed altitude would follow; pressure=Clogitude*cos(beta)and pressure versus change in latitude with a fixed time and fixed altitude would be; pressure=Clatitude*sin(theta/2)
(this should all be in spherical coordinates)
Am I even in the right ball park? Please feel free to correct me or to tell me I am crazy. I really am looking to derive, from experimental data if necessary a three dimensional formula that will yield the static air pressure (and temperature eventually) for any place and time on kerbin and eventually the other planets with atmospheres as well.
I of course don't have a strong need to do all the work myself, no need to reinvent the wheel if the work is already done, so if you have already figured all this out please feel free to share.
Much of my calculus is very rusty so please go easy on me.
Looking forward to your thoughts.and Thank You,
mcirish3
-
Quote
Can the Semimajor axis be obtained via a cfg file? Also sidereal rotation period would need to be from program file as well to be 100% certain of accuracy.
I assume Hyperedit is getting the information from the game's config files, so hopefully it is correct. The semi-major axis can be obtained using KER. Send a pod or probe core to the launch pad, open KER, select the Rendezvous panel, and then select as your target the planet of interest. The Rendezvous panel will display the planet's semi-major axis. If it does not, then click the edit button, select the rendezvous category, and install semi-major axis.
That leaves as the only remaining number the gravitational parameter of the Sun. This is given in the in the body information panel in the Tracking Station. However, it can be computed to more digits using the Sun's surface gravity and radius,
μ = g * r2 = (1.74625 * 9.81) * 2616000002 = 1.172332772424E+18 m3/s2
I believe this calculation is exact. From my observations, it appears that the bulk characteristics of all the celestial bodies in KSP are computed from surface gravity, where the surface gravity is some fraction of the number 9.81 m/s2. For instance, Kerbin's surface gravity is exactly 9.81 m/s2, Eve's surface gravity is exactly 9.81*1.7 = 16.677 m/s2, and so on. From these surface gravity numbers, mass, gravitational parameter, etc. is calculated.
As a double check we can compute μ from the Sun's escape velocity,
μ = Vesc2 * r / 2 = 94672.02 * 261600000 / 2 = 1.172332616E+18 m3/s2
These number don't match exactly because escape velocity is a rounded off value, but the match is close enough to confirm the first number.
-
-
Hi OhioBob.
Nathankell suggested I contact you about the nature of the atmosphere in KSP...so here I am. I am at this time working on the static pressures (will tackle static temp after and am collecting data for both) on Kerbin using graphotron 2000. I really don't know much since I have only run numbers on one csv data output (though I have several more wait for analysis) at this point but I will give you my best guess on how I expect static pressure on kerbin to work.
I am guessing that all though the planet rotates every 6 hours the Atmosphere behaves as if it only rotates once a year. (which is to say there should be a174 mph wind at the equator but ... there is no wind in ksp) In other words the temp and pressure above the point 0o 0' 0" latitude and 0o 0' 0" longitude at noon each kerbin day has the highest Temp and lowest pressure at the surface of any point on kerbin at that time. I am further guessing that the pressure with altitude follows the following formula Atmospheric Pressure= Caltitude*e-(A)*Altitude(m)
Pressure versus change in longitude with a fixed time and fixed altitude would follow; pressure=Clogitude*cos(beta)and pressure versus change in latitude with a fixed time and fixed altitude would be; pressure=Clatitude*sin(theta/2)
(this should all be in spherical coordinates)
Am I even in the right ball park? Please feel free to correct me or to tell me I am crazy. I really am looking to derive, from experimental data if necessary a three dimensional formula that will yield the static air pressure (and temperature eventually) for any place and time on kerbin and eventually the other planets with atmospheres as well.
I of course don't have a strong need to do all the work myself, no need to reinvent the wheel if the work is already done, so if you have already figured all this out please feel free to share.
Much of my calculus is very rusty so please go easy on me.
Looking forward to your thoughts.and Thank You,
mcirish3
-
As far as I know they are, but I can't guarantee it. One way you can check it is using Hyperedit. The "Planet Editor" gives each planet's sidereal rotation period. The solar day is,
Solar day = (Porbit * Protation) / (Porbit - Protation)
where Porbit is the sidereal orbit period, and Protation is the sidereal rotation period. Just be sure that both are given in the same units. Of course this raises the question, are the orbital periods given in the Wiki correct? Again, as far as I know, yes. You can compute the sidereal orbit periods as follows,
Porbit = 2*π*(a3/μ)0.5
where a is the semimajor axis in meters, μ = 1.172332772424E+18 m3/s2 (for Sun), and Porbit will be in seconds.
-
-
Hi OhioBob.
Nathankell suggested I contact you about the nature of the atmosphere in KSP...so here I am. I am at this time working on the static pressures (will tackle static temp after and am collecting data for both) on Kerbin using graphotron 2000. I really don't know much since I have only run numbers on one csv data output (though I have several more wait for analysis) at this point but I will give you my best guess on how I expect static pressure on kerbin to work.
I am guessing that all though the planet rotates every 6 hours the Atmosphere behaves as if it only rotates once a year. (which is to say there should be a174 mph wind at the equator but ... there is no wind in ksp) In other words the temp and pressure above the point 0o 0' 0" latitude and 0o 0' 0" longitude at noon each kerbin day has the highest Temp and lowest pressure at the surface of any point on kerbin at that time. I am further guessing that the pressure with altitude follows the following formula Atmospheric Pressure= Caltitude*e-(A)*Altitude(m)
Pressure versus change in longitude with a fixed time and fixed altitude would follow; pressure=Clogitude*cos(beta)and pressure versus change in latitude with a fixed time and fixed altitude would be; pressure=Clatitude*sin(theta/2)
(this should all be in spherical coordinates)
Am I even in the right ball park? Please feel free to correct me or to tell me I am crazy. I really am looking to derive, from experimental data if necessary a three dimensional formula that will yield the static air pressure (and temperature eventually) for any place and time on kerbin and eventually the other planets with atmospheres as well.
I of course don't have a strong need to do all the work myself, no need to reinvent the wheel if the work is already done, so if you have already figured all this out please feel free to share.
Much of my calculus is very rusty so please go easy on me.
Looking forward to your thoughts.and Thank You,
mcirish3
-
I have to make a correction to my previous post. Although the minimum SZA will be equal to the latitude, that will be the maximum dot product. I should have written,
maxDot = COS(latitude)
minDot = COS(180 - latitude)
That's because COS(latitude) is a positive number and COS(180-latitude) is a negative number.
QuoteAny thoughts on the discrepancy from measured results to the expected?
I don't know why that is. My measurement is based on the time when the Sun suddenly brightens. It's my assumption that this occurs when the solar center rises above the horizon. However, if this assumption is false, then we're not really measuring the time of the actual sunrise. Seems odd, though, that there would be 15-17 second difference - it doesn't really sound like something that would be done intentionally.
By the way, in real life, sunrise is defined at the time when the Sun's upper limb touches the horizon. By this definition, sunrise in KSP should occur 66 seconds earlier than the rise of the solar center.
-
-
Hi OhioBob.
Nathankell suggested I contact you about the nature of the atmosphere in KSP...so here I am. I am at this time working on the static pressures (will tackle static temp after and am collecting data for both) on Kerbin using graphotron 2000. I really don't know much since I have only run numbers on one csv data output (though I have several more wait for analysis) at this point but I will give you my best guess on how I expect static pressure on kerbin to work.
I am guessing that all though the planet rotates every 6 hours the Atmosphere behaves as if it only rotates once a year. (which is to say there should be a174 mph wind at the equator but ... there is no wind in ksp) In other words the temp and pressure above the point 0o 0' 0" latitude and 0o 0' 0" longitude at noon each kerbin day has the highest Temp and lowest pressure at the surface of any point on kerbin at that time. I am further guessing that the pressure with altitude follows the following formula Atmospheric Pressure= Caltitude*e-(A)*Altitude(m)
Pressure versus change in longitude with a fixed time and fixed altitude would follow; pressure=Clogitude*cos(beta)and pressure versus change in latitude with a fixed time and fixed altitude would be; pressure=Clatitude*sin(theta/2)
(this should all be in spherical coordinates)
Am I even in the right ball park? Please feel free to correct me or to tell me I am crazy. I really am looking to derive, from experimental data if necessary a three dimensional formula that will yield the static air pressure (and temperature eventually) for any place and time on kerbin and eventually the other planets with atmospheres as well.
I of course don't have a strong need to do all the work myself, no need to reinvent the wheel if the work is already done, so if you have already figured all this out please feel free to share.
Much of my calculus is very rusty so please go easy on me.
Looking forward to your thoughts.and Thank You,
mcirish3
-
Quote
just to confirm if I rewrite this as expanded Temperature = atmosphereTemperatureCurve+ ((latitudeTemperatureBiasCurve + (latitudeTemperatureSunMultCurve * sunDotNormalized))*atmosphereTemperatureSunMultCurve)
Expanding this gives Temperature = atmosphereTemperatureCurve+ (latitudeTemperatureBiasCurve*atmosphereTemperatureSunMultCurve) + (latitudeTemperatureSunMultCurve *atmosphereTemperatureSunMultCurve* sunDotNormalized)That looks right to me.
QuoteAlso I am having a heck of a time remembering my spherical coordinate trigonometry any chance you could feed me the formulas for getting the minimum SZA and Maximum SZA for a given latitude
Since the Sun is always over the equator, the minimum SZA will be equal to the latitude, and the maximum SZA will be (180o - latitude). The dot products are,
minDot = COS(latitude)
maxDot = COS(180 - latitude)
And,
sunDot = COS(latitude) * COS(hour angle - 45o)
The hour angle is -180o just past midnight, -90o at sunrise, 0 at noon, +90o at sunset, and +180o just before midnight. The -45o is the offset that Nathan put into the formula to shift the hottest time of day from noon to mid-afternoon.
Finally,
sunDotNormalized = (sunDot - minDot) / (maxDot - minDot)
-
-
Hi OhioBob.
Nathankell suggested I contact you about the nature of the atmosphere in KSP...so here I am. I am at this time working on the static pressures (will tackle static temp after and am collecting data for both) on Kerbin using graphotron 2000. I really don't know much since I have only run numbers on one csv data output (though I have several more wait for analysis) at this point but I will give you my best guess on how I expect static pressure on kerbin to work.
I am guessing that all though the planet rotates every 6 hours the Atmosphere behaves as if it only rotates once a year. (which is to say there should be a174 mph wind at the equator but ... there is no wind in ksp) In other words the temp and pressure above the point 0o 0' 0" latitude and 0o 0' 0" longitude at noon each kerbin day has the highest Temp and lowest pressure at the surface of any point on kerbin at that time. I am further guessing that the pressure with altitude follows the following formula Atmospheric Pressure= Caltitude*e-(A)*Altitude(m)
Pressure versus change in longitude with a fixed time and fixed altitude would follow; pressure=Clogitude*cos(beta)and pressure versus change in latitude with a fixed time and fixed altitude would be; pressure=Clatitude*sin(theta/2)
(this should all be in spherical coordinates)
Am I even in the right ball park? Please feel free to correct me or to tell me I am crazy. I really am looking to derive, from experimental data if necessary a three dimensional formula that will yield the static air pressure (and temperature eventually) for any place and time on kerbin and eventually the other planets with atmospheres as well.
I of course don't have a strong need to do all the work myself, no need to reinvent the wheel if the work is already done, so if you have already figured all this out please feel free to share.
Much of my calculus is very rusty so please go easy on me.
Looking forward to your thoughts.and Thank You,
mcirish3
-
I figured out most of the one minute difference. I failed to account for the elevation of the launch pad. For my second experiment I drove a rover down to the water's edge and observed the sunrise from sea level. This time I recorded sunrise at 4:14:09, and my longitude was 74o 23' 39". From these numbers I compute the time of sunrise at 0 longitude to be 2:59:45. Still not 3:00 even, but pretty darn close.
-
-
Hi OhioBob.
Nathankell suggested I contact you about the nature of the atmosphere in KSP...so here I am. I am at this time working on the static pressures (will tackle static temp after and am collecting data for both) on Kerbin using graphotron 2000. I really don't know much since I have only run numbers on one csv data output (though I have several more wait for analysis) at this point but I will give you my best guess on how I expect static pressure on kerbin to work.
I am guessing that all though the planet rotates every 6 hours the Atmosphere behaves as if it only rotates once a year. (which is to say there should be a174 mph wind at the equator but ... there is no wind in ksp) In other words the temp and pressure above the point 0o 0' 0" latitude and 0o 0' 0" longitude at noon each kerbin day has the highest Temp and lowest pressure at the surface of any point on kerbin at that time. I am further guessing that the pressure with altitude follows the following formula Atmospheric Pressure= Caltitude*e-(A)*Altitude(m)
Pressure versus change in longitude with a fixed time and fixed altitude would follow; pressure=Clogitude*cos(beta)and pressure versus change in latitude with a fixed time and fixed altitude would be; pressure=Clatitude*sin(theta/2)
(this should all be in spherical coordinates)
Am I even in the right ball park? Please feel free to correct me or to tell me I am crazy. I really am looking to derive, from experimental data if necessary a three dimensional formula that will yield the static air pressure (and temperature eventually) for any place and time on kerbin and eventually the other planets with atmospheres as well.
I of course don't have a strong need to do all the work myself, no need to reinvent the wheel if the work is already done, so if you have already figured all this out please feel free to share.
Much of my calculus is very rusty so please go easy on me.
Looking forward to your thoughts.and Thank You,
mcirish3
-
I just did a test and I measured the time of sunrise at the launch pad to be 4:13:33. This is the time when the sun suddenly brightens; the limb first appeared about 1 minute sooner. The longitude at my location was 74o 33' 27". This means that sunrise at 0 longitude should occur at 2:59:00 ±1s. I'm suspect the actual time is 3:00. I'm not sure why there is a minute difference. Maybe sunrise appears earlier to simulate atmospheric refraction? Whatever the reason, I think we can say that the new day (0:00:00) begins when the hour angle at 0 longitude is 90 degrees (i.e. sunset).
-
-
Hi OhioBob.
Nathankell suggested I contact you about the nature of the atmosphere in KSP...so here I am. I am at this time working on the static pressures (will tackle static temp after and am collecting data for both) on Kerbin using graphotron 2000. I really don't know much since I have only run numbers on one csv data output (though I have several more wait for analysis) at this point but I will give you my best guess on how I expect static pressure on kerbin to work.
I am guessing that all though the planet rotates every 6 hours the Atmosphere behaves as if it only rotates once a year. (which is to say there should be a174 mph wind at the equator but ... there is no wind in ksp) In other words the temp and pressure above the point 0o 0' 0" latitude and 0o 0' 0" longitude at noon each kerbin day has the highest Temp and lowest pressure at the surface of any point on kerbin at that time. I am further guessing that the pressure with altitude follows the following formula Atmospheric Pressure= Caltitude*e-(A)*Altitude(m)
Pressure versus change in longitude with a fixed time and fixed altitude would follow; pressure=Clogitude*cos(beta)and pressure versus change in latitude with a fixed time and fixed altitude would be; pressure=Clatitude*sin(theta/2)
(this should all be in spherical coordinates)
Am I even in the right ball park? Please feel free to correct me or to tell me I am crazy. I really am looking to derive, from experimental data if necessary a three dimensional formula that will yield the static air pressure (and temperature eventually) for any place and time on kerbin and eventually the other planets with atmospheres as well.
I of course don't have a strong need to do all the work myself, no need to reinvent the wheel if the work is already done, so if you have already figured all this out please feel free to share.
Much of my calculus is very rusty so please go easy on me.
Looking forward to your thoughts.and Thank You,
mcirish3
-
I've haven't bother to figure it out myself, but you can certainly determine the time of sunrise at KSC by simply observing it. That would be an interesting thing to know. The longitude of the launch pad is 74o 34' 31" W. If the day begins at midnight at 0 longitude, as it does on Earth, then we would expect sunrise at the launch pad to occur at 2h 44m 34.5s (universal time). However, if the clock is set to some sort of KSC local time, then we would expect sunrise to occur at 1h 30m 0s. Of course there is no reason for Kerbals to start their day at midnight like we do. Maybe their day starts at sunrise. You're going to have to figure it out.
-
-
Hi OhioBob.
Nathankell suggested I contact you about the nature of the atmosphere in KSP...so here I am. I am at this time working on the static pressures (will tackle static temp after and am collecting data for both) on Kerbin using graphotron 2000. I really don't know much since I have only run numbers on one csv data output (though I have several more wait for analysis) at this point but I will give you my best guess on how I expect static pressure on kerbin to work.
I am guessing that all though the planet rotates every 6 hours the Atmosphere behaves as if it only rotates once a year. (which is to say there should be a174 mph wind at the equator but ... there is no wind in ksp) In other words the temp and pressure above the point 0o 0' 0" latitude and 0o 0' 0" longitude at noon each kerbin day has the highest Temp and lowest pressure at the surface of any point on kerbin at that time. I am further guessing that the pressure with altitude follows the following formula Atmospheric Pressure= Caltitude*e-(A)*Altitude(m)
Pressure versus change in longitude with a fixed time and fixed altitude would follow; pressure=Clogitude*cos(beta)and pressure versus change in latitude with a fixed time and fixed altitude would be; pressure=Clatitude*sin(theta/2)
(this should all be in spherical coordinates)
Am I even in the right ball park? Please feel free to correct me or to tell me I am crazy. I really am looking to derive, from experimental data if necessary a three dimensional formula that will yield the static air pressure (and temperature eventually) for any place and time on kerbin and eventually the other planets with atmospheres as well.
I of course don't have a strong need to do all the work myself, no need to reinvent the wheel if the work is already done, so if you have already figured all this out please feel free to share.
Much of my calculus is very rusty so please go easy on me.
Looking forward to your thoughts.and Thank You,
mcirish3
-
To compute temperature, all you need to know is the solar hour angle. The solar hour angle progresses through a full 360 degrees every solar day (or synodic day). Starting with version 1.05 (?), Kerbin's solar day was supposedly changed to exactly 6 hours, though I haven't confirmed this. This should make sunrise occur at exactly the same time every day. Prior to v1.05, Kerbin's day was equal to its sidereal period, which was messed up.
-
-
Hi OhioBob.
Nathankell suggested I contact you about the nature of the atmosphere in KSP...so here I am. I am at this time working on the static pressures (will tackle static temp after and am collecting data for both) on Kerbin using graphotron 2000. I really don't know much since I have only run numbers on one csv data output (though I have several more wait for analysis) at this point but I will give you my best guess on how I expect static pressure on kerbin to work.
I am guessing that all though the planet rotates every 6 hours the Atmosphere behaves as if it only rotates once a year. (which is to say there should be a174 mph wind at the equator but ... there is no wind in ksp) In other words the temp and pressure above the point 0o 0' 0" latitude and 0o 0' 0" longitude at noon each kerbin day has the highest Temp and lowest pressure at the surface of any point on kerbin at that time. I am further guessing that the pressure with altitude follows the following formula Atmospheric Pressure= Caltitude*e-(A)*Altitude(m)
Pressure versus change in longitude with a fixed time and fixed altitude would follow; pressure=Clogitude*cos(beta)and pressure versus change in latitude with a fixed time and fixed altitude would be; pressure=Clatitude*sin(theta/2)
(this should all be in spherical coordinates)
Am I even in the right ball park? Please feel free to correct me or to tell me I am crazy. I really am looking to derive, from experimental data if necessary a three dimensional formula that will yield the static air pressure (and temperature eventually) for any place and time on kerbin and eventually the other planets with atmospheres as well.
I of course don't have a strong need to do all the work myself, no need to reinvent the wheel if the work is already done, so if you have already figured all this out please feel free to share.
Much of my calculus is very rusty so please go easy on me.
Looking forward to your thoughts.and Thank You,
mcirish3
-
Quote
haha some times it seems as if every single person who plays or mods the game got their science info from Nathan.
I'm now in the process of repaying the favor. I'm working up some new atmospheric models for his Real Solar System mod. I know how to model atmospheres and he now how the game works, so it's a good collaboration.
-
-
Hi OhioBob.
Nathankell suggested I contact you about the nature of the atmosphere in KSP...so here I am. I am at this time working on the static pressures (will tackle static temp after and am collecting data for both) on Kerbin using graphotron 2000. I really don't know much since I have only run numbers on one csv data output (though I have several more wait for analysis) at this point but I will give you my best guess on how I expect static pressure on kerbin to work.
I am guessing that all though the planet rotates every 6 hours the Atmosphere behaves as if it only rotates once a year. (which is to say there should be a174 mph wind at the equator but ... there is no wind in ksp) In other words the temp and pressure above the point 0o 0' 0" latitude and 0o 0' 0" longitude at noon each kerbin day has the highest Temp and lowest pressure at the surface of any point on kerbin at that time. I am further guessing that the pressure with altitude follows the following formula Atmospheric Pressure= Caltitude*e-(A)*Altitude(m)
Pressure versus change in longitude with a fixed time and fixed altitude would follow; pressure=Clogitude*cos(beta)and pressure versus change in latitude with a fixed time and fixed altitude would be; pressure=Clatitude*sin(theta/2)
(this should all be in spherical coordinates)
Am I even in the right ball park? Please feel free to correct me or to tell me I am crazy. I really am looking to derive, from experimental data if necessary a three dimensional formula that will yield the static air pressure (and temperature eventually) for any place and time on kerbin and eventually the other planets with atmospheres as well.
I of course don't have a strong need to do all the work myself, no need to reinvent the wheel if the work is already done, so if you have already figured all this out please feel free to share.
Much of my calculus is very rusty so please go easy on me.
Looking forward to your thoughts.and Thank You,
mcirish3
-
Quote
Yes, relative to the surface of Kerbin this is true. But relative to the Sol it never varies. It is as if the Atmosphere is tidally locked with the sun. Your explanation above would seem to confirm this.
Yeah, that's true. Relative to the Sun, the global temperature profile is constant.
QuoteIn any case wow you must have spent hours working all of this out.
I got a lot of help from Nathan.
-
-
Hi OhioBob.
Nathankell suggested I contact you about the nature of the atmosphere in KSP...so here I am. I am at this time working on the static pressures (will tackle static temp after and am collecting data for both) on Kerbin using graphotron 2000. I really don't know much since I have only run numbers on one csv data output (though I have several more wait for analysis) at this point but I will give you my best guess on how I expect static pressure on kerbin to work.
I am guessing that all though the planet rotates every 6 hours the Atmosphere behaves as if it only rotates once a year. (which is to say there should be a174 mph wind at the equator but ... there is no wind in ksp) In other words the temp and pressure above the point 0o 0' 0" latitude and 0o 0' 0" longitude at noon each kerbin day has the highest Temp and lowest pressure at the surface of any point on kerbin at that time. I am further guessing that the pressure with altitude follows the following formula Atmospheric Pressure= Caltitude*e-(A)*Altitude(m)
Pressure versus change in longitude with a fixed time and fixed altitude would follow; pressure=Clogitude*cos(beta)and pressure versus change in latitude with a fixed time and fixed altitude would be; pressure=Clatitude*sin(theta/2)
(this should all be in spherical coordinates)
Am I even in the right ball park? Please feel free to correct me or to tell me I am crazy. I really am looking to derive, from experimental data if necessary a three dimensional formula that will yield the static air pressure (and temperature eventually) for any place and time on kerbin and eventually the other planets with atmospheres as well.
I of course don't have a strong need to do all the work myself, no need to reinvent the wheel if the work is already done, so if you have already figured all this out please feel free to share.
Much of my calculus is very rusty so please go easy on me.
Looking forward to your thoughts.and Thank You,
mcirish3
-
Quote
Do not know how to invite him into the conversation. All I know how to do is copy and paste out of here. Is there way way to just bring him into the conversation? @Overengineer1
There's a way but I don't know how to do it. NathanKell knows how, so you might try asking him.
QuoteAm I still right in thinking that all though the planet rotates every 6 hours the Atmosphere behaves as if it only rotates once a year? I still don't see anything that would say otherwise.
I think, no. Since temperature varies on a 6-hour cycle, the atmosphere also fluctuates on the same 6-hour cycle. Although pressure doesn't change, density does change since it's a function of temperature.
-
-
Hi OhioBob.
Nathankell suggested I contact you about the nature of the atmosphere in KSP...so here I am. I am at this time working on the static pressures (will tackle static temp after and am collecting data for both) on Kerbin using graphotron 2000. I really don't know much since I have only run numbers on one csv data output (though I have several more wait for analysis) at this point but I will give you my best guess on how I expect static pressure on kerbin to work.
I am guessing that all though the planet rotates every 6 hours the Atmosphere behaves as if it only rotates once a year. (which is to say there should be a174 mph wind at the equator but ... there is no wind in ksp) In other words the temp and pressure above the point 0o 0' 0" latitude and 0o 0' 0" longitude at noon each kerbin day has the highest Temp and lowest pressure at the surface of any point on kerbin at that time. I am further guessing that the pressure with altitude follows the following formula Atmospheric Pressure= Caltitude*e-(A)*Altitude(m)
Pressure versus change in longitude with a fixed time and fixed altitude would follow; pressure=Clogitude*cos(beta)and pressure versus change in latitude with a fixed time and fixed altitude would be; pressure=Clatitude*sin(theta/2)
(this should all be in spherical coordinates)
Am I even in the right ball park? Please feel free to correct me or to tell me I am crazy. I really am looking to derive, from experimental data if necessary a three dimensional formula that will yield the static air pressure (and temperature eventually) for any place and time on kerbin and eventually the other planets with atmospheres as well.
I of course don't have a strong need to do all the work myself, no need to reinvent the wheel if the work is already done, so if you have already figured all this out please feel free to share.
Much of my calculus is very rusty so please go easy on me.
Looking forward to your thoughts.and Thank You,
mcirish3
-
Temperature is computed as follows:
Temperature = atmosphereTemperatureCurve + atmosphereTemperatureOffset * atmosphereTemperatureSunMultCurve
where,
atmosphereTemperatureOffset = latitudeTemperatureBiasCurve + latitudeTemperatureSunMultCurve * sunDotNormalized
Below is further explanation of what all that means:atmosphereTemperatureCurve is the "base temperature" as a function of altitude. It excludes latitudinal and diurnal variations.
latitudeTemperatureBiasCurve is the latitudinal temperature offset.
latitudeTemperatureSunMultCurve is diurnal temperature variation as a function of latitude.
The value of the above curves is found by evaluating the float curve data given in CelestialBodies.cfg.
sunDotNormalized is the dot product of the solar zenith angle (SZA), normalized to a number between 0 (coldest time of day) and 1 (hottest time of day). It also include a 1/8th turn so that the hottest time of day occurs mid-afternoon, rather than high noon.
atmosphereTemperatureSunMultCurve is a multiplier that modifies atmosphereTemperatureOffset as a function of altitude.
To get a better idea of what all that means, let's work an example. Suppose we want to know the temperature at local noon, at a latitude of 55oN, and at an altitude of 8815.22 m. (I've selected these conditions so we can read the curve values directly from CelestialBodies.cfg without having to do any math.)First we evaluate atmosphereTemperatureCurve. From CelestialBodies.cfg we see that the value of atmosphereTemperatureCurve at an altitude of 8815.22 m is 216.65 K. If we were at some other altitude that didn't directly correspond to a point on the curve, say 5000 m, then we'd have to compute the value.
Next, let's find the value of latitudeTemperatureBiasCurve. We again go to the configuration and see that the latitudinal offset at 55 degrees is -31 K.
Similarly, we find the value of latitudeTemperatureSunMultCurve. At 55 degrees we find that the diurnal variation is 14.9 K.
This brings us to sunDotNormalized, which it the messiest part of this process. First off, we must determine the maximum and minimum values at our latitude. At 55o latitude, the minimum SZA is 55o and the maximum is 125o. (Fortunately none of the planets in KSP has an axial tilt, so that simplifies things.) Therefore, the maximum and minimum dot products are: cos(55) = 0.5735764, and cos(125) = -0.5735764. We now compute the dot product at our current time, which is noon. The ZSA at noon is 55 degrees, but there is a 1/8th of a rotation offset to place the hottest time of day halfway between noon and sunset. We are, therefore, 45 degrees from the hottest time of day, giving us a combined angle of 55o in latitude and 45o in longitude. The dot product of this angle is, cos(55)*cos(45) = 0.4055798. We now find where our dot product lies between the minimum and maximum values as a fraction between 0 and 1. We have, sunDotNormalized = (0.4055798-(-.5735764))/((0.5735764-(-.05735764)) = 0.8535534.
We now have the base temperature and all the components of atmosphereTemperatureOffset. We now need to find the temperature offset multiplier for our altitude, i.e. atmosphereTemperatureSunMultCurve. Looking this up in CelestialBodies.cfg, we see that atmosphereTemperatureSunMultCurve has the value 0.3 at an altitude of 8815.22 m.
Finally, we compute the temperature:
atmosphereTemperatureOffset = latitudeTemperatureBiasCurve + latitudeTemperatureSunMultCurve * sunDotNormalized
atmosphereTemperatureOffset = -31 + 14.9 * 0.8535534 = -18.28205 KTemperature = atmosphereTemperatureCurve + atmosphereTemperatureOffset * atmosphereTemperatureSunMultCurve
Temperature = 216.65 + (-18.28205) * 0.3 = 211.1654 K
-
-
Hi OhioBob.
Nathankell suggested I contact you about the nature of the atmosphere in KSP...so here I am. I am at this time working on the static pressures (will tackle static temp after and am collecting data for both) on Kerbin using graphotron 2000. I really don't know much since I have only run numbers on one csv data output (though I have several more wait for analysis) at this point but I will give you my best guess on how I expect static pressure on kerbin to work.
I am guessing that all though the planet rotates every 6 hours the Atmosphere behaves as if it only rotates once a year. (which is to say there should be a174 mph wind at the equator but ... there is no wind in ksp) In other words the temp and pressure above the point 0o 0' 0" latitude and 0o 0' 0" longitude at noon each kerbin day has the highest Temp and lowest pressure at the surface of any point on kerbin at that time. I am further guessing that the pressure with altitude follows the following formula Atmospheric Pressure= Caltitude*e-(A)*Altitude(m)
Pressure versus change in longitude with a fixed time and fixed altitude would follow; pressure=Clogitude*cos(beta)and pressure versus change in latitude with a fixed time and fixed altitude would be; pressure=Clatitude*sin(theta/2)
(this should all be in spherical coordinates)
Am I even in the right ball park? Please feel free to correct me or to tell me I am crazy. I really am looking to derive, from experimental data if necessary a three dimensional formula that will yield the static air pressure (and temperature eventually) for any place and time on kerbin and eventually the other planets with atmospheres as well.
I of course don't have a strong need to do all the work myself, no need to reinvent the wheel if the work is already done, so if you have already figured all this out please feel free to share.
Much of my calculus is very rusty so please go easy on me.
Looking forward to your thoughts.and Thank You,
mcirish3
-
Here is the link to the configuration file:
http://www.braeunig.us/KSP/CelestialBodies.cfg
atmospherePressureCurve gives the atmospheric pressure.
atmosphereTemperatureCurve, atmosphereTemperatureSunMultCurve, latitudeTemperatureBiasCurve, and latitudeTemperatureSunMultCurve are all used in the computation of temperature. I'll explain how this works later.
The following is the spreadsheet that I use to convert the float curve data into polynomial functions:http://www.braeunig.us/KSP/FloatCurve.xlsx
Just type the curve data from the configuration file into the gray shaded cells to the left, and you'll get the polynomial formula in the blue shaded cells to the right. The example given is atmosphereTemperatureCurve for Kerbin.
-
-
Hi OhioBob.
Nathankell suggested I contact you about the nature of the atmosphere in KSP...so here I am. I am at this time working on the static pressures (will tackle static temp after and am collecting data for both) on Kerbin using graphotron 2000. I really don't know much since I have only run numbers on one csv data output (though I have several more wait for analysis) at this point but I will give you my best guess on how I expect static pressure on kerbin to work.
I am guessing that all though the planet rotates every 6 hours the Atmosphere behaves as if it only rotates once a year. (which is to say there should be a174 mph wind at the equator but ... there is no wind in ksp) In other words the temp and pressure above the point 0o 0' 0" latitude and 0o 0' 0" longitude at noon each kerbin day has the highest Temp and lowest pressure at the surface of any point on kerbin at that time. I am further guessing that the pressure with altitude follows the following formula Atmospheric Pressure= Caltitude*e-(A)*Altitude(m)
Pressure versus change in longitude with a fixed time and fixed altitude would follow; pressure=Clogitude*cos(beta)and pressure versus change in latitude with a fixed time and fixed altitude would be; pressure=Clatitude*sin(theta/2)
(this should all be in spherical coordinates)
Am I even in the right ball park? Please feel free to correct me or to tell me I am crazy. I really am looking to derive, from experimental data if necessary a three dimensional formula that will yield the static air pressure (and temperature eventually) for any place and time on kerbin and eventually the other planets with atmospheres as well.
I of course don't have a strong need to do all the work myself, no need to reinvent the wheel if the work is already done, so if you have already figured all this out please feel free to share.
Much of my calculus is very rusty so please go easy on me.
Looking forward to your thoughts.and Thank You,
mcirish3
-
Quote
It would seem to imply that latitude and time of day as well as a change in altitude would change the pressure am I reading it wrong or did NathanKell miss speak (he is a very busy guy)?
Nathan's statement is misleading. I can see how you can read it to mean the pressure is dependent on latitude and time of day, but I can assure you that is not the case. Pressure varies only by altitude. For example, if you look at the float curve data, you can see that at an altitude of 8815.22 m the pressure is 22.63206 kPa. This is the pressure at that atlitude regardless of latitude or time of day. It is constant across the entire globe.
QuoteAlso why did I get such a close approximation to cubic polynomial using Pressure= 104.39e(-2E-04)Altitude(m) R² = 0.9987 ?
I assumed that the small error in R2 was due to the advancement of time while in flight, or to be more precise my horizontal speed on a perfectly vertical thrust flight is 174mph thus I would naturally deviate over time since I was essentially drifting and that NathanKell's statement above is true. I will run the above third order polynomial against my collected data and compare.I don't know. I'm afraid I really don't follow what you're talking about.
QuoteIt is interesting to note that Atmospheric pressure has only twenty possible values on Kerbin based on what you are saying. Should I expect temperature to be a step function as well?
It seems odd to me that they would use an array instead of a simple formula in a program since a formula is faster to both write and for a computer to execute.It's not a step function, but it looks like you already figured that out for yourself. Each pair of points are connected by a cubic Hermite spline.
As to why a simple formula isn't used, it's not a simple function. The slope of the curve fluctuates, making it difficult to find a single formula that fits the data points. Using a float curve allows the curve to be broken down into segments, permitting a closer fit to the data. Another advantage of using a float curve is that the data can be put into an easy to edit configuration file.
QuoteAlso do you mind if I share part or all of this conversation with Overengineer1?
He indicated to me via PM that he found this topic interesting and the knowledge could potentially be directly applicable to his MOD. http://forum.kerbalspaceprogram.com/index.php?/topic/129607-105-gravityturn-version-121-automated-efficient-launches/&page=1No problem. Feel free to invite Overengineer1.
QuoteI would very much be excited to see this data for the other planets as well, so if you happen to have the time to share please do.
I have a copy of the configuration file with all the curve data. I'll upload it to my site and will post a link.
QuoteWhen you do get time to go into temperature please feel free to share. It is clear that it does not behave as nicely as pressure. Even the side of the ship you take the temp on matters (just as you would expect in real life).
The configuration file will also include all the temperature curves, but an explanation of how the latitudinal and diurnal variations work is necessary. I'll cover that in a future post.
The temperature that I'll be talking about is the ambient air temperature. The temperature that a thermometer reads is much more complicated, involving aerodynamic heating, sun exposure, etc. I'm not qualified to talk about all of that. If you just want to know the surrounding air temperature, then don't use a thermometer. I recommend NathanKell's AeroGUI mod.
-
-
Hi OhioBob.
Nathankell suggested I contact you about the nature of the atmosphere in KSP...so here I am. I am at this time working on the static pressures (will tackle static temp after and am collecting data for both) on Kerbin using graphotron 2000. I really don't know much since I have only run numbers on one csv data output (though I have several more wait for analysis) at this point but I will give you my best guess on how I expect static pressure on kerbin to work.
I am guessing that all though the planet rotates every 6 hours the Atmosphere behaves as if it only rotates once a year. (which is to say there should be a174 mph wind at the equator but ... there is no wind in ksp) In other words the temp and pressure above the point 0o 0' 0" latitude and 0o 0' 0" longitude at noon each kerbin day has the highest Temp and lowest pressure at the surface of any point on kerbin at that time. I am further guessing that the pressure with altitude follows the following formula Atmospheric Pressure= Caltitude*e-(A)*Altitude(m)
Pressure versus change in longitude with a fixed time and fixed altitude would follow; pressure=Clogitude*cos(beta)and pressure versus change in latitude with a fixed time and fixed altitude would be; pressure=Clatitude*sin(theta/2)
(this should all be in spherical coordinates)
Am I even in the right ball park? Please feel free to correct me or to tell me I am crazy. I really am looking to derive, from experimental data if necessary a three dimensional formula that will yield the static air pressure (and temperature eventually) for any place and time on kerbin and eventually the other planets with atmospheres as well.
I of course don't have a strong need to do all the work myself, no need to reinvent the wheel if the work is already done, so if you have already figured all this out please feel free to share.
Much of my calculus is very rusty so please go easy on me.
Looking forward to your thoughts.and Thank You,
mcirish3
-
mcirish3,
Atmospheric pressure in KSP changes only with height. For a given altitude, atmospheric pressure is the same everywhere on the globe; latitude and longitude makes no difference. The pressure on Kerbin is based on the U.S. Standard Atmosphere (USSA). (For more detail on the mathematics, you can refer to Atmospheric Models.) However, to better fit the scaled down size of the Kerbal solar system, the vertical scale of the USSA has been compressed to 80%. What that means is, the atmospheric pressure that occurs at an altitude of 10 km on Earth is found at an altitude of 8 km on Kerbin.
Although you can use the equations of the USSA to estimate pressure (and temperature) on Kerbin, the planet's atmosphere does not follow the USSA exactly. In KSP, pressure is obtained from a float curve. The formula of the float curve in not the same formula used in the USSA. Only at given points along the float curve is the match exact; in between these points, the float curve gives a very close approximation of the USSA. For Kerbin, the atmospheric pressure curve is given by the following:
atmospherePressureCurve
{
key = 0 101.325 0 -0.01501631
key = 1241.025 84.02916 -0.01289846 -0.01289826
key = 2439.593 69.68138 -0.01107876 -0.01107859
key = 3597.11 57.78001 -0.009515483 -0.009515338
key = 4714.942 47.90862 -0.00817254 -0.008172415
key = 5794.409 39.72148 -0.00701892 -0.007018813
key = 6836.791 32.93169 -0.006027969 -0.006027877
key = 7843.328 27.30109 -0.005176778 -0.0051767
key = 8815.22 22.63206 -0.004445662 -0.004445578
key = 10786.42 15.3684 -0.003016528 -0.00301646
key = 12101.4 11.87313 -0.002329273 -0.00232922
key = 13417.05 9.172798 -0.001798594 -0.001798554
key = 16678.47 4.842261 -0.0009448537 -0.0009448319
key = 21143.1 2.050097 -0.0003894095 -0.0003894005
key = 26977.92 0.6905929 -0.0001252565 -0.0001252534
key = 33593.82 0.2201734 -3.626878E-05 -3.626788E-05
key = 42081.87 0.05768469 -9.063159E-06 -9.062975E-06
key = 49312.13 0.01753794 -3.029397E-06 -3.029335E-06
key = 56669.95 0.004591824 -8.827175E-07 -8.826996E-07
key = 62300.84 0.001497072 -3.077091E-07 -3.077031E-07
key = 70000 0 0 0
}If you don't know what all that means, don't worry; I've derived a method to convert all of that into simple polynomials. The basic formula is,
P(z) = A z3 + B z2 + C z + D
where P(z) is the pressure as a function of altitude (in kilopascals) , z is the geometric altitude (in meters), and the A, B, C and D coefficients are found in the following table:
Altitude range A B C D 0 to 1241.025 -2.681208444E-11 9.031781538E-07 -1.501631000E-02 1.013250000E+02 1241.025 to 2439.593 -2.469995657E-11 8.953974338E-07 -1.500655680E-02 1.013208424E+02 2439.593 to 3597.11 -2.272856511E-11 8.810066866E-07 -1.497137055E-02 1.012920268E+02 3597.11 to 4714.942 -2.097390582E-11 8.621303269E-07 -1.490353653E-02 1.012105970E+02 4714.942 to 5794.409 -1.929074213E-11 8.383889146E-07 -1.479178638E-02 1.010350661E+02 5794.409 to 6836.791 -1.779138447E-11 8.123685398E-07 -1.464115758E-02 1.007442024E+02 6836.791 to 7843.328 -1.637656492E-11 7.834006323E-07 -1.444336378E-02 1.002938127E+02 7843.328 to 8815.22 -1.507220871E-11 7.527118100E-07 -1.420260413E-02 9.966400709E+01 8815.22 to 10786.42 -2.375962475E-11 1.061073661E-06 -1.761382736E-02 1.117234775E+02 10786.42 to 12101.4 -1.714817276E-11 8.500182440E-07 -1.536835959E-02 1.037614055E+02 12101.4 to 13417.05 -1.321496036E-11 7.074972136E-07 -1.364688328E-02 9.683012035E+01 13417.05 to 16678.47 -8.253683037E-12 5.034769447E-07 -1.085148919E-02 8.406836792E+01 16678.47 to 21143.1 -4.186460630E-12 2.997102824E-07 -7.448589447E-03 6.512548915E+01 21143.1 to 26977.92 -1.429281638E-12 1.258028810E-07 -3.792328069E-03 3.950294025E+01 26977.92 to 33593.82 -4.412463243E-13 4.681564427E-08 -1.687802775E-03 2.081495438E+01 33593.82 to 42081.87 -9.777750347E-14 1.270160074E-08 -5.586195955E-04 8.358968127E+00 42081.87 to 49312.13 -1.888356494E-14 3.006011685E-09 -1.617383642E-04 2.947883098E+00 49312.13 to 56669.95 -7.260101974E-15 1.300034262E-09 -7.828138353E-05 1.587054991E+00 56669.95 to 62300.84 -2.876451484E-15 5.643773627E-10 -3.713614632E-05 8.201055622E-01 62300.84 to 70000 1.369656125E-15 -2.518270830E-10 1.512184659E-05 -2.943686051E-01 The same float curve method is used to give atmospheric pressure for all other planets as well. I can provide the data for those upon request. The atmospheres of other KSP planets are based only loosely, if at all, on the atmospheres of real life planets. For the most part, other atmospheres are just made up with pressure-height profiles that don't develop as they naturally would. If you are interested, I solved this problem with a mod, Realistic Atmopsheres, in which I derived atmospheres that are based on real life analogs and that obey the ideal gas law.
Temperature is more involved, using several float curves. One curve gives the base temperature, to which diurnal and latitudinal modifiers are added. Therefore, temperature does change based on location and time of day, unlike pressure. I can give a more detailed explanation of temperature at a latter time if you are interested. Density is computed using the ideal gas law from pressure and temperature. Therefore, density also changes with location and time.
Bob
-
-
Hi OhioBob.
Nathankell suggested I contact you about the nature of the atmosphere in KSP...so here I am. I am at this time working on the static pressures (will tackle static temp after and am collecting data for both) on Kerbin using graphotron 2000. I really don't know much since I have only run numbers on one csv data output (though I have several more wait for analysis) at this point but I will give you my best guess on how I expect static pressure on kerbin to work.
I am guessing that all though the planet rotates every 6 hours the Atmosphere behaves as if it only rotates once a year. (which is to say there should be a174 mph wind at the equator but ... there is no wind in ksp) In other words the temp and pressure above the point 0o 0' 0" latitude and 0o 0' 0" longitude at noon each kerbin day has the highest Temp and lowest pressure at the surface of any point on kerbin at that time. I am further guessing that the pressure with altitude follows the following formula Atmospheric Pressure= Caltitude*e-(A)*Altitude(m)
Pressure versus change in longitude with a fixed time and fixed altitude would follow; pressure=Clogitude*cos(beta)and pressure versus change in latitude with a fixed time and fixed altitude would be; pressure=Clatitude*sin(theta/2)
(this should all be in spherical coordinates)
Am I even in the right ball park? Please feel free to correct me or to tell me I am crazy. I really am looking to derive, from experimental data if necessary a three dimensional formula that will yield the static air pressure (and temperature eventually) for any place and time on kerbin and eventually the other planets with atmospheres as well.
I of course don't have a strong need to do all the work myself, no need to reinvent the wheel if the work is already done, so if you have already figured all this out please feel free to share.
Much of my calculus is very rusty so please go easy on me.
Looking forward to your thoughts.and Thank You,
mcirish3