src/AircraftTrajectories/Models/Visualisation/KML/AnimationSections/AnnoyanceKMLAnimator.cs
/// <summary>
/// Return a string in KML format containing all updates
/// for the population annoyance at the given moment in time
/// </summary>
/// <returns></returns>
Return a string in KML format containing all updates
for the population annoyance at the given moment in time
Return a string in KML format containing all updates for the population annoyance at the given moment in time
public string KMLAnimationStep(int t)
        {
            Grid grid = _temporalGrid.GetGrid(t);
            int houseId = 0;
            string updateString = "";
            foreach (double[] row in _populationData)
            {
                houseId++;
                Point gridIndex = grid.CoordinateToGridIndex(row[0], row[1]);
                double noiseAtHouse = grid.Data[gridIndex.X][gridIndex.Y];
                bool awakens = randomBool(getChance(noiseAtHouse), houseId);
                if (awakens)
                {
                    updateString += @"
                    <IconStyle targetId='house_iconstyle_" + houseId + @"'>
                        <scale>1.3</scale>
                        <Icon>
                            <href>" + ImageAnnoyed + @"</href>
                        </Icon>
                    </IconStyle>
                    ";
                }
            }
            return updateString;
        }
public string KMLAnimationStep ( int t ) { Grid grid = _temporalGrid . GetGrid ( t ) ; int houseId = 0 ; string updateString = " " ; foreach ( double [ ] row in _populationData ) { houseId ++ ; Point gridIndex = grid . CoordinateToGridIndex ( row [ 0 ] , row [ 1 ] ) ; double noiseAtHouse = grid . Data [ gridIndex . X ] [ gridIndex . Y ] ; bool awakens = randomBool ( getChance ( noiseAtHouse ) , houseId ) ; if ( awakens ) { updateString += @"
                    <IconStyle targetId='house_iconstyle_" + houseId + @"'>
                        <scale>1.3</scale>
                        <Icon>
                            <href>" + ImageAnnoyed + @"</href>
                        </Icon>
                    </IconStyle>
                    " ; } } return updateString ; }
Return a string in KML format containing all updates
for the population annoyance at the given moment in time
Return a string in KML format containing all updates for the population annoyance at the given moment in time
None
t
int