private static double CalculateBodyArea(ModularFlightIntegrator fi, PartThermalData ptd) { FARAeroPartModule module = null; if (ptd.part.Modules.Contains <FARAeroPartModule>()) { module = ptd.part.Modules.GetModule <FARAeroPartModule>(); } if (module is null) { return(fi.BaseFIBodyArea(ptd)); } double bodyArea = module.ProjectedAreaWorld(-fi.Vessel.upAxis) * ptd.bodyAreaMultiplier; return(bodyArea > 0 ? bodyArea : fi.BaseFIBodyArea(ptd)); }
private static double CalculateSunArea(ModularFlightIntegrator fi, PartThermalData ptd) { FARAeroPartModule module = null; if (ptd.part.Modules.Contains <FARAeroPartModule>()) { module = ptd.part.Modules.GetModule <FARAeroPartModule>(); } if (module is null) { return(fi.BaseFIGetSunArea(ptd)); } double sunArea = module.ProjectedAreaWorld(fi.sunVector) * ptd.sunAreaMultiplier; return(sunArea > 0 ? sunArea : fi.BaseFIGetSunArea(ptd)); }