Sigma Dimensions

Sigma Dimensions

1.4k Downloads

Improper rescaling of homeworld atmospheres

CashnipLeaf opened this issue ยท 3 comments

commented

Relevant lines:

if (body.transform.name == "Kerbin" && list.Count > 0) { list.RemoveAt(0); }

if (body.transform.name == "Kerbin") { list.Insert(0, new[] { 0, 101.325, 0, 0, }); }

If a celestial body has the internal name "Kerbin" (which the homeworld of a system replacer would likely have) and has an atmosphere, then Sig Dim sets its sea level pressure to a hard-coded value of 101.325 kPa (equal to stock Kerbin's sea level pressure), regardless of what the sea level pressure for that homeworld as defined by its atmospherePressureCurve is, while leaving the rest of the body's atmosphere pressure curve untouched. This can lead to the following behaviors:

  • If the body's atmosphere is normally thinner than Kerbin's, this results in the sea level pressure being higher (sometimes much higher) than it should be, while the rest of the atmosphere is unaffected.
  • If the body's atmosphere is normally thicker than Kerbin's, it can create a situation where atmospheric pressure initially increases with altitude before reaching a peak and dropping off like it normally would for that body.

Fig. 1: Kcalbeloh System's Efil at 2.5x rescale, showing the normal sea level pressure of 75.9938kPa.
https://media.discordapp.net/attachments/939249946027245587/1232387089719365683/image.png?ex=6629456a&is=6627f3ea&hm=024e89cd57550b2c8c224db1f71feef8489ca01b21275c2068ffbb6661e1fec0&=&format=webp&quality=lossless&width=1202&height=676

Fig. 2: Kcalbeloh System's Efil at 2.5x rescale, this time with the planet pack's homeswitch setting set to "Efil", which sets Efil's internal name to "Kerbin". Its sea-level pressure has been changed by Sig Dim to the aforementioned hard-coded value of 101.325kPa.
https://media.discordapp.net/attachments/939249946027245587/1232390962517381251/image.png?ex=66294906&is=6627f786&hm=2ad8d0abc8594abbbe4e62adcefb0f73e671cf7587b47f2c05e9f76c74a3e1c4&=&format=webp&quality=lossless&width=1200&height=676

commented

tbh I don't recall exactly why this was added, I remember it was necessary at the time but I can't remember why

I will take a look and let you know if I find the original reason for adding it, this way it might be easier to decide how to procede now

commented

was easier to find than I expected:

a4d2231#diff-d1ce8890c4ad0ff0bdfbe987bf44d4536ee74284b7a9bc77b91dd01cb768af84L137-L149

in version 10.7 I removed the ISP fix from the .cfg files but forgot to remove those 2 lines you highlighted from the plugin

those can be safely be removed at this point

commented

I removed the offending lines as part of the adoption by R-T-B. Thanks for following up, though.