forked from ddrilling/AsbCloudServer
37 lines
1.0 KiB
C#
37 lines
1.0 KiB
C#
|
using AsbCloudDb.Model;
|
|||
|
|
|||
|
namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors
|
|||
|
{
|
|||
|
#nullable enable
|
|||
|
internal class DetectorSlipsTime : DetectorAbstract
|
|||
|
{
|
|||
|
public DetectorSlipsTime()
|
|||
|
: base(14) { }
|
|||
|
|
|||
|
protected override double CalcValue(DetectableTelemetry[] telemetry, int begin, int end)
|
|||
|
=> CalcDeltaTime(telemetry, begin, end);
|
|||
|
|
|||
|
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;
|
|||
|
|
|||
|
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);
|
|||
|
}
|
|||
|
|
|||
|
#nullable disable
|
|||
|
}
|
|||
|
|