Skip to content

Commit 17cf120

Browse files
author
Doug Schmidt
committed
Issue-42 - Add implicit vertical number
FlowTracker2 files don't have an explicit station number, but the FlowTracker2 visualization software implicitly counts the verticals starting at 0. Use the same logic in the plugin, so that all the AQTS verticals match the station # shown in the SonTek software.
1 parent 5f56ce6 commit 17cf120

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Flowtracker2Plugin/DataFileParser.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ private ParseFileResult AppendResults(LocationInfo locationInfo)
138138

139139
foreach (var station in DataFile.Stations)
140140
{
141-
manualGauging.Verticals.Add(CreateVertical(station, startStation, endStation));
141+
manualGauging.Verticals.Add(CreateVertical(manualGauging.Verticals.Count, station, startStation, endStation));
142142
}
143143

144144
AdjustUnknownTotalDischargePortion(manualGauging);
@@ -306,7 +306,7 @@ private DischargeMethodType CreateDischargeMethodType()
306306
throw new ArgumentException($"DischargeEquation='{dischargeEquation}' is not supported");
307307
}
308308

309-
private Vertical CreateVertical(Station station, Station startStation, Station endStation)
309+
private Vertical CreateVertical(int sequenceNumber, Station station, Station startStation, Station endStation)
310310
{
311311
var verticalType = station == startStation && ValidBankTypes.Contains(station.StationType)
312312
? VerticalType.StartEdgeNoWaterBefore
@@ -316,6 +316,7 @@ private Vertical CreateVertical(Station station, Station startStation, Station e
316316

317317
var vertical = new Vertical
318318
{
319+
SequenceNumber = sequenceNumber,
319320
TaglinePosition = UnitConverter.ConvertDistance(station.Location),
320321
Comments = station.Comment,
321322
MeasurementTime = station.CreationTime,

0 commit comments

Comments
 (0)