DD.WellWorkover.Cloud/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorSlipsTime.cs
2022-04-22 17:17:38 +05:00

37 lines
1.0 KiB
C#

namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors
{
#nullable enable
class DetectorSlipsTime : DetectorAbstract
{
public DetectorSlipsTime() : base(10_001, "Удержание в клиньях")
{
}
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
}