示例#1
0
        public void CreateDeviationTable()
        {
            MagneticDeviationCorrection dev = new MagneticDeviationCorrection();

            dev.CreateCorrectionTable(
                "../../../Nmea-2020-07-23-12-02.txt");

            dev.Save("Calibration_Cirrus.xml", "Cirrus", "HBY5127", "269110660");
            Assert.True(File.Exists("Calibration_Cirrus.xml"));
        }
示例#2
0
        public void CreateDeviationTable4()
        {
            using (new SetCultureForTest("de-DE"))
            {
                MagneticDeviationCorrection dev = new MagneticDeviationCorrection();
                dev.CreateCorrectionTable(new string[]
                {
                    "../../../Nmea-2021-08-25-16-25.txt", "../../../Nmea-2021-08-25-16-49.txt"
                },
                                          DateTimeOffset.Parse("2021-08-25T16:47:00", CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal),
                                          DateTimeOffset.Parse("2021-08-25T16:53:00", CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal));

                dev.Save("Calibration_Cirrus_v4.xml", "Cirrus", "HBY5127", "269110660");

                var expected = new MagneticDeviationCorrection("../../../Calibration_Cirrus_v3.xml");
                var actual   = new MagneticDeviationCorrection("Calibration_Cirrus_v4.xml");
                Assert.Equal(expected, actual);
            }
        }