示例#1
0
        public StarScannedEvent(DateTime timestamp, string name, string stellarclass, decimal solarmass, decimal radius, decimal absolutemagnitude, long age, decimal temperature, decimal distancefromarrival, decimal?orbitalperiod, decimal rotationperiod, decimal?semimajoraxis, decimal?eccentricity, decimal?orbitalinclination, decimal?periapsis, List <Ring> rings) : base(timestamp, NAME)
        {
            this.name              = name;
            this.stellarclass      = stellarclass;
            this.solarmass         = solarmass;
            this.radius            = radius;
            this.absolutemagnitude = absolutemagnitude;
            this.age                 = age;
            this.temperature         = temperature;
            this.distancefromarrival = distancefromarrival;
            this.orbitalperiod       = orbitalperiod;
            this.rotationperiod      = rotationperiod;
            this.semimajoraxis       = semimajoraxis;
            this.eccentricity        = eccentricity;
            this.orbitalinclination  = orbitalinclination;
            this.periapsis           = periapsis;
            this.rings               = rings;
            solarradius              = StarClass.solarradius(radius);
            luminosity               = StarClass.luminosity(absolutemagnitude);
            StarClass starClass = StarClass.FromName(this.stellarclass);

            if (starClass != null)
            {
                massprobability   = StarClass.sanitiseCP(starClass.stellarMassCP(solarmass));
                radiusprobability = StarClass.sanitiseCP(starClass.stellarRadiusCP(this.solarradius));
                tempprobability   = StarClass.sanitiseCP(starClass.tempCP(this.temperature));
                ageprobability    = StarClass.sanitiseCP(starClass.ageCP(this.age));
                chromaticity      = starClass.chromaticity;
            }
        }
示例#2
0
        }                                            // One of Basic, Detailed, NavBeacon, NavBeaconDetail

        public StarScannedEvent(DateTime timestamp, string scantype, string name, string stellarclass, decimal solarmass, decimal radius, decimal absolutemagnitude, string luminosityclass, long age, decimal temperature, decimal distancefromarrival, decimal?orbitalperiod, decimal rotationperiod, decimal?semimajoraxis, decimal?eccentricity, decimal?orbitalinclination, decimal?periapsis, List <Ring> rings) : base(timestamp, NAME)
        {
            this.scantype          = scantype;
            this.name              = name;
            this.stellarclass      = stellarclass;
            this.solarmass         = solarmass;
            this.radius            = radius;
            this.absolutemagnitude = absolutemagnitude;
            this.luminosityclass   = luminosityclass;
            this.age                 = age;
            this.temperature         = temperature;
            this.distancefromarrival = distancefromarrival;
            this.orbitalperiod       = orbitalperiod;
            this.rotationperiod      = rotationperiod;
            this.semimajoraxis       = semimajoraxis;
            this.eccentricity        = eccentricity;
            this.orbitalinclination  = orbitalinclination;
            this.periapsis           = periapsis;
            this.rings               = rings;
            solarradius              = StarClass.solarradius(radius);
            luminosity               = StarClass.luminosity(absolutemagnitude);
            StarClass starClass = StarClass.FromName(this.stellarclass);

            if (starClass != null)
            {
                massprobability   = StarClass.sanitiseCP(starClass.stellarMassCP(solarmass));
                radiusprobability = StarClass.sanitiseCP(starClass.stellarRadiusCP(this.solarradius));
                tempprobability   = StarClass.sanitiseCP(starClass.tempCP(this.temperature));
                ageprobability    = StarClass.sanitiseCP(starClass.ageCP(this.age));
                chromaticity      = starClass.chromaticity.localizedName;
                if (radius != 0 && temperature != 0)
                {
                    // Minimum estimated single-star habitable zone (target black body temperature of 315°K / 42°C / 107°F or less)
                    estimatedhabzoneinner      = StarClass.DistanceFromStarForTemperature(maxHabitableTempKelvin, Convert.ToDouble(radius), Convert.ToDouble(temperature));
                    this.estimatedhabzoneinner = estimatedhabzoneinner;

                    // Maximum estimated single-star habitable zone (target black body temperature of 223.15°K / -50°C / -58°F or more)
                    estimatedhabzoneouter      = StarClass.DistanceFromStarForTemperature(minHabitableTempKelvin, Convert.ToDouble(radius), Convert.ToDouble(temperature));
                    this.estimatedhabzoneouter = estimatedhabzoneouter;
                }
            }
            this.estimatedvalue = estimateValue(scantype == "Detailed" || scantype == "NavBeaconDetail");
        }