src/AircraftTrajectories/Models/Optimisation/FlightSimulator.cs
/// <summary>
/// Update the noise values underneath the aircraft trajectory
/// </summary>
Update the noise values underneath the aircraft trajectory
Update the noise values underneath the aircraft trajectory
public void updateNoise()
        {
            if (duration % 10 != 0) { return; }
            var NPD = NoisePowerDistance.Instance;
            NPD.CalculateNoise(new Point3D(_x,_y, _height * 0.3048, CoordinateUnit.metric), CurrentThrust()/4.0*0.2248);
        }
public void updateNoise ( ) { if ( duration % 10 != 0 ) { return ; } var NPD = NoisePowerDistance . Instance ; NPD . CalculateNoise ( new Point3D ( _x , _y , _height * 0.3048 , CoordinateUnit . metric ) , CurrentThrust ( ) / 4.0 * 0.2248 ) ; }
Update the noise values underneath the aircraft trajectory
Update the noise values underneath the aircraft trajectory
/*
            if(duration % 25 != 0) { return; }
            var thrust = CurrentThrust();
            var NPD = NoisePowerDistance.Instance;

            double z = _height * 0.3048;
            double[][] data = new double[160][];
            for (int x=0; x<20000; x = x+125)
            {
                double[] col = new double[160];
                for (int y=0; y<20000; y = y+125)
                {
                    double dx = (x - _x);
                    double dy = (y - _y);
                    double dz = z;
                    var distance = Math.Sqrt(dx*dx + dy*dy + dz*dz);
                    var noise = NPD.GetNoiseValue("2CF650",'E','D',distance, thrust);
                    col[y / 125] = (LAMaxGrid == null) ? noise : Math.Max(noise, LAMaxGrid.Data[x/125][y/125]);
                }
                data[x / 125] = col;
            }
            Grid grid = new Grid(data, false);
            LAMaxGrid = grid;
            */