DD.WellWorkover.Cloud/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorSlipsTime.cs
2022-04-28 15:04:13 +05:00

34 lines
1004 B
C#

namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors
{
#nullable enable
class DetectorSlipsTime : DetectorAbstract
{
public DetectorSlipsTime() :base(14) {}
public double HookWeightSP { get; set; } = 20;
public double PressureSP { get; set; } = 15;
public double PosisionSP { get; set; } = 8;
protected override bool DetectStart(DetectableTelemetry[] telemetry, int position)
{
var item = telemetry[position];
var result = item.HookWeight < HookWeightSP &&
item.Pressure < PressureSP &&
item.BlockPosition < PosisionSP;
return result;
}
protected override bool DetectEnd(DetectableTelemetry[] telemetry, int position)
{
var item = telemetry[position];
var result = item.Pressure > PressureSP &&
item.BlockPosition > PosisionSP;
return result;
}
}
#nullable disable
}