Beispiel #1
0
        private List <VelocityDepthObservation> GetVelocityDepthObservations(ManualGaugingRecord gauging,
                                                                             MeterCalibration meterCalibration)
        {
            return(gauging.Observations.Select(observation =>
            {
                var revolutionCount = observation.Revolutions;
                var observationInterval = observation.IntervalInSeconds;
                if (observation.Revolutions == 0 || observation.IntervalInSeconds == 0)
                {
                    revolutionCount = 0;
                    observationInterval = 0;
                }

                var velocity = CalculateDepthObservationVelocity(revolutionCount, observationInterval, meterCalibration);

                return new VelocityDepthObservation
                {
                    Depth = observation.ObservationDepth,
                    IsVelocityEstimated = false,
                    RevolutionCount = revolutionCount,
                    Velocity = velocity,
                    ObservationInterval = observationInterval
                };
            }).ToList());
        }
Beispiel #2
0
        private Vertical GetVertical(ManualGaugingRecord gauging, Vertical precedingVertical, int sequenceNumber)
        {
            var verticalType = sequenceNumber == _endEdgeSequenceNumber
                ? VerticalType.EndEdgeNoWaterAfter
                : VerticalType.MidRiver;

            var vertical = GetVertical(gauging, sequenceNumber, verticalType);

            var segment = GetSegment(gauging, vertical.VelocityObservation, precedingVertical);

            vertical.Segment = segment;

            return(vertical);
        }
Beispiel #3
0
        private Segment GetSegment(ManualGaugingRecord gauging, VelocityObservation velocityObservation, Vertical precedingVertical)
        {
            var segmentVelocity  = CalculateSegmentVelocity(velocityObservation, precedingVertical);
            var segmentWidth     = CalculateSegmentWidth(gauging, precedingVertical);
            var segmentDepth     = CalculateSegmentDepth(gauging, precedingVertical);
            var segmentArea      = segmentDepth * segmentWidth;
            var segmentDischarge = segmentVelocity * segmentArea;

            Log.Info(
                $"Segment: Velocity={segmentVelocity} m/s, Depth={segmentDepth} m, Width={segmentWidth} m, Area={segmentArea} m^2, Discharge={segmentDischarge} m^3/s");

            return(new Segment
            {
                Area = segmentArea,
                Discharge = segmentDischarge,
                IsDischargeEstimated = false,
                Velocity = segmentVelocity,
                Width = segmentWidth
            });
        }
Beispiel #4
0
        private Vertical GetVertical(ManualGaugingRecord gauging, int sequenceNumber, VerticalType verticalType)
        {
            var measurementTime     = CalculateMeasurementTime();
            var velocityObservation = GetVelocityObservation(gauging);

            Log.Info($"Vertical: {sequenceNumber}");

            return(new Vertical
            {
                SequenceNumber = sequenceNumber,
                FlowDirection = FlowDirectionType.Normal,
                IsSoundedDepthEstimated = false,
                MeasurementTime = measurementTime,
                SoundedDepth = gauging.SoundedDepth,
                TaglinePosition = gauging.TaglinePosition,
                EffectiveDepth = gauging.SoundedDepth,
                VerticalType = verticalType,
                MeasurementConditionData = new OpenWaterData(),
                VelocityObservation = velocityObservation
            });
        }
Beispiel #5
0
        private VelocityObservation GetVelocityObservation(ManualGaugingRecord gauging)
        {
            var meterCalibration  = GetMeterCalibration();
            var depthObservations = GetVelocityDepthObservations(gauging, meterCalibration);
            var meanVelocity      = CalculateMeanVelocity(depthObservations);
            var observationMethod = FieldVisit.DischargeActivity.ObservationMethodType;

            var velocityObservation = new VelocityObservation
            {
                MeanVelocity = meanVelocity,
                VelocityObservationMethod = observationMethod,
                MeterCalibration          = meterCalibration,
                DeploymentMethod          = DeploymentMethodType.Unspecified
            };

            foreach (var observation in depthObservations)
            {
                velocityObservation.Observations.Add(observation);
            }

            Log.Info($"VelocityObservation: VMV={meanVelocity}, observationMethod={observationMethod}");

            return(velocityObservation);
        }
Beispiel #6
0
 private Vertical GetStartEdgeVertical(ManualGaugingRecord gauging)
 {
     return(GetVertical(gauging, _startEdgeSequenceNumber, VerticalType.StartEdgeNoWaterBefore));
 }
Beispiel #7
0
 private static double CalculateSegmentDepth(ManualGaugingRecord gauging, Vertical precedingVertical)
 {
     return((gauging.SoundedDepth + precedingVertical.SoundedDepth) / 2);
 }
Beispiel #8
0
 private static double CalculateSegmentWidth(ManualGaugingRecord gauging, Vertical precedingVertical)
 {
     return(gauging.TaglinePosition - precedingVertical.TaglinePosition);
 }