Skip to content

Commit 10991b0

Browse files
author
Doug Schmidt
authored
Merge pull request #35 from DougSchmidt-AI/feature/Issue-34-FixConvertedFractionalDepths
Feature/issue 34 fix converted fractional depths
2 parents ea0cf62 + 529cebc commit 10991b0

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ environment:
1313
assembly_info:
1414
patch: true
1515
file: AssemblyInfo.*
16-
assembly_version: "1.0.0.0"
16+
assembly_version: "{version}"
1717
assembly_file_version: "{version}"
1818
assembly_informational_version: "{version}"
1919

src/FlowTracker2Converter/MainForm.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System;
22
using System.Collections.Generic;
33
using System.Diagnostics;
4+
using System.Globalization;
45
using System.IO;
56
using System.Linq;
67
using System.Reflection;
@@ -414,14 +415,19 @@ private string ConvertToDis(DataFile dataFile, string sourcePath)
414415
var temp = Sanitize(calc.Temperature);
415416
var dummyBand = "0";
416417

418+
var effectiveDepth = converter.ConvertDistance(station.GetEffectiveDepth());
419+
var fractionalDepth = double.TryParse(method, NumberStyles.Any, CultureInfo.InvariantCulture, out var fraction)
420+
? fraction
421+
: 0;
422+
417423
stationTable.AddRow(
418424
$"{i:D2}",
419425
$"{time:HH:mm}",
420426
$"{converter.ConvertDistance(station.Location):F2}",
421-
$"{converter.ConvertDistance(station.GetEffectiveDepth()):F3}",
427+
$"{effectiveDepth:F3}",
422428
$"{converter.ConvertDistance(ice):F3}",
423429
$"{method}",
424-
$"{converter.ConvertDistance(station.GetFinalDepth()):F3}",
430+
$"{effectiveDepth - fractionalDepth*effectiveDepth:F3}",
425431
$"{calc.Samples}",
426432
$"{calc.Spikes}",
427433
$"{converter.ConvertVelocity(calc.MeanVelocityInVertical.X):F3}",

0 commit comments

Comments
 (0)