Jump to content

Useful Atmospheric-Fluid-Spectro-Variometer--calculate gas % on planets


seanth

Recommended Posts

When the Atmospheric-Fluid-Spectro-Variometer part appeared, were you disappointed that it didn't give you numbers for atmospheric gas? I was.

Turns out if you add some resourceharvester modules to it, define what gasses are on what planets (or use the Community Resource Pack), and use a PressMat Barometer, you can calculate the % of gasses on the planet your sensor is on.

There is a TL;DR blog post going into detail, but the simple version is:

EDITED FOR SIMPLER METHOD

1.) Grab a small mod that provides a module manager patch for the Atmospheric-Fluid-Spectro-Variometer (AFSV) (and two optional files defining Kerbin and Duna's atmospheres in the AtmosphereDefinitions.zip)

2.) Make a craft with a AFSV

3.) Launch the craft and activate the filter for the gas you want to detect on the AFSV (the example can detect N2, O2, CO2, kethaneGas, and water vapour)

4.) Quickly write down the rates displayed. There is a bug(?) in Squad's module where the rates will continue to increase over time, making the values increasingly incorrect.

6.) Use the following equation to calculate the % of the gas you are interested in:

(L/s from the AFSV)*(conversion factor)=%

Conversion Factors:

Eve: 0.3933

Kerbin: 2.2165

Duna: 27.2904

Laythe: 3.3933

Or calcuate the conversion factor (not as accurate) using:

Correction factor=561.42834*(kPa^-1.187582)

Screenshot%2525202015-07-30%25252014.41.19.png

Example from the image:

O2 rate=9.411L/s. Conversion factor=2.2165

(9.411L/s)*(2.2165s*L-1)=20.86% O2 detected by sensor

Download: GitHub

Edited by seanth
Link to comment
Share on other sites

Addendum:

I just realized the conversion value for Kerbin is comfortable close to the number of liters that holds 1 mole of gas at STP: 22.4L

Some quick checks showed that my "conversions" are actually the the volume of gas on the planet in question, at 0C, that will hold 1mole of gas.

The formula is V= [(n*R*T)/P]/10; where n =1(so we can ignore it), R = 8.314621, and T is in K, so (Temp in C)+273.16. Set Temp to 0 for easy calculations of a "STP" on different planets

Example: Atmospheric pressure on Laythe, according to the wiki, is 60.795 kPa:

V=[(8.314621*273.16)/60.795]/10=3.3933

Which is exactly the conversion factor for Laythe I had gotten previously.

This new method gives much more accurate results since you can look at a thermometer and a barometer to get the conversion factor you need.

Now...why do you divide the whole thing by 10? One possibility is that the code is using a value for R that doesn't have the units of L*kPa*mol-1*K-1. R would have to be 0.8314621 in the code for this to be true.

Edited by seanth
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...