2023-10-20 11:03:14 +05:00
|
|
|
|
using System;
|
|
|
|
|
using AsbCloudDb.Model;
|
2022-06-30 17:37:57 +05:00
|
|
|
|
|
|
|
|
|
namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors
|
|
|
|
|
{
|
2023-04-18 16:22:53 +05:00
|
|
|
|
|
2023-11-15 09:33:26 +05:00
|
|
|
|
internal class DetectorSlipsTime : DetectorAbstract
|
2022-06-30 17:37:57 +05:00
|
|
|
|
{
|
|
|
|
|
protected override double CalcValue(DetectableTelemetry[] telemetry, int begin, int end)
|
2022-07-07 08:57:52 +05:00
|
|
|
|
=> CalcDeltaMinutes(telemetry, begin, end);
|
2022-06-30 17:37:57 +05:00
|
|
|
|
|
2023-10-20 11:03:14 +05:00
|
|
|
|
public override Func<DetectableTelemetry[], int, int, int> GetIdOperation => (_, _, _) => WellOperationCategory.IdSlipsTime;
|
|
|
|
|
|
2022-06-30 17:37:57 +05:00
|
|
|
|
protected override bool DetectBegin(DetectableTelemetry[] telemetry, int position, DetectedOperation? previousOperation)
|
|
|
|
|
{
|
|
|
|
|
var point0 = telemetry[position];
|
|
|
|
|
var delta = point0.WellDepth - point0.BitDepth;
|
|
|
|
|
if (delta > 2.5d)
|
|
|
|
|
return false;
|
|
|
|
|
|
2022-07-01 17:04:44 +05:00
|
|
|
|
if (point0.Pressure > 15)
|
|
|
|
|
return false;
|
|
|
|
|
|
2022-06-30 17:37:57 +05:00
|
|
|
|
if (point0.BlockPosition > 8)
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
if (point0.HookWeight > 20)
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override bool IsValid(DetectableTelemetry[] telemetry, int begin, int end)
|
|
|
|
|
=> IsValidByWellDepthDoesNotChange(telemetry, begin, end);
|
|
|
|
|
}
|
|
|
|
|
|
2023-04-18 16:22:53 +05:00
|
|
|
|
|
2022-06-30 17:37:57 +05:00
|
|
|
|
}
|
|
|
|
|
|