public static void QualityInformationInitializer(int minHdop, int maxHdop, int hdopDecimals, Int16 minSat, Int16 maxSat) { List<QualityInformation> SatHdopList = new List<QualityInformation>(); for (Int16 x = minSat; x <= maxSat; x++) { for (int y = minHdop; y <= maxHdop; y++) { SatHdopList.Add(new QualityInformation(x, y)); } } /* DECIMALER TIL SAT/HDOP. DER ER PRECISION LOSS I DEN HER MÅDE AT GØRE DET PÅ FIND PÅ EN NY METODE HVIS DET ER VIGTIGT double decimalStart = 1; double tickDistance = 0; if (hdopDecimals > 0) { tickDistance = Math.Pow(0.1, hdopDecimals); decimalStart = decimalStart - tickDistance; for (Int16 x = minSat; x <= maxSat; x++) { for (int y = minHdop; y <= maxHdop; y++) { for (double z = decimalStart; z <= 0; z -= tickDistance) { SatHdopList.Add(new QualityInformation(x, y + z)); } } } } else { for (Int16 x = minSat; x <= maxSat; x++) { for (int y = minHdop; y <= maxHdop; y++) { SatHdopList.Add(new QualityInformation(x, y)); } } } */ DBController dbc = new DBController(); foreach (QualityInformation QI in SatHdopList) { dbc.AddQualityInformation(QI); } dbc.Close(); //Number of decimals //hdop 30 //sat 33 //https://en.wikipedia.org/wiki/List_of_GPS_satellites }