double CalculateAreaExposed(ModularFI.ModularFlightIntegrator fi, Part part, FARAeroPartModule aeroModule)
        {
            if ((object)aeroModule != null)
            {
                double exposedArea = aeroModule.ProjectedAreaLocal(-part.dragVectorDirLocal);

                if (exposedArea > 0)
                {
                    return(exposedArea);
                }
                else
                {
                    return(fi.BaseFICalculateAreaExposed(part));
                }
            }
            else
            {
                return(fi.BaseFICalculateAreaExposed(part));
            }

            /*else
             * {
             *  if (stockRadArea > 0)
             *      return aeroModule.ProjectedAreas.totalArea * dragCubeExposed / stockRadArea;
             *  else
             *      return aeroModule.ProjectedAreas.totalArea;
             * }*/
        }
Esempio n. 2
0
        private static double CalculateAreaExposed(ModularFlightIntegrator fi, Part part, FARAeroPartModule aeroModule)
        {
            if (aeroModule is null)
            {
                return(fi.BaseFICalculateAreaExposed(part));
            }
            double exposedArea = aeroModule.ProjectedAreaLocal(-part.dragVectorDirLocal);

            return(exposedArea > 0 ? exposedArea : fi.BaseFICalculateAreaExposed(part));
        }
 double CalculateAreaExposed(ModularFI.ModularFlightIntegrator fi, Part part, FARAeroPartModule aeroModule)
 {
     if ((object)aeroModule == null)
         return fi.BaseFICalculateAreaExposed(part);
     else
         return aeroModule.ProjectedAreaLocal(-part.dragVectorDirLocal);
     /*else
     {
         if (stockRadArea > 0)
             return aeroModule.ProjectedAreas.totalArea * dragCubeExposed / stockRadArea;
         else
             return aeroModule.ProjectedAreas.totalArea;
     }*/
 }
        private static double CalculateAreaExposed(ModularFlightIntegrator fi, Part part, FARAeroPartModule aeroModule)
        {
            if (aeroModule is null)
            {
                return(fi.BaseFICalculateAreaExposed(part));
            }

            // Apparently stock exposed area is actually weighted by some function of mach number...
            // otherwise heating is much lower
            double exposedArea = FARSettings.ExposedAreaUsesKSPHack
                                     ? part.DragCubes.ExposedArea
                                     : aeroModule.ProjectedAreaLocal(-part.dragVectorDirLocal);

            return(exposedArea > 0 ? exposedArea : fi.BaseFICalculateAreaExposed(part));
        }