OSDN Git Service

62b996e996dd263bdd4f49200f496431f751600c
[yubeshi/yubeshi.git] / YubeshiTest / JapanTest / JpcTest.cs
1 /*\r
2  *      Yubeshi GPS Parser\r
3  *\r
4  *      This software is distributed under a zlib-style license.\r
5  *      See license.txt for more information.\r
6  */\r
7 \r
8 using System;\r
9 using System.Collections.Generic;\r
10 using System.Text;\r
11 using NUnit.Framework;\r
12 using Yubeshi;\r
13 using Yubeshi.Japan;\r
14 using C = YubeshiTest.SampleCoordinates;\r
15 \r
16 namespace YubeshiTest.JapanTest\r
17 {\r
18     class JpcTest\r
19     {\r
20 \r
21         [Test]\r
22         public void LlhToJpc9()\r
23         {\r
24             Jpc jpc = new Jpc(C.SkyTreeTop, Jpc.System.IX);\r
25             Assert.AreEqual(-32167.4434696, jpc.X, 1e-3);\r
26             Assert.AreEqual(-2046.2245495, jpc.Y, 1e-3);\r
27         }\r
28 \r
29         [Test]\r
30         public void GetLengthOfMeridianArc()\r
31         {\r
32             Assert.AreEqual(0.0, Jpc.GetLengthOfMeridianArc(0.0));\r
33             Assert.AreEqual(4984944.4, Jpc.GetLengthOfMeridianArc(45.0), 0.1);\r
34             Assert.AreEqual(10001965.7, Jpc.GetLengthOfMeridianArc(90.0), 0.1);\r
35         }\r
36 \r
37     }\r
38 }\r