Jump to content

Kerbal science: The atmosphere of Kerbin


CaptainArbitrary

Recommended Posts

So I was playing around with …well, some unrelated stuff and I think I\'ve stumbled across some new and pretty darned interesting insights into the atmosphere of Kerbin.

Long story short, I\'ve been trying to make radiator parts —non-cosmetic ones, I mean —and in the process I took some temperature measurements of the vacuum, out beyond 100,000 kilometers in altitude. I\'m still scratching my head over those (more on that subject later) but in the process of collecting the data I also got some really good high-resolution temperature and pressure data from sea level to orbit.

And it turns out Kerbin\'s got a very interesting atmosphere!

Here\'s a pretty picture:

QlixF.png

This chart shows temperature in degrees Celsius on the up-and-downy part and altitude above sea level in meters on the lefty-righty part. As you can see, it\'s divided into pretty clear bands where the temperature changes more-or-less linearly with altitude.

(I know it looks like that chart just has like ten points on it, but it\'s actually a data set with more than 2,500 samples in it. It\'s just the Kerbal atmosphere is pretty simple.)

From sea level to 8,400 meters, the temperature drops from about 20°C to about –50°C, or about 9°C per meter of altitude.

From 8,400 meters to 14,000 meters, the temperature changes only very slowly. According to my data, it goes from –53.007°C at around 8,440 meters to –53.036 at around 14,000 meters. And no, it\'s not a data-collecting glitch. I thought so too, so I ran the experiment multiple times. It\'s consistent.

From 14,000 meters to about 35,000 meters, the temperature rises steadily at about 3°C per kilometer.

From about 35,000 meters to about 39,000 meters, the temperature continues to rise, but more slowly, and not linearly. Here\'s a way-zoomed-in look:

FP3Cd.png

The temperature curve takes a hard right turn at about 35,036.8 meters, then follows a sort of cubic-looking curve for about four kilometers —still going up, but not linearly with altitude. Then, at about 39,275 meters (and 1.9°C), the temperature stops going up and starts going back down again.

From around 39km to about 56km, the temperature drops nearly ninety degrees, at a steady rate of 5°C per kilometer.

From 56km to 63km, the temperature loses just four thousandths of a degree, going from -88°C to -88.004°C.

Between 63km and 70km, the temperature changes faster than in any other layer, climbing at nearly 7°C per kilometer.

And from 70km to 82km … well, things get weird. See, on this flight, the one that generated the data set I used to make the above pictures, the temperature climbed perfectly steadily at 17.85°C the whole way. But on another flight …well, just lookit.

HNB7U.png

It\'s fair to say the data here are …noisy. If you compare this plot to the other one up top, you\'ll find they\'re basically exactly the same up to 70km, but after that, this data set just goes bonkers. Here\'s a sample of the raw data, so you can see what I mean:

69900.490,-40.781

69943.950,-40.531

69987.390,-40.284

70030.820,-39.442

70074.230,-41.181

70117.630,-37.343

70161.010,-36.295

70204.380,-35.245

70247.720,-34.197

70291.050,-33.150

70334.370,-32.101

70377.660,-31.054

70420.950,-30.008

70464.210,-28.962

70507.460,-27.916

70550.700,-26.870

70593.910,-25.826

70637.120,-24.780

70680.300,-23.737

70723.470,-49.826

70766.630,-50.400

70809.760,-50.976

70852.880,-19.562

70895.980,-52.124

70939.070,-17.478

70982.150,-16.437

On the left is altitude in meters, on the right is temperature in °C. It goes from –40 to –39 to –41 to –37 …then from –23 to –50 to –19 to –52 to –17. At first I thought it was just noise, bad data, but then I plotted it and saw the noise fit neatly into an envelope that starts at 70km and goes to 250°C on the upper bound and –200°C on the lower bound.

And as you can see, on that flight the temperature continued to oscillate wildly back and forth between –200°C and 250°C, several times a second. Here:

89117.200,-200.000

89152.590,250.000

89187.950,-200.000

89223.300,250.000

89258.630,250.000

89293.950,250.000

89329.240,250.000

89364.520,-200.000

89399.790,-200.000

89435.030,-200.000

89470.260,250.000

89505.480,-200.000

89540.670,-200.000

89575.850,250.000

89611.010 -200.000

This is high-speed telemetry: ten samples a second. That slice represents a second and a half of real time, and we can see six oscillations between what I can only presume are off-scale-high and off-scale-low.

So I haven\'t figured that one out yet. I mean yes, you can never discount the possibility that it\'s just a literal computer glitch, an actual bug in my plugin. But I don\'t think it is, because it works basically perfectly in every other respect, near as I can tell. I think it\'s giving me weird data because the in-game universe is weird.

Anyway, the picture I\'ve drawn here of the atmosphere of Kerbin up to 70km is pretty solid, I think. We can break it up into four layers separated by three boundary layers. And what\'s fun about this is that these layers correspond very nicely with the way Earth\'s atmosphere works.

[table]

[tr]

[td]sea level to 8.4km (980 to 186 mb)[/td][td]troposphere[/td]

[/tr]

[tr]

[td]8.4km to 14000km (186 to 60 mb)[/td][td]tropopause[/td]

[/tr]

[tr]

[td]14km to 35km (60 to 1 mb)[/td][td]stratosphere[/td]

[/tr]

[tr]

[td]35km to 39km (1 to <1 mb)[/td][td]stratopause[/td]

[/tr]

[tr]

[td]39km to 56km[/td][td]mesosphere[/td]

[/tr]

[tr]

[td]56km to 63km[/td][td]mesopause[/td]

[/tr]

[tr]

[td]63km to 70km+[/td][td]thermosphere[/td]

[/tr]

[/table]

If you look up the subject on the Wikipedia page, you\'ll find that not only does the structure of Kerbin\'s atmosphere closely match the structure of our own, but even some of the numbers are the same!

Now, as far as I can tell, none of this has any impact on the game whatsoever at this point. Your ship\'s parts get colder and then warmer and then colder and then warmer as you go suborbital, but you wouldn\'t know it unless you wired your rocket up with sensors and recorded a bunch of telemetry data during flights like some kinda nerd. (Hi.)

But it\'s still really neat. Construct an experiment, collect some data, learn some stuff. Science!

Link to comment
Share on other sites

Wow thats pretty interesting. I first thought that the high temperature around 60-70 km is for the re-entry heat ( maybe a little trick to get things overheat). Can you PM me the plugin and the parts? Was it your own work?

Link to comment
Share on other sites

Now, as far as I can tell, none of this has any impact on the game whatsoever at this point. Your ship\'s parts get colder and then warmer and then colder and then warmer as you go suborbital, but you wouldn\'t know it unless you wired your rocket up with sensors and recorded a bunch of telemetry data during flights like some kinda nerd. (Hi.)

From one nerd to another: Nice work! :)

