private int AddDip(MONG mg, LTM_Survey_Data survey) { // Water depth below gl (m) if (survey.depth_gwl_bgl != null) { MOND md = NewMOND(mg, survey); md.MOND_TYPE = "WDEP"; md.MOND_RDNG = Convert.ToString(survey.depth_gwl_bgl); md.MOND_UNIT = "m"; md.MOND_INST = "Dipmeter:" + survey.dip_instr; md.MOND_REM = survey.dip_com; MOND.Add(md); } // Water depth if dry if (survey.dip_check == "dry") { MOND md = NewMOND(mg, survey); md.MOND_TYPE = "WDEP"; md.MOND_RDNG = "Dry"; md.MOND_UNIT = "m"; md.MOND_INST = "Dipmeter:" + survey.dip_instr; md.MOND_REM = survey.dip_com; MOND.Add(md); } // Water depth if null and dip required and offset if (survey.depth_gwl_bgl == null && survey.dip_req == "yes" && survey.dip_datum_offset != null) { MOND md = NewMOND(mg, survey); md.MOND_TYPE = "WDEP"; md.MOND_RDNG = "Dry"; md.MOND_UNIT = "m"; md.MOND_INST = "Dipmeter:" + survey.dip_instr; md.MOND_REM = survey.dip_com; MOND.Add(md); } // Depth to base of installation (m) if (survey.depth_install_bgl != null && survey.dip_datum_offset != null) { MOND md = NewMOND(mg, survey); md.MOND_TYPE = "DBSE"; md.MOND_RDNG = Convert.ToString(survey.depth_install_bgl); md.MOND_NAME = "Depth to base of installation"; md.MOND_UNIT = "m"; md.MOND_INST = survey.dip_instr; MOND.Add(md); } return(0); }
private MOND NewMOND(MONG mg, LTM_Survey_Data survey, LTM_Survey_Data_Repeat repeat) { int round = convertToInt16(survey.mon_rd_nb, "R", -999); MOND md = new MOND { ge_source = "esri_survey_repeat", ge_otherId = Convert.ToString(repeat.globalid), gINTProjectID = mg.gINTProjectID, PointID = mg.PointID, ItemKey = mg.ItemKey, MONG_DIS = mg.MONG_DIS, RND_REF = String.Format("{0:00}", round), MOND_REF = String.Format("Round {0:00} Seconds {1:00}", round, repeat.elapse_t), }; return(md); }
private MOND NewMOND(MONG mg, LTM_Survey_Data survey) { int round = convertToInt16(survey.mon_rd_nb, "R", -999); MOND md = new MOND { ge_source = "esri_survey", ge_otherId = Convert.ToString(survey.globalid), gINTProjectID = mg.gINTProjectID, PointID = mg.PointID, ItemKey = mg.ItemKey, MONG_DIS = mg.MONG_DIS, RND_REF = String.Format("{0:00}", round), MOND_REF = String.Format("Round {0:00}", round), DateTime = gINTDateTime(survey.time1_getDT()) }; return(md); }
private int AddGas(MONG mg, LTM_Survey_Data survey) { // Peak Gas flow if (survey.gas_flow_peak != null) { MOND md = NewMOND(mg, survey); md.MOND_TYPE = "GFLOP"; md.MOND_RDNG = Convert.ToString(survey.gas_flow_peak); md.MOND_NAME = "Peak gas flow rate"; md.MOND_UNIT = "l/h"; md.MOND_INST = survey.dip_instr; MOND.Add(md); } // Steady Gas flow if (survey.gas_flow_steady != null) { MOND md = NewMOND(mg, survey); md.MOND_TYPE = "GFLOS"; md.MOND_RDNG = Convert.ToString(survey.gas_flow_steady); md.MOND_NAME = "Steady gas flow rate"; md.MOND_UNIT = "l/h"; md.MOND_INST = survey.dip_instr; MOND.Add(md); } // Atmosperic Temperature (°C) if (survey.atmo_temp != null) { MOND md = NewMOND(mg, survey); md.MOND_TYPE = "TEMP"; md.MOND_RDNG = Convert.ToString(survey.atmo_temp); md.MOND_NAME = "Atmospheric temperature"; md.MOND_UNIT = "Deg C"; md.MOND_INST = survey.gas_instr; MOND.Add(md); } // Atmospheric pressure (mbar) if (survey.atmo_pressure != null) { MOND md = NewMOND(mg, survey); md.MOND_TYPE = "BAR"; md.MOND_RDNG = Convert.ToString(survey.atmo_pressure); md.MOND_NAME = "Atmospheric pressure"; md.MOND_UNIT = "mbar"; md.MOND_INST = survey.gas_instr; MOND.Add(md); } // Differential borehole pressure (mbar) if (survey.Diff_BH_pressure != null) { MOND md = NewMOND(mg, survey); md.MOND_TYPE = "GPRS"; md.MOND_RDNG = Convert.ToString(survey.Diff_BH_pressure); md.MOND_NAME = "Differential pressure"; md.MOND_UNIT = "mbar"; md.MOND_INST = survey.gas_instr; MOND.Add(md); } DateTime survey_startDT = gINTDateTime(survey.time1_getDT()).Value; List <LTM_Survey_Data_Repeat> repeat = Survey_Repeat_Data.FindAll(r => r.parentglobalid == survey.globalid); foreach (LTM_Survey_Data_Repeat survey2 in repeat) { if (survey2.elapse_t == null) { continue; } int elapsed = survey2.elapse_t.Value; //DateTime dt = survey_start.Value.AddSeconds(elapsed); DateTime dt = survey_startDT.AddSeconds(elapsed); // Gas flow (l/h) if (survey2.gas_flow_t != null) { MOND md = NewMOND(mg, survey, survey2); md.MOND_TYPE = "GFLO"; md.MOND_RDNG = Convert.ToString(survey2.gas_flow_t); md.MOND_NAME = "Gas flow rate"; md.MOND_UNIT = "l/h"; md.MOND_INST = survey.gas_instr; md.DateTime = dt; MOND.Add(md); } // Methane reading Limit CH4 LEL (%) if (survey2.CH4_lel_t != null) { MOND md = NewMOND(mg, survey, survey2); md.MOND_TYPE = "GM"; md.MOND_RDNG = Convert.ToString(survey2.CH4_lel_t); md.MOND_NAME = "Methane as percentage of LEL (Lower Explosive Limit)"; md.MOND_UNIT = "%vol"; md.MOND_INST = survey.gas_instr; md.DateTime = dt; MOND.Add(md); } // Methane reading CH4 (% v/v) if (survey2.CH4_t != null) { MOND md = NewMOND(mg, survey, survey2); md.MOND_TYPE = "TGM"; md.MOND_RDNG = Convert.ToString(survey2.CH4_t); md.MOND_NAME = "Total Methane"; md.MOND_UNIT = "%vol"; md.MOND_INST = survey.gas_instr; md.DateTime = dt; MOND.Add(md); } // Carbon Dioxide reading CO2 (% v/v) if (survey2.CO2_t != null) { MOND md = NewMOND(mg, survey, survey2); md.MOND_TYPE = "GCD"; md.MOND_RDNG = Convert.ToString(survey2.CO2_t); md.MOND_NAME = "Carbon Dioxide"; md.MOND_UNIT = "%vol"; md.MOND_INST = survey.gas_instr; md.DateTime = dt; MOND.Add(md); } //Oxygen Reading O2 (% v/v) if (survey2.O2_t != null) { MOND md = NewMOND(mg, survey, survey2); md.MOND_TYPE = "GOX"; md.MOND_RDNG = Convert.ToString(survey2.O2_t); md.MOND_NAME = "Oxygen"; md.MOND_UNIT = "%vol"; md.MOND_INST = survey.gas_instr; md.DateTime = dt; MOND.Add(md); } //Hydrogen Sulphide H2S (ppm) if (survey2.H2S_t != null) { MOND md = NewMOND(mg, survey, survey2); md.MOND_TYPE = "HYS"; md.MOND_RDNG = Convert.ToString(survey2.H2S_t); md.MOND_NAME = "Hydrogen Sulphide"; md.MOND_UNIT = "ppm"; md.MOND_INST = survey.gas_instr; md.DateTime = dt; MOND.Add(md); } //Carbon Monoxide Readings CO (ppm) if (survey2.CO_t != null) { MOND md = NewMOND(mg, survey, survey2); md.MOND_TYPE = "GCO"; md.MOND_RDNG = Convert.ToString(survey2.CO_t); md.MOND_NAME = "Carbon Monoxide"; md.MOND_UNIT = "ppm"; md.MOND_INST = survey.gas_instr; md.DateTime = dt; MOND.Add(md); } //Photo Ionisations PID (ppm) if (survey2.PID_t != null) { MOND md = NewMOND(mg, survey, survey2); md.MOND_TYPE = "PID"; md.MOND_RDNG = Convert.ToString(survey2.PID_t); md.MOND_NAME = "Photoionization Detector"; md.MOND_UNIT = "ppm"; md.MOND_INST = survey.PID_instr; md.DateTime = dt; MOND.Add(md); } // VOC (ppm) if (survey2.voc_t != null) { MOND md = NewMOND(mg, survey, survey2); md.MOND_TYPE = "VOC"; md.MOND_RDNG = Convert.ToString(survey2.voc_t); md.MOND_NAME = "Volatile Organic Compounds"; md.MOND_UNIT = "ppm"; md.MOND_INST = survey.gas_instr; md.DateTime = dt; MOND.Add(md); } } return(0); }
private int AddPurge(MONG mg, LTM_Survey_Data survey) { // PH if (survey.ph != null) { MOND md = NewMOND(mg, survey); md.MOND_TYPE = "PH"; md.MOND_RDNG = Convert.ToString(survey.ph); md.MOND_UNIT = "PH"; md.MOND_INST = survey.gas_instr; MOND.Add(md); } //Redox Potential if (survey.redox_potential != null) { MOND md = NewMOND(mg, survey); md.MOND_TYPE = "RDX"; md.MOND_RDNG = Convert.ToString(survey.redox_potential); md.MOND_UNIT = "mV"; md.MOND_INST = survey.gas_instr; MOND.Add(md); } //Redox Potential from eh field if (survey.eh != null) { MOND md = NewMOND(mg, survey); md.MOND_TYPE = "RDX"; md.MOND_RDNG = Convert.ToString(survey.eh); md.MOND_NAME = "Redox Potential"; md.MOND_UNIT = "mV"; md.MOND_INST = survey.gas_instr; MOND.Add(md); } // Electrical Conductivity if (survey.conductivity != null) { MOND md = NewMOND(mg, survey); md.MOND_TYPE = "EC"; md.MOND_RDNG = Convert.ToString(survey.conductivity); md.MOND_NAME = "Electrical Conductivity"; md.MOND_UNIT = "uS/cm"; md.MOND_INST = survey.gas_instr; MOND.Add(md); } //Temperature (°C) if (survey.temperature != null) { MOND md = NewMOND(mg, survey); md.MOND_TYPE = "DOWNTEMP"; md.MOND_RDNG = Convert.ToString(survey.temperature); md.MOND_NAME = "Downhole temperature"; md.MOND_UNIT = "Deg C"; md.MOND_INST = survey.gas_instr; MOND.Add(md); } //Dissolved oxygen (mg/l) if (survey.dissolved_oxy != null) { MOND md = NewMOND(mg, survey); md.MOND_TYPE = "DO"; md.MOND_RDNG = Convert.ToString(survey.dissolved_oxy); md.MOND_NAME = "Dissolved Oxygen"; md.MOND_UNIT = "mg/l"; md.MOND_INST = survey.gas_instr; MOND.Add(md); } return(0); }
private async Task <int> AddMOND(ge_project project) { string[] AllPoints = new string[] { "" }; var resp = await new ge_gINTController(_context, _authorizationService, _userManager, _env, _ge_config ).getMONG(project.Id, AllPoints); var okResult = resp as OkObjectResult; if (okResult.StatusCode != 200) { return(-1); } MONG = okResult.Value as List <MONG>; if (MONG == null) { return(-1); } resp = await new ge_gINTController(_context, _authorizationService, _userManager, _env, _ge_config ).getPOINT(project.Id, AllPoints); okResult = resp as OkObjectResult; if (okResult.StatusCode != 200) { return(-1); } POINT = okResult.Value as List <POINT>; if (POINT == null) { return(-1); } MOND = new List <MOND>(); MONV = new List <MONV>(); int projectId = POINT.FirstOrDefault().gINTProjectID; foreach (LTM_Survey_Data_Add survey in Survey_Data_Add) { if (survey == null) { continue; } POINT pt = POINT.Find(p => p.PointID == survey.hole_id); if (pt == null) { if ((survey.package.Contains("A") && projectId == 1) || (survey.package.Contains("B") && projectId == 2) || (survey.package.Contains("C") && projectId == 3) || (survey.package.Contains("D") && projectId == 4)) { Console.WriteLine("Package {0} survey.hole_id [{1}] not found", survey.package, survey.hole_id); } continue; } List <MONG> pt_mg = MONG.Where(m => m.PointID == survey.hole_id).ToList(); if (pt_mg.Count == 0) { Console.WriteLine("Package {0} monitoring point for survey.hole_id {1} not found", survey.package, survey.hole_id); continue; } MONG mg = pt_mg.Find(m => m.ItemKey == survey.mong_ID); if (mg == null) { mg = pt_mg.FirstOrDefault(); } DateTime?survey_start = gINTDateTime(survey.date1_getDT()); if (survey_start == null) { continue; } DateTime survey_startDT = gINTDateTime(survey.time1_getDT()).Value; DateTime survey_endDT = gINTDateTime(survey.time2_getDT()).Value; // if (survey.globalid == new Guid("bf8e8e5f-7394-4363-bfc2-9bfe876b048a")) { // Console.WriteLine ("{0} {1}", survey_startDT, survey.time1_getDT()); // } MONV mv = NewMONV(pt, survey); mv.MONV_STAR = survey_startDT; mv.MONV_ENDD = survey_endDT; mv.MONV_DIPR = survey.dip_req; mv.MONV_GASR = survey.gas_mon; mv.MONV_LOGR = survey.logger_downld_req; mv.MONV_REMG = survey.gas_fail + " " + survey.gas_com; mv.MONV_REMD = survey.dip_fail + " " + survey.dip_com; mv.MONV_REML = survey.logger_fail + " " + survey.logger_com; mv.MONV_REMS = survey.samp_fail + " " + survey.samp_com; mv.PUMP_TYPE = survey.purg_pump + " " + survey.purg_pump_oth; mv.MONV_WEAT = survey.weath; mv.MONV_TEMP = survey.temp; mv.MONV_WIND = survey.wind; if (survey.dip_instr != null) { mv.DIP_SRLN = survey.dip_instr; mv.DIP_CLBD = gINTDateTime(survey.dip_cali_d_getDT()); } if (survey.interface_instr != null) { mv.DIP_SRLN = survey.interface_instr; mv.DIP_CLBD = gINTDateTime(survey.interface_cali_d_getDT()); } mv.FLO_SRLN = survey.purg_meter; mv.FLO_CLBD = gINTDateTime(survey.purg_meter_cali_d_getDT()); mv.GAS_SRLN = survey.gas_instr; mv.GAS_CLBD = gINTDateTime(survey.gas_cali_d_getDT()); mv.PID_SRLN = survey.PID_instr; mv.PID_CLBD = gINTDateTime(survey.PID_cali_d_getDT()); mv.RND_REF = survey.mon_rd_nb; mv.MONV_DATM = survey.dip_datum; mv.AIR_PRESS = survey.atmo_pressure; mv.AIR_TEMP = survey.atmo_temp; mv.PIPE_DIA = survey.pipe_diam; if (survey.dip_datum_offset != null) { mv.MONV_DIS = ((float)survey.dip_datum_offset.Value) / 100f; } mv.MONV_MENG = survey.Creator; MONV.Add(mv); // if (IgnoreDataRepeat_GlobalId.Contains(survey.globalid)) { // continue; // } if (survey.QA_status.Contains("Dip_Approved")) { AddDip(mg, survey); } if (survey.QA_status.Contains("Purge_Approved")) { AddPurge(mg, survey); } if (survey.QA_status.Contains("Gas_Approved")) { AddGas(mg, survey); } } return(MOND.Count()); }
private MOND NewMOND(MONG mg, ge_log_reading read, string instrument_name, string round_ref, string mond_type, string mond_rem, string mond_ref, string value_name, string mond_name, string units, string format, float?GL, string ge_source) { string value = null; string format2 = "{0:" + format + "}"; if (read.NotDry == ge_log_constants.ISNOTDRY) { float?reading = read.getValue(value_name); if (reading != null) { value = String.Format(format2, reading); if (mond_type == "WLEV") { value = String.Format(format2, GL.Value - reading); } } } if (read.NotDry == ge_log_constants.ISDRY) { value = "Dry"; } if (!String.IsNullOrEmpty(read.Remark)) { mond_rem += " " + read.Remark; } if (String.IsNullOrEmpty(value)) { return(null); } MOND md = new MOND { gINTProjectID = mg.gINTProjectID, PointID = mg.PointID, ItemKey = mg.ItemKey, MONG_DIS = mg.MONG_DIS, MOND_TYPE = mond_type, MOND_REF = mond_ref, DateTime = read.ReadingDateTime, MOND_UNIT = units, MOND_RDNG = value, MOND_INST = instrument_name, MOND_NAME = mond_name, MOND_REM = mond_rem, RND_REF = round_ref, ge_source = ge_source, ge_otherId = read.Id.ToString() }; return(md); }
private async Task <List <MOND> > createMOND(ge_log_file log_file, int page_size, int page, string round_ref, DateTime?fromDT, DateTime?toDT, string ge_source = "ge_flow", Boolean addWLEV = true) { // Find borehole in point table of gint database string holeId = log_file.getBoreHoleId(); if (holeId == "") { return(null); // BadRequest ($"Borehole ref not provided"); } POINT pt = await GetPointByHoleId(holeId); if (pt == null) { return(null);// return BadRequest ($"Borehole ref {holeId} not found in {project.name}"); } List <MONG> mgs = await GetParentsByHoleId(holeId); // Find monitoring point in mong table of gint database float probe_depth = log_file.getProbeDepth(); if (probe_depth == 0) { return(null); // return BadRequest ($"No probe depth provided for borehole ref {holeId} not found in {project.name}"); } MONG mg = null; string formatMATCH = "{0:00.0}"; if (mgs.Count == 1) { mg = mgs.FirstOrDefault(); } else { foreach (MONG m in mgs) { if (m.MONG_DIS != null) { if (String.Format(formatMATCH, m.MONG_DIS.Value) == String.Format(formatMATCH, probe_depth)) { mg = m; break; } } } } if (mg == null) { return(null); // return BadRequest ($"No installations in borehole ref {holeId} have a probe depth of {probe_depth} in {project.name}"); } // Add all readings to new items in List<MOND> List <MOND> MOND = new List <MOND>(); string device_name = log_file.getDeviceName(); float?gl = null; if (pt.Elevation != null) { gl = Convert.ToSingle(pt.Elevation.Value); } if (gl == null && pt.LOCA_GL != null) { gl = Convert.ToSingle(pt.LOCA_GL.Value); } // int round_no = getInt32(round_ref); string mond_rem_suffix = ""; string mond_ref = ""; if (ge_source == "ge_flow") { mond_rem_suffix = " flow meter reading"; } if (ge_source == "ge_logger") { mond_rem_suffix = " datalogger reading"; } List <ge_log_reading> readings2 = log_file.getIncludeReadingsPage(fromDT, toDT, page_size, page); foreach (ge_log_reading reading in readings2) { foreach (value_header vh in log_file.field_headers) { if (ge_source == "ge_flow") { mond_ref = String.Format("Round {0} Seconds {1:00}", round_ref, reading.Duration); } if (vh.id == "WDEPTH" && vh.units == "m") { // Add MOND WDEP record MOND md = NewMOND(mg, reading, device_name, round_ref, "WDEP", mg.MONG_TYPE + mond_rem_suffix, mond_ref, vh.db_name, "Water Depth", vh.units, vh.format, null, ge_source); if (md != null) { MOND.Add(md); } if (gl != null && addWLEV == true) { // Add MOND WLEV record MOND md2 = NewMOND(mg, reading, device_name, round_ref, "WLEV", mg.MONG_TYPE + mond_rem_suffix, mond_ref, vh.db_name, "Water Level", vh.units, vh.format, gl, ge_source); if (md2 != null) { MOND.Add(md2); } } } if (vh.id == "PH") { // Add MOND Potential Hydrogen MOND md = NewMOND(mg, reading, device_name, round_ref, "PH", mg.MONG_TYPE + mond_rem_suffix, mond_ref, vh.db_name, "", vh.units, vh.format, null, ge_source); if (md != null) { MOND.Add(md); } } if (vh.id == "DO" && vh.units == "mg/l") { // Add MOND Disolved Oxygen MOND md = NewMOND(mg, reading, device_name, round_ref, "DO", mg.MONG_TYPE + mond_rem_suffix, mond_ref, vh.db_name, "Dissolved Oxygen", vh.units, vh.format, null, ge_source); if (md != null) { MOND.Add(md); } } // if ((vh.id == "AEC" && vh.units == "μS/cm") | // (vh.id == "AEC" & vh.units == "mS/cm")) { // // Add MOND Electrical Conductivity // MOND md = NewMOND (mg, reading, device_name, round_ref, "AEC", mg.MONG_TYPE + mond_rem_suffix, mond_ref, vh.db_name, "Actual Electrical Conductivity", vh.units, vh.format, null, ge_source); // if (md!=null) MOND.Add (md); // } //if (vh.id == "AEC" && (vh.units == "μS/cm" || vh.units == "mS/cm")) { if (vh.id == "AEC") { // Add MOND Electrical Conductivity MOND md = NewMOND(mg, reading, device_name, round_ref, "AEC", mg.MONG_TYPE + mond_rem_suffix, mond_ref, vh.db_name, "Actual Electrical Conductivity", vh.units, vh.format, null, ge_source); if (md != null) { MOND.Add(md); } } // if ((vh.id == "EC" && vh.units == "μS/cm")) { if ((vh.id == "EC")) { // Add MOND Electrical Conductivity MOND md = NewMOND(mg, reading, device_name, round_ref, "EC", mg.MONG_TYPE + mond_rem_suffix, mond_ref, vh.db_name, "Electrical Conductivity", vh.units, vh.format, null, ge_source); if (md != null) { MOND.Add(md); } } if (vh.id == "SAL" && vh.units == "g/cm3") { // Add MOND Salinity record MOND md = NewMOND(mg, reading, device_name, round_ref, "SAL", mg.MONG_TYPE + mond_rem_suffix, mond_ref, vh.db_name, "Salinity", vh.units, vh.format, null, ge_source); if (md != null) { MOND.Add(md); } } if (vh.id == "TEMP" && vh.units == "Deg C") { // Add MOND Temp record MOND md = NewMOND(mg, reading, device_name, round_ref, "DOWNTEMP", mg.MONG_TYPE + mond_rem_suffix, mond_ref, vh.db_name, "Downhole Temperature", vh.units, vh.format, null, ge_source); MOND.Add(md); } if (vh.id == "RDX" && vh.units == "mV") { // Add MOND Redox Salinity record MOND md = NewMOND(mg, reading, device_name, round_ref, "RDX", mg.MONG_TYPE + mond_rem_suffix, mond_ref, vh.db_name, "Redox Potential", vh.units, vh.format, null, ge_source); if (md != null) { MOND.Add(md); } } if (vh.id == "TURB" && vh.units == "NTU") { // Add MOND Salinity record MOND md = NewMOND(mg, reading, device_name, round_ref, "TURB", mg.MONG_TYPE + mond_rem_suffix, mond_ref, vh.db_name, "Turbity", vh.units, vh.format, null, ge_source); if (md != null) { MOND.Add(md); } } } } return(MOND); }
} // Editor, esriFieldTypeString, Editor, sqlTypeOther, 128 public int AddGas(MONG mg, LTM_Survey_Data2 survey, LTM_Survey_Data_Repeat2 survey2, List <MOND> MOND) { DateTime survey_startDT = gINTDateTime(survey.date1_getDT()).Value; if (survey2.elapse_t == null) { return(0); } int elapsed = survey2.elapse_t.Value; //DateTime dt = survey_start.Value.AddSeconds(elapsed); DateTime dt = survey_startDT.AddSeconds(elapsed); if (survey.gas_repeat_tstart != null) { dt = gINTDateTime(survey.gas_repeat_tstart_getDT()).Value.AddSeconds(elapsed); } // Gas flow (l/h) // if (survey2.gas_flow_t != null) { // MOND md = NewMOND(mg, survey, survey2); // md.MOND_TYPE = "GFLO"; // md.MOND_RDNG = Convert.ToString(survey2.gas_flow_t); // md.MOND_NAME = "Gas flow rate"; // md.MOND_UNIT = "l/h"; // md.MOND_INST = survey.gas_instr; // md.DateTime = dt; // MOND.Add(md); // } // Methane reading Limit CH4 LEL (%) if (survey2.CH4_lel_t != null) { MOND md = NewMOND(mg, survey, survey2); md.MOND_TYPE = "GM"; md.MOND_RDNG = Convert.ToString(survey2.CH4_lel_t); md.MOND_NAME = "Methane as percentage of LEL (Lower Explosive Limit)"; md.MOND_UNIT = "%vol"; md.MOND_INST = IfOther(survey.gas_instr, survey.gas_instr_other); md.DateTime = dt; MOND.Add(md); } // Methane reading CH4 (% v/v) if (survey2.CH4_t != null) { MOND md = NewMOND(mg, survey, survey2); md.MOND_TYPE = "TGM"; md.MOND_RDNG = Convert.ToString(survey2.CH4_t); md.MOND_NAME = "Total Methane"; md.MOND_UNIT = "%vol"; md.MOND_INST = IfOther(survey.gas_instr, survey.gas_instr_other); md.DateTime = dt; MOND.Add(md); } // Carbon Dioxide reading CO2 (% v/v) if (survey2.CO2_t != null) { MOND md = NewMOND(mg, survey, survey2); md.MOND_TYPE = "GCD"; md.MOND_RDNG = Convert.ToString(survey2.CO2_t); md.MOND_NAME = "Carbon Dioxide"; md.MOND_UNIT = "%vol"; md.MOND_INST = IfOther(survey.gas_instr, survey.gas_instr_other); md.DateTime = dt; MOND.Add(md); } //Oxygen Reading O2 (% v/v) if (survey2.O2_t != null) { MOND md = NewMOND(mg, survey, survey2); md.MOND_TYPE = "GOX"; md.MOND_RDNG = Convert.ToString(survey2.O2_t); md.MOND_NAME = "Oxygen"; md.MOND_UNIT = "%vol"; md.MOND_INST = IfOther(survey.gas_instr, survey.gas_instr_other); md.DateTime = dt; MOND.Add(md); } //Hydrogen Sulphide H2S (ppm) if (survey2.H2S_t != null) { MOND md = NewMOND(mg, survey, survey2); md.MOND_TYPE = "HYS"; md.MOND_RDNG = Convert.ToString(survey2.H2S_t); md.MOND_NAME = "Hydrogen Sulphide"; md.MOND_UNIT = "ppm"; md.MOND_INST = IfOther(survey.gas_instr, survey.gas_instr_other); md.DateTime = dt; MOND.Add(md); } //Carbon Monoxide Readings CO (ppm) if (survey2.CO_t != null) { MOND md = NewMOND(mg, survey, survey2); md.MOND_TYPE = "GCO"; md.MOND_RDNG = Convert.ToString(survey2.CO_t); md.MOND_NAME = "Carbon Monoxide"; md.MOND_UNIT = "ppm"; md.MOND_INST = IfOther(survey.gas_instr, survey.gas_instr_other); md.DateTime = dt; MOND.Add(md); } return(0); }