本文整理汇总了C#中SwissEph.swe_set_topo方法的典型用法代码示例。如果您正苦于以下问题:C# SwissEph.swe_set_topo方法的具体用法?C# SwissEph.swe_set_topo怎么用?C# SwissEph.swe_set_topo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SwissEph
的用法示例。
在下文中一共展示了SwissEph.swe_set_topo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Test_swe_set_topo
public void Test_swe_set_topo()
{
using (var swe = new SwissEph())
{
double tjd = swe.swe_julday(1974, 8, 16, 0.5, SwissEph.SE_GREG_CAL);
double[] geopos = new double[] { 47.853333, 5.333889, 468 };
double[] xin1 = new double[6],
xin2 = new double[6],
xin3 = new double[6]
; String serr = null;
swe.swe_calc(tjd, SwissEph.SE_SUN, 33024, xin1, ref serr);
Assert.AreEqual(0, xin1[0], 0.0000000000001);
Assert.AreEqual(0, xin1[1], 0.0000000000001);
Assert.AreEqual(0, xin1[2], 0.0000000000001);
swe.swe_set_topo(geopos[0], geopos[1], geopos[2]);
swe.swe_calc(tjd, SwissEph.SE_SUN, 33024, xin2, ref serr);
Assert.AreEqual(142.78180233188, xin2[0], 0.000000000001);
Assert.AreEqual(6.06728560368863E-05, xin2[1], 0.000000000001);
Assert.AreEqual(1.01269577772231, xin2[2], 0.000000000001);
swe.swe_calc(tjd, SwissEph.SE_SUN, 33024, xin3, ref serr);
Assert.AreEqual(142.78180233188, xin3[0], 0.000000000001);
Assert.AreEqual(6.06728560368863E-05, xin3[1], 0.0000000000001);
Assert.AreEqual(1.01269577772231, xin3[2], 0.0000000000001);
}
}