/* * Yubeshi GPS Parser * * This software is distributed under a zlib-style license. * See license.txt for more information. */ using System; using System.Collections.Generic; using System.Text; using NUnit.Framework; using Yubeshi; namespace YubeshiTest { class EcefCoordinateTest { [Test] public void ToGeodeticCoordinate() { //35.658611, 139.745556 GeodeticCoordinate geo = new GeodeticCoordinate(35.710058, 139.810719, 634.0); EcefCoordinate ecef = new EcefCoordinate(-3961181.33065119, 3346187.6735982029, 3702487.1956870905); GeodeticCoordinate converted = ecef.ToGeodeticCoordinate(); Assert.AreEqual(geo.Latitude, converted.Latitude, 1e-9); Assert.AreEqual(geo.Longitude, converted.Longitude, 1e-9); Assert.AreEqual(geo.Altitude, converted.Altitude, 2e-9); } } }