Skip to content

Commit 796fe3a

Browse files
author
Doug Schmidt
authored
Merge pull request #47 from DougSchmidt-AI/feature/PF-1218-ConfigurableIsoUncertaintyScalar
PF-1218 - Added configurable ISO uncertainty scalar setting
2 parents a28542c + 4504775 commit 796fe3a

File tree

4 files changed

+25
-8
lines changed

4 files changed

+25
-8
lines changed

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,26 @@ An AQTS field data plugin supporting FlowTracker2 measurement files, for AQTS 20
88

99
- Use of this plugin implies agreement with the [license terms of this repository](./LICENSE.txt) and with license terms for software components provided by [SonTek/YSI](src/External/SonTek.StandaloneDataParser.License.md).
1010
- Download the latest release of the plugin [here](../../releases/latest)
11-
- Install it using the [FieldVisitPluginTool](https://github.com/AquaticInformatics/aquarius-field-data-framework/tree/master/src/FieldDataPluginTool)
11+
- Install it using the [SystemConfig page](https://github.com/AquaticInformatics/aquarius-field-data-framework#need-to-install-a-plugin-on-your-aqts-app-server)
1212

1313
## Plugin Compatibility Matrix
1414

1515
It is recommended that you use the most recent version of the plugin which matches your AQTS server version.
1616

1717
| AQTS Version | Latest compatible plugin Version |
1818
| --- | --- |
19-
| AQTS 2019.2+ | [v19.2.13](https://github.com/AquaticInformatics/flowtracker2-field-data-plugin/releases/download/v19.2.13/FlowTracker2Plugin.plugin) - Adds Party and Primary Meter to channel measurement<br/>v19.2.12 - Adds incrementing vertical numbers |
19+
| AQTS 2020.2+ | [v20.2.0](https://github.com/AquaticInformatics/flowtracker2-field-data-plugin/releases/download/v19.2.13/FlowTracker2Plugin.plugin) - Adds configurable ISO Uncertainty Scalar |
20+
| AQTS 2019.2 - 2020.1 | [v19.2.13](https://github.com/AquaticInformatics/flowtracker2-field-data-plugin/releases/download/v19.2.13/FlowTracker2Plugin.plugin) - Adds Party and Primary Meter to channel measurement<br/>v19.2.12 - Adds incrementing vertical numbers |
2021
| 2017.4 - 2019.1 | [v17.4.44](https://github.com/AquaticInformatics/flowtracker2-field-data-plugin/releases/download/v17.4.44/FlowTracker2Plugin.plugin) |
2122

23+
## Configuring the plugin
24+
25+
Starting with version 20.2.0, there are some configurable plugin settings which can be set in the Settings tab of the System Config Page.
26+
27+
| Group | Key | Value | Description |
28+
|---|---|---|---|---|
29+
| `FieldDataPluginConfig-FlowTracker2Plugin` | `IsoUncertaintyScalar` | `1.0` | This value will be used to scale the FlowTracker2 ISO uncertainty measurement, which defaults to a single standard devation (68% confidence interval).<br/><br/>A value of `1.96` will scale the uncertainty into a two-standard-deviation value (95% confidence interval).<br/><br/>Defaults to `1.0` if the value is missing or is not a valid number. |
30+
2231
## Requirements for building the plugin from source
2332

2433
- Requires Visual Studio 2017 (Community Edition is fine)

src/Flowtracker2Plugin/DataFileParser.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,15 @@ private DischargeActivity CreateDischargeActivity(FieldVisitInfo visit)
225225
new DateTimeInterval(visit.StartDate, visit.EndDate), UnitConverter.ConvertDischarge(DataFile.Calculations.Discharge));
226226
dischargeActivity.Comments = DataFile.Properties.Comment;
227227
dischargeActivity.ActiveUncertaintyType = UncertaintyType.Quantitative;
228-
dischargeActivity.QuantitativeUncertainty = DataFile.Calculations.UncertaintyIso.Overall * 100;
228+
229+
_resultsAppender.GetPluginConfigurations().TryGetValue("IsoUncertaintyScalar", out var scalarText);
230+
231+
if (!double.TryParse(scalarText, out var scalar))
232+
{
233+
scalar = 1.0;
234+
}
235+
236+
dischargeActivity.QuantitativeUncertainty = scalar * DataFile.Calculations.UncertaintyIso.Overall * 100;
229237

230238
return dischargeActivity;
231239
}

src/Flowtracker2Plugin/FlowTracker2Plugin.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
<WarningLevel>4</WarningLevel>
3333
</PropertyGroup>
3434
<ItemGroup>
35-
<Reference Include="FieldDataPluginFramework, Version=2.3.0.0, Culture=neutral, processorArchitecture=AMD64">
36-
<HintPath>..\packages\Aquarius.FieldDataFramework.19.2.2\lib\net472\FieldDataPluginFramework.dll</HintPath>
35+
<Reference Include="FieldDataPluginFramework, Version=2.9.0.0, Culture=neutral, processorArchitecture=AMD64">
36+
<HintPath>..\packages\Aquarius.FieldDataFramework.20.2.5\lib\net472\FieldDataPluginFramework.dll</HintPath>
3737
</Reference>
3838
<Reference Include="ICSharpCode.SharpZipLib, Version=0.85.5.452, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
3939
<SpecificVersion>False</SpecificVersion>
@@ -69,7 +69,7 @@
6969
</ItemGroup>
7070
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
7171
<PropertyGroup>
72-
<PostBuildEvent>$(SolutionDir)packages\Aquarius.FieldDataFramework.19.2.2\tools\PluginPackager.exe $(TargetPath) /OutputPath=$(ProjectDir)deploy\$(Configuration)\$(TargetName).plugin
73-
$(SolutionDir)packages\Aquarius.FieldDataFramework.19.2.2\tools\PluginTester.exe /Plugin=$(TargetPath) /Data=$(SolutionDir)..\data\DemoData.ft</PostBuildEvent>
72+
<PostBuildEvent>$(SolutionDir)packages\Aquarius.FieldDataFramework.20.2.5\tools\PluginPackager.exe $(TargetPath) /OutputPath=$(ProjectDir)deploy\$(Configuration)\$(TargetName).plugin
73+
$(SolutionDir)packages\Aquarius.FieldDataFramework.20.2.5\tools\PluginTester.exe /Plugin=$(TargetPath) /Data=$(SolutionDir)..\data\DemoData.ft</PostBuildEvent>
7474
</PropertyGroup>
7575
</Project>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Aquarius.FieldDataFramework" version="19.2.2" targetFramework="net472" />
3+
<package id="Aquarius.FieldDataFramework" version="20.2.5" targetFramework="net472" />
44
</packages>

0 commit comments

Comments
 (0)