From c5986886ea6dc8d8f435ab97289723d21636b6c7 Mon Sep 17 00:00:00 2001 From: Kevin Goos Date: Tue, 24 Apr 2018 10:27:40 +0200 Subject: [PATCH 1/4] Updated unit test --- .../Converters/CoordinateConverterUtilitiesTests.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/GPS.NET/Ghostware.GPS.NET.UnitTests/Converters/CoordinateConverterUtilitiesTests.cs b/GPS.NET/Ghostware.GPS.NET.UnitTests/Converters/CoordinateConverterUtilitiesTests.cs index 0f9b839..42c47cb 100644 --- a/GPS.NET/Ghostware.GPS.NET.UnitTests/Converters/CoordinateConverterUtilitiesTests.cs +++ b/GPS.NET/Ghostware.GPS.NET.UnitTests/Converters/CoordinateConverterUtilitiesTests.cs @@ -14,6 +14,9 @@ public void CreateComPortGpsTypeTest() double z = 0; var result = CoordinateConverterUtilities.GeoETRS89ToLambert72(50.8991, 4.6157, 0, ref x, ref y, ref z); Assert.AreEqual(1, result); + Assert.AreEqual(167371.95591558915, x); + Assert.AreEqual(176557.58040618268, y); + Assert.AreEqual(-42.959737811999808, z); } } } From f362965353fba7aa6344d575ae3d8b52f2cb98fc Mon Sep 17 00:00:00 2001 From: Kevin Goos Date: Tue, 24 Apr 2018 10:58:44 +0200 Subject: [PATCH 2/4] Updated coordinate converter and added unit tests --- .../CoordinateConverterUtilitiesTests.cs | 14 +++++++++++++- .../Converters/CoordinateConverterUtilities.cs | 2 +- .../Ghostware.GPS.NET/Properties/AssemblyInfo.cs | 1 + 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/GPS.NET/Ghostware.GPS.NET.UnitTests/Converters/CoordinateConverterUtilitiesTests.cs b/GPS.NET/Ghostware.GPS.NET.UnitTests/Converters/CoordinateConverterUtilitiesTests.cs index 42c47cb..8d32a7e 100644 --- a/GPS.NET/Ghostware.GPS.NET.UnitTests/Converters/CoordinateConverterUtilitiesTests.cs +++ b/GPS.NET/Ghostware.GPS.NET.UnitTests/Converters/CoordinateConverterUtilitiesTests.cs @@ -7,7 +7,7 @@ namespace Ghostware.GPS.NET.UnitTests.Converters public class CoordinateConverterUtilitiesTests { [TestMethod] - public void CreateComPortGpsTypeTest() + public void GeoEtrs89ToLambert72Tests() { double x = 0; double y = 0; @@ -18,5 +18,17 @@ public void CreateComPortGpsTypeTest() Assert.AreEqual(176557.58040618268, y); Assert.AreEqual(-42.959737811999808, z); } + + [TestMethod] + public void Lambert72ToGeoEtrs89Tests() + { + double x = 0; + double y = 0; + double z = 0; + CoordinateConverterUtilities.Lambert72ToGeoETRS89(167371.95591558915, 176557.58040618268, -42.959737811999808, ref x, ref y, ref z); + Assert.AreEqual(50.8991, x, 0.0001); + Assert.AreEqual(4.6157, y, 0.0001); + Assert.AreEqual(0, z, 0.0001); + } } } diff --git a/GPS.NET/Ghostware.GPS.NET/Converters/CoordinateConverterUtilities.cs b/GPS.NET/Ghostware.GPS.NET/Converters/CoordinateConverterUtilities.cs index 965c7b7..b0f340d 100644 --- a/GPS.NET/Ghostware.GPS.NET/Converters/CoordinateConverterUtilities.cs +++ b/GPS.NET/Ghostware.GPS.NET/Converters/CoordinateConverterUtilities.cs @@ -2,7 +2,7 @@ namespace Ghostware.GPS.NET.Converters { - public class CoordinateConverterUtilities + internal class CoordinateConverterUtilities { #if WIN64 private const string DllImport = @"plugins/ETRS89_LAMBERT_UTM_64bits.dll"; diff --git a/GPS.NET/Ghostware.GPS.NET/Properties/AssemblyInfo.cs b/GPS.NET/Ghostware.GPS.NET/Properties/AssemblyInfo.cs index 52dac0e..9d98e2e 100644 --- a/GPS.NET/Ghostware.GPS.NET/Properties/AssemblyInfo.cs +++ b/GPS.NET/Ghostware.GPS.NET/Properties/AssemblyInfo.cs @@ -13,6 +13,7 @@ [assembly: AssemblyCopyright("Copyright © Infrabel 2017")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] +[assembly: InternalsVisibleTo("Ghostware.GPS.NET.UnitTests")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from From 4c90fc19458f34512423c2c05de8f47f43f55235 Mon Sep 17 00:00:00 2001 From: Kevin Goos Date: Tue, 24 Apr 2018 10:59:56 +0200 Subject: [PATCH 3/4] Updated nuspec --- GPS.NET/Ghostware.GPS.NET/GPS.NET.nuspec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/GPS.NET/Ghostware.GPS.NET/GPS.NET.nuspec b/GPS.NET/Ghostware.GPS.NET/GPS.NET.nuspec index 0f8f7f3..8760bb3 100644 --- a/GPS.NET/Ghostware.GPS.NET/GPS.NET.nuspec +++ b/GPS.NET/Ghostware.GPS.NET/GPS.NET.nuspec @@ -2,7 +2,7 @@ Ghostware.GPS.NET - 1.0.13 + 1.0.14 Ghostware.GPS.NET Kevin Goos Ghostware @@ -18,10 +18,14 @@ - Using the Windows location API. (Starting from windows 7) - v1.0.13: + v1.0.14: + -------- + - Made CoordinateConverter class internal + + v1.0.13: -------- - Updated order of GPS status enum - + v1.0.12: -------- - Temp fix for the new nmea messages From 3631a59009331445477a31450992e9ef1bc99a75 Mon Sep 17 00:00:00 2001 From: Kevin Goos Date: Tue, 24 Apr 2018 11:05:10 +0200 Subject: [PATCH 4/4] Updated project file --- GPS.NET/GPS.NET.sln | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/GPS.NET/GPS.NET.sln b/GPS.NET/GPS.NET.sln index 9febe4a..9b5aac1 100644 --- a/GPS.NET/GPS.NET.sln +++ b/GPS.NET/GPS.NET.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 +# Visual Studio 15 +VisualStudioVersion = 15.0.27428.2037 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ghostware.GPS.NET", "Ghostware.GPS.NET\Ghostware.GPS.NET.csproj", "{CFBDB710-C75D-4DDF-94D2-8855FA6F9F07}" EndProject @@ -70,4 +70,7 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {6450ED75-69E6-4017-ACE0-C5BB0BC1076F} + EndGlobalSection EndGlobal