Exemplo n.º 1
0
        void UpdateDatablob(SystemBodyInfoDB origionalDB, SensorInfoDB sensorInfo)
        {
            Random rng      = new Random(); //TODO: rand should be deterministic.
            float  accuracy = sensorInfo.HighestDetectionQuality.SignalQuality;

            if (sensorInfo.HighestDetectionQuality.SignalQuality > 0.20)
            {
                BodyType = origionalDB.BodyType;
            }
            else
            {
                BodyType = BodyType.Unknown;
            }
            if (sensorInfo.HighestDetectionQuality.SignalQuality > 0.80)
            {
                Tectonics = origionalDB.Tectonics;
            }
            else
            {
                Tectonics = TectonicActivity.Unknown;
            }
            //TODO: #SensorClone, #TMI more random to the rest of it.
            var tilt = SensorProcessorTools.RndSigmoid(origionalDB.AxialTilt, accuracy, rng);

            AxialTilt           = (float)tilt;
            MagneticField       = origionalDB.MagneticField;
            BaseTemperature     = origionalDB.BaseTemperature;
            RadiationLevel      = origionalDB.RadiationLevel;
            AtmosphericDust     = origionalDB.AtmosphericDust;
            SupportsPopulations = origionalDB.SupportsPopulations;
            LengthOfDay         = origionalDB.LengthOfDay;
            Gravity             = origionalDB.Gravity;
            Minerals            = new Dictionary <Guid, MineralDepositInfo>(origionalDB.Minerals); //This really needs to be handled properly
        }
Exemplo n.º 2
0
        void Update(StarInfoDB db, SensorInfoDB sensorInfo)
        {
            Random rng      = new Random();
            float  accuracy = sensorInfo.HighestDetectionQuality.SignalQuality;

            Age         = SensorProcessorTools.RndSigmoid(db.Age, accuracy, rng);
            Temperature = SensorProcessorTools.RndSigmoid(db.Temperature, accuracy, rng);
            Luminosity  = SensorProcessorTools.RndSigmoid(db.Luminosity, accuracy, rng);
            Class       = db.Class;

            SpectralType        = db.SpectralType;
            SpectralSubDivision = db.SpectralSubDivision;
            LuminosityClass     = db.LuminosityClass;
        }