Link to comment
Share on other sites

Wow. The innovation and intelligence of the plugin community never fails to amaze me!

Quick question, is the temperature data that you\'ve gathered the temperature of the parts, not the ambient temperature?

Link to comment
Share on other sites

Quick question, is the temperature data that you\'ve gathered the temperature of the parts, not the ambient temperature?

I was wondering that too, as then the experimental procedure would be important. I bet he was measuring the ambient temperature, though.

Link to comment
Share on other sites

I was wondering that too, as then the experimental procedure would be important. I bet he was measuring the ambient temperature, though.

If it was the ambient temperature, why is it high when he gets into the upper atmosphere? Surely the near-vacuum would make the temperature very low.

Link to comment
Share on other sites

If it was the ambient temperature, why is it high when he gets into the upper atmosphere? Surely the near-vacuum would make the temperature very low.

That is true. The ambient temperature would be close to absolute zero. The temperature of a part would increase (if exposed to the sun) due to the lack of convection cooling.

*edit*

I could be totally wrong about the ambient temperature.

Link to comment
Share on other sites

How do you know the units is in Centigrade?

As I understood it, the ambient temperature model made use of arbitrary numbers, not being connected to any temperature unit we use.

It\'s still possible to convert it to Centigrade, but we would have to know the value of their units and make it comparable in some manner.

Even if it is only arbitrary units, that\'s very...odd....

Link to comment
Share on other sites

I guess Squad is trying to implement a thermosphere at the upper reaches of Kerbin\'s atmosphere. Once again, I’m impressed by their attention to detail!

If you guys are interested, I found a short article about the Earth\'s thermosphere. There\'s a bit of an explanation there about what is going on here on Earth:

Temperatures climb sharply in the lower thermosphere (below 200 to 300 km altitude), then level off and hold fairly steady with increasing altitude above that height. Solar activity strongly influences temperature in the thermosphere. The thermosphere is typically about 200° C (360° F) hotter in the daytime than at night, and roughly 500° C (900° F) hotter when the Sun is very active than at other times. Temperatures in the upper thermosphere can range from about 500° C (932° F) to 2,000° C (3,632° F) or higher.

I knew from my familiarity with the standard atmosphere that temperatures up there are extreme, but I didn\'t ever stop to investigate why. I\'ll have to read more about this when I get some time.

Link to comment
Share on other sites

Wow, thanks for all the feedback. You guys have made my morning.

