Example #1
0
        public static string FormatEntryAngles(TotalSunHeat data)
        {
            var sb       = new StringBuilder();
            var sbHour   = new StringBuilder();
            var sbVal    = new StringBuilder();
            var listData = data.CalculateEntryAngleForAll();



            sb.AppendLine(">>Overzicht hellingshoeken: ");
            foreach (var dat in listData)
            {
                sb.AppendFormat(">>Alpha: {0}\n", TotalSunHeat.CalculateRadianToDegree(dat.Item1));
                sb.AppendFormat(">>WandAzimuth: {0}\n", dat.Item2);
                var list = dat.Item3;
                sbHour = new StringBuilder();
                sbVal  = new StringBuilder();
                sbHour.AppendFormat("|{0,13}|", "uur");
                sbVal.AppendFormat("|{0,13}|", "invals hoek");
                foreach (var yeet in list)
                {
                    sbHour.AppendFormat("|{0,8}|", yeet[0]);
                    sbVal.AppendFormat("|{0,8:N2}|", TotalSunHeat.CalculateRadianToDegree(yeet[1]));
                }

                sb.AppendLine(sbHour.ToString());
                sb.AppendLine(sbVal.ToString());
                sb.Append("\n");
                sb.Append("\n");
            }

            return(sb.ToString());
        }
Example #2
0
        private int GenerateHellAngle(int rowIndex, ISheet sheet)
        {
            var row13 = sheet.CreateRow(rowIndex);

            row13.CreateCell(0).SetCellValue("overzicht hellingshoeken");
            rowIndex++;
            rowIndex++;

            var list = _calc.CalculateEntryAngleForAll();


            foreach (var data in list)
            {
                var alpha = sheet.CreateRow(rowIndex);
                alpha.CreateCell(0).SetCellValue("Alpha");
                alpha.CreateCell(1).SetCellValue(TotalSunHeat.CalculateRadianToDegree(data.Item1));

                rowIndex++;

                var wandAzimuth = sheet.CreateRow(rowIndex);
                wandAzimuth.CreateCell(0).SetCellValue("wand azimuth");
                wandAzimuth.CreateCell(1).SetCellValue(data.Item2);

                rowIndex++;
                int col_hoogte_zon = 2;
                var uur            = sheet.CreateRow(rowIndex);
                uur.CreateCell(0).SetCellValue("uur");
                uur.CreateCell(1).SetCellValue("uur");
                rowIndex++;
                var zonnehoogte = sheet.CreateRow(rowIndex);
                zonnehoogte.CreateCell(0).SetCellValue("zonnehoogte");
                rowIndex++;
                zonnehoogte.CreateCell(1).SetCellValue("graden");
                foreach (var yeet in data.Item3)
                {
                    uur.CreateCell(col_hoogte_zon).SetCellValue(yeet[0]);
                    zonnehoogte.CreateCell(col_hoogte_zon).SetCellValue(TotalSunHeat.CalculateRadianToDegree(yeet[1]));

                    col_hoogte_zon++;
                }

                rowIndex++;
                rowIndex++;
            }

            return(rowIndex);
        }