private MONV NewMONV(POINT pt, LTM_Survey_Data survey) { int round = convertToInt16(survey.mon_rd_nb, "R", -999); MONV mv = new MONV { ge_source = "esri_survey", ge_otherId = Convert.ToString(survey.globalid), gINTProjectID = pt.gINTProjectID, PointID = pt.PointID, DateTime = gINTDateTime(survey.time1_getDT()), RND_REF = String.Format("{0:00}", round), MONV_REF = String.Format("Round {0:00}", round) }; return(mv); }
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); }