コード例 #1
0
        private Vertical CreateEdgeVertical(Edge edge, VerticalType verticalType, MeterCalibration edgeMeter)
        {
            var taglinePosition = edge.Tagmark.ToNullableDouble() ?? 0;
            var depth           = edge.Depth.ToNullableDouble() ?? 0;
            var area            = edge.Area.ToNullableDouble() ?? 0;
            var velocity        = edge.Velocity.ToNullableDouble() ?? 0;
            var discharge       = edge.Discharge.ToNullableDouble() ?? 0;
            var width           = edge.Width.ToNullableDouble() ?? 0;
            var percentFlow     = edge.Flow.ToNullableDouble() ?? 0;

            var velocityObservation = new VelocityObservation
            {
                VelocityObservationMethod = PointVelocityObservationType.Surface,
                MeanVelocity     = velocity,
                DeploymentMethod = DeploymentMethodType.Unspecified,
                MeterCalibration = edgeMeter,
                Observations     =
                {
                    new VelocityDepthObservation
                    {
                        Depth               = depth,
                        Velocity            = velocity,
                        ObservationInterval = 0,
                        RevolutionCount     = 0
                    },
                },
            };

            return(new Vertical
            {
                VerticalType = verticalType,
                MeasurementTime = TimeHelper.CoerceDateTimeIntoUtcOffset(edge.Date, LocationInfo.UtcOffset),
                SequenceNumber = edge.panelId,
                TaglinePosition = taglinePosition,
                SoundedDepth = depth,
                EffectiveDepth = depth,
                MeasurementConditionData = new OpenWaterData(),
                FlowDirection = FlowDirectionType.Normal,
                VelocityObservation = velocityObservation,
                Segment = new Segment
                {
                    Area = area,
                    Discharge = discharge,
                    Width = width,
                    Velocity = velocity,
                    TotalDischargePortion = percentFlow,
                }
            });
        }
コード例 #2
0
 private static Panel CreateIslandPanel(Edge edge)
 {
     return(new Panel
     {
         Date = edge.Date,
         ReverseFlow = "False",
         Tagmark = edge.Tagmark,
         Discharge = edge.Discharge,
         Flow = edge.Flow,
         Width = edge.Width,
         PanelNum = edge.panelId,
         AverageVelocity = edge.Velocity,
         DepthReading = edge.Depth,
         DepthWithOffset = edge.Depth,
         Open = new EHSNMidsecMeasDischargeMeasurementChannelPanelOpen
         {
             DeploymentMethod = "",
             TotalDepth = edge.Depth
         },
         PointMeasurements = new PointMeasurement[0]
     });
 }
コード例 #3
0
 private void AddInferredBankEdge(List <Edge> bankEdges, List <Edge> islandEdges, Edge islandEdge)
 {
     _logger.Info($"Using island edge Tagmark={islandEdge.Tagmark} EdgeType={islandEdge.EdgeType} as bank edge {bankEdges.Count}");
     islandEdges.Remove(islandEdge);
     bankEdges.Add(islandEdge);
 }
コード例 #4
0
 private static bool IsBankEdge(Edge edge)
 {
     return("Edge @ Bank".Equals(edge.EdgeType, StringComparison.InvariantCultureIgnoreCase));
 }