2022-06-10 18:36:14 +05:00
|
|
|
|
using AsbCloudDb.Model;
|
|
|
|
|
|
|
|
|
|
namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors
|
2022-04-22 17:17:38 +05:00
|
|
|
|
{
|
|
|
|
|
#nullable enable
|
|
|
|
|
class DetectorSlipsTime : DetectorAbstract
|
|
|
|
|
{
|
2022-04-28 15:04:13 +05:00
|
|
|
|
public DetectorSlipsTime() :base(14) {}
|
2022-04-22 17:17:38 +05:00
|
|
|
|
public double HookWeightSP { get; set; } = 20;
|
|
|
|
|
public double PressureSP { get; set; } = 15;
|
|
|
|
|
public double PosisionSP { get; set; } = 8;
|
2022-05-12 17:21:06 +05:00
|
|
|
|
public double DeltaWellDepthMax { get; set; } = 2.5;
|
2022-04-22 17:17:38 +05:00
|
|
|
|
|
|
|
|
|
protected override bool DetectStart(DetectableTelemetry[] telemetry, int position)
|
|
|
|
|
{
|
|
|
|
|
var item = telemetry[position];
|
|
|
|
|
|
2022-05-12 17:21:06 +05:00
|
|
|
|
var result =
|
|
|
|
|
item.HookWeight < HookWeightSP &&
|
2022-04-22 17:17:38 +05:00
|
|
|
|
item.Pressure < PressureSP &&
|
2022-05-12 17:21:06 +05:00
|
|
|
|
item.BlockPosition < PosisionSP &&
|
|
|
|
|
(item.WellDepth - item.BitDepth) < DeltaWellDepthMax;
|
2022-04-22 17:17:38 +05:00
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override bool DetectEnd(DetectableTelemetry[] telemetry, int position)
|
|
|
|
|
{
|
|
|
|
|
var item = telemetry[position];
|
|
|
|
|
|
|
|
|
|
var result = item.Pressure > PressureSP &&
|
|
|
|
|
item.BlockPosition > PosisionSP;
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
2022-06-10 18:36:14 +05:00
|
|
|
|
|
|
|
|
|
protected override void CalcValue(ref DetectedOperation result)
|
|
|
|
|
{
|
|
|
|
|
result.Value = result.DurationMinutes;
|
|
|
|
|
}
|
2022-04-22 17:17:38 +05:00
|
|
|
|
}
|
|
|
|
|
#nullable disable
|
|
|
|
|
}
|