Many things to reply to here. I\'ll go in order and hope I don\'t miss anything …and split my reply in two to get around the length limit. Sorry.

Can you PM me the plugin and the parts? Was it your own work?

It is my own work. I was heavily inspired by this telemetry plugin, but it didn\'t really suit my needs (no offense to Corax at all), so I wrote my own.

It\'s actually kind of clever, if I can say that without sounding arrogant. It\'s modular. There\'s a part, the telemetry transmitter, which must be attached to every ship you want to receive telemetry from. But the actual data comes from PartModules that can be put on any part. I\'ve got a bunch of sensors in various degrees of polish, but the two that are relevant here are the atmosphere probe (which returns temperature and pressure data) and the KPS sensor —Kerbin Positioning System, har har har, which gives lat/long/alt. I\'m attaching the source code for you guys. Details spoilered for brevity.

Structurally, it\'s pretty straightforward model-view-controller, with some lazy shortcuts. The whole thing is run by ArcturusTelemetryController, a static class (which isn\'t actually static, but whatever). ArcturusTelemetrySensor is a base class that inherits from PartModule; individual sensors inherit from ArcturusTelemetrySensor and implement ArcturusTelemetryDataSource. ArcturusTelemetryTransmitter handles the actual networking, and also interfacing with the main Unity event loop to poll the sensors however-many times a second, where the however-many is user-configurable.

Basically, you add a sensor to any part you like by putting its PartModule info into the relevant part.cfg file, like for example:


MODULE
{
name = ArcturusTelemetrySensorAtmosphere
}

MODULE
{
name = ArcturusTelemetrySensorKPS
}

