本文整理汇总了C#中SwissEph.swe_calc方法的典型用法代码示例。如果您正苦于以下问题:C# SwissEph.swe_calc方法的具体用法?C# SwissEph.swe_calc怎么用?C# SwissEph.swe_calc使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SwissEph
的用法示例。
在下文中一共展示了SwissEph.swe_calc方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
}
示例2: Test_swe_azalt
public void Test_swe_azalt()
{
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[] xin = new double[6], xaz = new double[6]; String serr = null;
swe.swe_calc(tjd, SwissEph.SE_SUN, SwissEph.SEFLG_MOSEPH, xin, ref serr);
swe.swe_azalt(tjd, SwissEph.SE_ECL2HOR, geopos, 0, 0, xin, xaz);
Assert.AreEqual(249.642425229358, xaz[0], 0.000000001);
Assert.AreEqual(-32.8340786097275, xaz[1], 0.0000000001);
Assert.AreEqual(-32.8340786097275, xaz[2], 0.0000000001);
}
}
示例3: Test_swe_calc
public void Test_swe_calc()
{
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[] xx = new double[6]; String serr = null;
swe.swe_calc(tjd, SwissEph.SE_SUN, SwissEph.SEFLG_MOSEPH, xx, ref serr);
Assert.AreEqual(142.779826288975, xx[0], 0.000000000001);
Assert.AreEqual(-1.57665386141208E-05, xx[1], 0.0000000000001);
Assert.AreEqual(1.01267253822512, xx[2], 0.0000000000001);
Assert.AreEqual(0, xx[3], 0.0000000000001);
Assert.AreEqual(0, xx[4], 0.0000000000001);
Assert.AreEqual(0, xx[5], 0.0000000000001);
}
}