Just add those lines to the bottom of part.cfg, and boom, that part will be wired up with those sensors next time you launch the game. (Note that PartModules are saved to the persistent.sfs file, meaning you can\'t add PartModules and have them magically apply to saved flights … at least not so far as I can tell. You need to start a new flight at the launchpad for PartModules to take effect.)

Now, technically you could just stop there. Just adding the sensor PartModules to your part gives you some functionality. Specifically, you get a right-click display that looks like this:

UYPCU.png

In this case, I attached two of my sensors —the atmosphere probe and the KPS receiver —to a Probodyne part converted to a MechJeb pod (don\'t judge me), and you can see them updating in real time.

Trouble is, sensors will only give you real-time displays when they are active. Meaning if you\'ve got a sensor in your command pod three stages up, it won\'t do anything until you\'re in orbit, because before that the lower stages are gonna be the active stages.

But you can get around this by using a telemetry transmitter. Unlike the sensors, which are PartModules and can be installed in any part, the transmitter has to be its own part. I don\'t know from modeling or anything, so I\'ve just been using a Probodyne antenna part with a modified part.cfg.

Ro3MX.jpg

You can see this one has just a button on it. Right now (by default) the transmitter is transmitting at low speed: one transmission per second per sensor. You can hit that button to switch the transmitter to high speed: ten transmissions per second per sensor.

To turn a part into a telemetry transmitter, just change its module name from whatever it started out as to:

module = ArcturusTelemetryTransmitter

Note, of course, that doing this will make that part stop being whatever it had been before. So, y\'know, don\'t do this to your command pod.

Here are the part.cfg parameters for the telemetry transmitter, plus their default values:


receiverAddress = 127.0.0.1
receiverPort = 65534
reportsPerSecondAtLowSpeed = 1.0
reportsPerSecondAtHighSpeed = 10.0

The receiverAddress must be an IP address; I didn\'t bother including DNS functionality because I\'m lazy. The two reportsPerSecond parameters obviously set the number of reports you get per second in both the low and the high speed modes. Internally, you\'re limited by the fact that the transmitter polls the sensors in the main physics event loop, so you can\'t get more reports per second than you get more physics frames per second. Oh, also the reporting interval is not deterministic. The transmitter will try to wait exactly one second (or whatever) between reports, but it won\'t do a very good job, because it can only run as often as the Unity engine lets it.

Oh, one more thing. You can have multiple telemetry transmitters on your ship. The transmitters and sensors work in what\'s called a federate. When you start your flight, the various sensors and transmitters all register themselves with the controller. The controller picks one transmitter of all the available transmitters on the ship to be the primary transmitter (it\'s first-come, first-served). That\'ll be the transmitter that actually does all the work; the rest will be idle.

But what if that transmitter is bolted to the side of your first-stage fuel tank? What happens when you stage and that tank drops away? Do you just lose the telemetry signal? Nope. The last thing the transmitter does before it gets disconnected is notify the controller that it\'s going away. The controller then picks one of the other transmitters, the still-working ones, and makes it the new primary transmitter. There will be a little blip in your telemetry —a loss-of-signal followed by an acquisition-of-signal —but failover happens fast. (Within one physics frame, actually.)

Now, what about the data format? Well, here\'s a fun little example.


000,1460.473,0.000,LOW,Sensor Pod 3,ArcturusTelemetryAntenna,TRANSMITTER,00,[ACQUISITION OF SIGNAL]
001,UTC,MET,Recorder speed,Vessel name,Part name,Sensor name,Stage,Exterior temperature (C),Static pressure,Dynamic pressure
002,UTC,MET,Recorder speed,Vessel name,Part name,Sensor name,Stage,Latitude (deg),Longitude (deg),Altitude (m)
003,UTC,MET,Recorder speed,Vessel name,Part name,Sensor name,Stage,Internal temperature (C)
004,UTC,MET,Recorder speed,Vessel name,Part name,Sensor name,Stage,Throttle,Gimbal angle H,Gimbal angle V
001,1461.453,0.000,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,ATMOSPHERE,00,19.468470,0.985592,0.985593
002,1461.453,0.000,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,KPS,00,-0.102668,-74.575390,70.714840
003,1461.453,0.000,LOW,Sensor Pod 3,ArcturusEngineK1,TEMPERATURE,02,19.4045
004,1461.453,0.000,LOW,Sensor Pod 3,ArcturusEngineK1,ENGINE,02,0.000,0.000,0.000
001,1462.453,0.000,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,ATMOSPHERE,00,19.468470,0.985592,0.985593
002,1462.453,0.000,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,KPS,00,-0.102668,-74.575390,70.714830
003,1462.453,0.000,LOW,Sensor Pod 3,ArcturusEngineK1,TEMPERATURE,02,19.40771
004,1462.453,0.000,LOW,Sensor Pod 3,ArcturusEngineK1,ENGINE,02,0.000,0.000,0.000
001,1463.453,0.000,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,ATMOSPHERE,00,19.468470,0.985592,0.985592
002,1463.453,0.000,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,KPS,00,-0.102668,-74.575390,70.714830
003,1463.453,0.000,LOW,Sensor Pod 3,ArcturusEngineK1,TEMPERATURE,02,19.41129
004,1463.453,0.000,LOW,Sensor Pod 3,ArcturusEngineK1,ENGINE,02,0.000,0.000,0.000
001,1464.453,0.000,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,ATMOSPHERE,00,19.468470,0.985592,0.985592
002,1464.453,0.000,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,KPS,00,-0.102668,-74.575390,70.714820
003,1464.453,0.000,LOW,Sensor Pod 3,ArcturusEngineK1,TEMPERATURE,02,19.41504
004,1464.453,0.000,LOW,Sensor Pod 3,ArcturusEngineK1,ENGINE,02,0.000,0.000,0.000
001,1465.453,0.000,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,ATMOSPHERE,00,19.468470,0.985592,0.985593
002,1465.453,0.000,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,KPS,00,-0.102668,-74.575390,70.714830
003,1465.453,0.000,LOW,Sensor Pod 3,ArcturusEngineK1,TEMPERATURE,02,19.41882
004,1465.453,0.000,LOW,Sensor Pod 3,ArcturusEngineK1,ENGINE,02,0.000,0.000,0.000
001,1466.453,0.000,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,ATMOSPHERE,00,19.468470,0.985592,0.985592
002,1466.453,0.000,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,KPS,00,-0.102668,-74.575390,70.714820
003,1466.453,0.000,LOW,Sensor Pod 3,ArcturusEngineK1,TEMPERATURE,02,19.42251
004,1466.453,0.000,LOW,Sensor Pod 3,ArcturusEngineK1,ENGINE,02,0.000,0.000,0.000
001,1467.453,0.000,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,ATMOSPHERE,00,19.468470,0.985592,0.985592
002,1467.453,0.000,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,KPS,00,-0.102668,-74.575390,70.714830
003,1467.453,0.000,LOW,Sensor Pod 3,ArcturusEngineK1,TEMPERATURE,02,19.42607
004,1467.453,0.000,LOW,Sensor Pod 3,ArcturusEngineK1,ENGINE,02,0.000,0.000,0.000
001,1468.453,0.000,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,ATMOSPHERE,00,19.468470,0.985592,0.985592
002,1468.453,0.000,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,KPS,00,-0.102668,-74.575390,70.714820
003,1468.453,0.000,LOW,Sensor Pod 3,ArcturusEngineK1,TEMPERATURE,02,19.42942
004,1468.453,0.000,LOW,Sensor Pod 3,ArcturusEngineK1,ENGINE,02,0.000,0.000,0.000
001,1469.453,0.000,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,ATMOSPHERE,00,19.468470,0.985592,0.985592
002,1469.453,0.000,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,KPS,00,-0.102668,-74.575390,70.714840
003,1469.453,0.000,LOW,Sensor Pod 3,ArcturusEngineK1,TEMPERATURE,02,46.43411
004,1469.453,0.000,LOW,Sensor Pod 3,ArcturusEngineK1,ENGINE,02,0.100,0.000,0.000
001,1470.453,0.580,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,ATMOSPHERE,00,19.445010,0.984964,0.987165
002,1470.453,0.580,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,KPS,00,-0.102668,-74.575390,73.882990
003,1470.453,0.580,LOW,Sensor Pod 3,ArcturusEngineK1,TEMPERATURE,02,854.3469
004,1470.453,0.580,LOW,Sensor Pod 3,ArcturusEngineK1,ENGINE,02,0.600,0.000,0.000
001,1471.453,1.560,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,ATMOSPHERE,00,19.229610,0.979231,0.989610
002,1471.453,1.560,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,KPS,00,-0.102669,-74.575390,103.116500
003,1471.453,1.560,LOW,Sensor Pod 3,ArcturusEngineK1,TEMPERATURE,02,2592.018
004,1471.453,1.560,LOW,Sensor Pod 3,ArcturusEngineK1,ENGINE,02,1.000,0.000,0.000
003,1471.913,2.040,LOW,Sensor Pod 3,ArcturusEngineK1,TEMPERATURE,02,[LOSS OF SIGNAL]
004,1471.913,2.040,LOW,Sensor Pod 3,ArcturusEngineK1,ENGINE,02,[LOSS OF SIGNAL]
001,1472.453,2.580,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,ATMOSPHERE,00,18.719280,0.965883,0.979702
002,1472.453,2.580,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,KPS,00,-0.102673,-74.575410,171.815000
001,1473.453,3.560,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,ATMOSPHERE,00,18.242730,0.953706,0.965060
002,1473.453,3.560,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,KPS,00,-0.102677,-74.575440,235.332900
001,1474.453,4.580,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,ATMOSPHERE,00,17.847310,0.943803,0.952897
002,1474.453,4.580,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,KPS,00,-0.102682,-74.575460,287.522800
001,1475.453,5.580,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,ATMOSPHERE,00,17.531190,0.936014,0.943001
002,1475.453,5.580,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,KPS,00,-0.102686,-74.575490,328.938300
001,1476.453,6.560,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,ATMOSPHERE,00,17.292510,0.930205,0.935197
002,1476.453,6.560,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,KPS,00,-0.102690,-74.575520,359.992700
001,1477.453,7.560,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,ATMOSPHERE,00,17.131350,0.926318,0.929392
002,1477.453,7.560,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,KPS,00,-0.102694,-74.575550,380.981500
001,1478.453,8.580,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,ATMOSPHERE,00,17.045530,0.924259,0.925462
002,1478.453,8.580,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,KPS,00,-0.102697,-74.575580,392.097700
001,1479.453,9.580,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,ATMOSPHERE,00,17.034920,0.924005,0.924661
002,1479.453,9.580,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,KPS,00,-0.102701,-74.575610,393.442200
001,1480.453,10.580,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,ATMOSPHERE,00,17.100030,0.925566,0.928069
002,1480.453,10.580,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,KPS,00,-0.102705,-74.575650,385.051400
001,1481.453,11.580,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,ATMOSPHERE,00,17.238680,0.928904,0.933250
002,1481.453,11.580,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,KPS,00,-0.102709,-74.575680,366.998900
001,1482.453,12.580,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,ATMOSPHERE,00,17.450310,0.934039,0.940215
002,1482.453,12.580,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,KPS,00,-0.102713,-74.575700,339.440900
001,1483.453,13.560,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,ATMOSPHERE,00,17.732140,0.940953,0.948941
002,1483.453,13.560,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,KPS,00,-0.102717,-74.575730,302.612900
001,1484.453,14.580,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,ATMOSPHERE,00,18.079720,0.949602,0.959379
002,1484.453,14.580,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,KPS,00,-0.102720,-74.575750,256.825500
001,1485.453,15.580,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,ATMOSPHERE,00,18.489790,0.959985,0.971523
002,1485.453,15.580,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,KPS,00,-0.102724,-74.575780,202.456300
001,1486.453,16.580,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,ATMOSPHERE,00,18.956990,0.972060,0.985324
002,1486.453,16.580,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,KPS,00,-0.102727,-74.575790,139.942400
001,1487.453,17.580,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,ATMOSPHERE,00,19.476290,0.985802,1.000754
002,1487.453,17.580,LOW,Sensor Pod 3,ArcturusSatelliteCoreSmallFC,KPS,00,-0.102731,-74.575800,69.770870
000,1487.473,17.580,LOW,Sensor Pod 3,ArcturusTelemetryAntenna,TRANSMITTER,00,[LOSS OF SIGNAL]

For starters, it\'s comma-separated data, so think of it in terms of columns. The first column is the channel number. The transmitter always broadcasts on channel 0, and each sensor in the ship gets its own channel starting at 1 and counting up. In this example, channel 4 is an engine sensor (not included in the downloads here).

Right after initial acquisition of signal, up at the top, the transmitter sends out headers describing the data format of each sensor\'s report. After the channel number, reports always start with UTC —universal time, in game —followed by MET —mission elapsed time. Then comes the recorder speed, either LOW or HIGH; this is useful \'cause you can switch your recorder to high before doing something interesting, then later filter out only the data that were recorded at high speed.

Next is the name of the ship, the name of the part the transmission is coming from, the name of the sensor doing the transmitting, and a two-digit stage number to help you identify which reports came from which sensors.

Then comes the actual data, and that\'s unique to each sensor. Here you can see the atmosphere sensor reports external temperature, static pressure and dynamic pressure, while the engine sensor reports the throttle setting and the gimbal angles. Et cetera and so on, really. Sensors can report whatever they need to, since the reports are all channel-muxed anyway.

If you read through this report, you can piece together a neat little story of what happened. See the temperature sensor on the engine, channel 3? The only piece of data it reports is the internal temperature of the part it\'s attached to. Before liftoff (all those lines where MET is zero) the engine temperature is basically room temperature —about 20°C. But after liftoff, the engine temperature skyrockets, going from 20° to 900° to 2500° in three seconds!

Then, two seconds after liftoff, we see the ominous reports on channels 3 and 4:


003,1471.913,2.040,LOW,Sensor Pod 3,ArcturusEngineK1,TEMPERATURE,02,[LOSS OF SIGNAL]
004,1471.913,2.040,LOW,Sensor Pod 3,ArcturusEngineK1,ENGINE,02,[LOSS OF SIGNAL]

The engine exploded. It overheated and blew up. We get no more reports from that engine for the duration of the flight, \'cause it went kaboom.

Reading down, paying attention now to the KPS receiver, we can see that over the next seven and a half seconds what was left of the vehicle coasted up to about 350 meters above sea level before falling back again. Seventeen and a half seconds into the flight, the signal from the telemetry transmitter was lost.

So …yeah. Fun stuff.

Link to comment
Share on other sites

From one nerd to another: Nice work! :)

Thanks!

Wow. The innovation and intelligence of the plugin community never fails to amaze me!

Quick question, is the temperature data that you\'ve gathered the temperature of the parts, not the ambient temperature?

It\'s the ambient temperature, not the temperature of the parts. In this case, I was using a sensor that records the instantaneous external temperature (by calling vessel.flightIntegrator.getExternalTemperature() if you care). The idea is of a thermocouple just stuck out into the airflow (though I didn\'t bother to model in noise or measurement error, because I\'m a dirty dirty cheater). That\'s why the graph is so hard-edged. If I had recorded part temperatures, everything would be all rounded, because of the hysteresis of a part\'s temperature as it changes according to e to the t delta T.

If it was the ambient temperature, why is it high when he gets into the upper atmosphere? Surely the near-vacuum would make the temperature very low.

Actually it doesn\'t. In real life, both the stratosphere and the thermosphere get warmer the higher you go, in contrast to the troposphere (where you probably are right now) and the mesosphere where higher-means-colder.

The temperature of a part would increase (if exposed to the sun) due to the lack of convection cooling.

Actually I have no idea —yet! — how warming and cooling work in the Kerboverse. That\'s what originally motivated me to build thermosensors into the game in the first place: to do some science on parts heating up and cooling down. But I haven\'t actually done that science successfully yet (though I think I\'m onto something about a bug related to the Strut part class not respecting the heat conduction or dissipation parameters).

Basically, I could see it going two ways. First, the game currently models temperature changes very simply, essentially ignoring conduction and just modeling radiation, probably using a Newton\'s-law-of-cooling model of e to the ±k t, varying k based on the heatDissipation part.cfg parameter. In that case, the temperature of a part would vary based solely on the ambient temperature and its intrinsic properties, and not on atmospheric pressure at all. That\'s where the smart money is, if you ask me. (Except for struts, which appear not to vary in how their temperatures change at all, but I\'m still working that out.)

The other possibility is that temperature changes also depend on static pressure, and the heatConductivity parameter figures in there: two parts of equal heatDissipation, one with high heatConductivity and one with low heatConductivity, should change their temperature in a vacuum the same way, but the one with high conductivity will change it faster in atmosphere, as a function of the static pressure on the part. That\'s possible, and frankly it\'d be kinda awesome if it were the case, but I just haven\'t done the science yet. Been busy writing back to you jokers. ;)

How do you know the units is in Centigrade?

Empirically. Sea-level (well, KSC-level) ambient temperature is about 20°C, which is 68°F, which is room temperature. The lowest temperature measured in the atmosphere is about –85°C, which is consistent with the temperature we measure at the top of the Earth\'s mesosphere. The hottest temperature I\'ve measured in Kerbin orbit is 250°C, which is reasonably consistent with being in sunlight that close to a star like Kerbol.

If the units aren\'t °C, then they\'re close enough to make no difference. Everything I\'ve learned so far says that if you assume temperatures in the Kerboverse are measured in °C, everything makes sense. Even Newton\'s law of cooling makes sense to a high degree of accuracy, with a k of around 0.2. So °C it is, until there\'s some reason to think otherwise.

Besides, calling them °K would just get confusing for all sorts of reasons.

Link to comment
Share on other sites

Thanks!

It\'s the ambient temperature, not the temperature of the parts. In this case, I was using a sensor that records the instantaneous external temperature (by calling vessel.flightIntegrator.getExternalTemperature() if you care). The idea is of a thermocouple just stuck out into the airflow (though I didn\'t bother to model in noise or measurement error, because I\'m a dirty dirty cheater). That\'s why the graph is so hard-edged. If I had recorded part temperatures, everything would be all rounded, because of the hysteresis of a part\'s temperature as it changes according to e to the t delta T.

That\'s actually very cool (excuse the pun), I didn\'t realise that accurate temperature measurement was such an inherent part of Unity, let alone KSP. This also means that things like re-entry heat can be done accurately and thus prevented so.

Actually it doesn\'t. In real life, both the stratosphere and the thermosphere get warmer the higher you go, in contrast to the troposphere (where you probably are right now) and the mesosphere where higher-means-colder.

I actually looked this up a while after posting and found that out. It seems so odd that something on the edge of space can be so warm, but I guess it has little to no matter to dissipate the intense thermal energy it receives from the Sun to.

Link to comment
Share on other sites

Wow, thanks for all the feedback. You guys have made my morning.

Many things to reply to here. I\'ll go in order and hope I don\'t miss anything … and split my reply in two to get around the length limit. Sorry.

It is my own work. I was heavily inspired by this telemetry plugin, but it didn\'t really suit my needs (no offense to Corax at all), so I wrote my own.

It\'s actually kind of clever, if I can say that without sounding arrogant. It\'s modular. There\'s a part, the telemetry transmitter, which must be attached to every ship you want to receive telemetry from. But the actual data comes from PartModules that can be put on any part. I\'ve got a bunch of sensors in various degrees of polish, but the two that are relevant here are the atmosphere probe (which returns temperature and pressure data) and the KPS sensor — Kerbin Positioning System, har har har, which gives lat/long/alt. I\'m attaching the source code for you guys. Details spoilered for brevity.

[snip]

Wow, just wow. It is quite clever, you may say so with all justification. I was trying to head in the direction of modularity, but obviously you put a lot more thought into it...

Many thanks for sharing the code, there\'s a lesson or five in it for me :)

Link to comment
Share on other sites

I\'m impressed by two things here.

First, at this early stage of the game, the devs seem to have done a large amount of the groundwork for later features.

Second, that there are people creating mods to do science in a game I\'d only thought was essentially a rocket making game. The potential for this game to have some pretty realistic simulation options is awesome.

Link to comment
Share on other sites

Wow, just wow. It is quite clever, you may say so with all justification. I was trying to head in the direction of modularity, but obviously you put a lot more thought into it...

Many thanks for sharing the code, there\'s a lesson or five in it for me :)

Do me a favor and don\'t study the code too closely, okay? In further messing around with it I discovered some major problems with it. I mean, it wasn\'t crashing or anything, but it just has some stupidity. I did some serious surgery on it today. Fixed the update-loop problem, incidentally, in a way that\'s practically embarrassing it\'s so obvious. PartModules can only receive update and fixedupdate messages when they\'re active, right? Only parts can receive those messages when they\'re inactive. Well, duh, the transmitter is a part! So now I have the transmitter accepting partupdate and partfixedupdate messages from the game, then sending update and fixedupdate messages to the controller, which in turn dispatches them to the sensors. The sensors, in turn, are now programmed to update their GUIs only when they receive an update from the controller, but to update their internal data structures on every fixedupdate from the controller, which happens every physics frame. It\'s a lot more efficient, plus you get GUIs on inactive parts.

Now if only I could figure out how to make my dang stress sensor work! I want badly to have a sensor that measures the instantaneous stress on joints between parts, but by god, I have absolutely no idea how to get the game to give me that information. Unity doesn\'t appear even to expose forces or torques through the API at all. So far as I\'ve been able to tell, merely hooking up a simple strain gauge to my rockets is beyond the realm of possibility at this time. Disappointing.

But on another note…

I\'m impressed by two things here.

First, at this early stage of the game, the devs seem to have done a large amount of the groundwork for later features.

Second, that there are people creating mods to do science in a game I\'d only thought was essentially a rocket making game. The potential for this game to have some pretty realistic simulation options is awesome.

I know, right? I was sitting there last night sending up rockets with sensors on them to collect data, then sending the resulting data sets through various analytical tools when I had the sudden realization: 'Hey, I\'m doing actual science here!' Yes, it\'s just a videogame, but in this case, the scientific method totally applies. And works!

(I\'ve made good progress on the temperature thing, by the way. I figured out two things. First, the game ignores the heatConductivity and heatDissipation part.cfg parameters. Just overrides them completely. So you can\'t make a radiator that way. But I was able to work around it by subclassing Part, and I learned that heatConductivity —the actual runtime parameter, not the config-file one which is ignored — works exactly like I thought it would. It\'s the exponent in Newton\'s law of cooling. The instantaneous temperature T of an insulated part at some time t in the future is given by Ta plus To - Ta times e to the -hC t, where Ta is the ambient temperature, To is the starting temperature of the part and hC is the heatConductivity value. How this works with heatDissipation I haven\'t figured out yet. All my real experiments have been done at sea level, \'cause I still haven\'t built a thermocouple that can give me meaningful temperature data in a vacuum. From sample to sample, the temperature oscillates between -200°C and 250°C, but if you average it out, you get a meaningful temperature that appears to depend on orientation toward the sun. A one-by-two-meter cylindrical part oriented broadside to the sun while in orbit has a much higher average internal temperature than the same cylinder oriented ass-on to the sun. But like I said, I\'m still refining the sensor algorithms to separate the signal from the noise there, so no conclusions yet.)

Link to comment
Share on other sites

Do you think it\'s rapidly swinging from 250C to -250C because it\'s constantly swinging between being in sunlight/away from sunlight?

Maybe it\'s a glitch that even while it\'s facing the sun, the data is still swinging between away and towards sunlight

Link to comment
Share on other sites

Hmm...that first chart looks familiar: ;P

Ha! That\'s pretty cool. It\'s just like being a real scientist, only one of God\'s own angels comes down to tell you when your experiment worked.

Maybe you\'ll have something to say about the soonish-to-be-posted results from Thermopod 3, currently orbiting Kerbin at an altitude of 125 km with the recorders on high speed. I\'m getting some very interesting temperature data that should shed some light on just how parts heat up and cool down in a vacuum in the Kerboverse. I did an orbit earlier that showed some intriguing trends, but I needed higher resolution data, so we\'re back at it. (Have to run the sim at no more than 2x so physics keeps working, so orbits take about 20 minutes of real time. Then there\'s all the number-crunching, obviously. My poor laptop.)

Do you think it\'s rapidly swinging from 250C to -250C because it\'s constantly swinging between being in sunlight/away from sunlight?

Maybe it\'s a glitch that even while it\'s facing the sun, the data is still swinging between away and towards sunlight

I think that\'s a distinct possibility, or at least something along those lines. I think I was on the wrong track trying to take instantaneous temperature readings of the vacuum itself, for reasons that are obvious in retrospect. So I\'m trying something different. I\'ve got a satellite with known thermal properties up there, and I\'m collecting high-res data about its temperature instead as it moves into and out of sunlight. Stay tuned,

Link to comment
Share on other sites

…

Now if only I could figure out how to make my dang stress sensor work! I want badly to have a sensor that measures the instantaneous stress on joints between parts, but by god, I have absolutely no idea how to get the game to give me that information. Unity doesn\'t appear even to expose forces or torques through the API at all. So far as I\'ve been able to tell, merely hooking up a simple strain gauge to my rockets is beyond the realm of possibility at this time. Disappointing.…

Gee, you\'d think you\'d be able to track the distortions in a zero-strength strut spanning two parts, but then I wouldn\'t know, not being a programmer and all.

Link to comment
Share on other sites

Gee, you\'d think you\'d be able to track the distortions in a zero-strength strut spanning two parts, but then I wouldn\'t know, not being a programmer and all.

I would have imagined that there would be a variable, for the amount of pull on a strut, that could be called. It must record it somewhere, how else would it know when breaking point had been reached.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...