本文整理汇总了C#中SwissEph.swe_julday方法的典型用法代码示例。如果您正苦于以下问题:C# SwissEph.swe_julday方法的具体用法?C# SwissEph.swe_julday怎么用?C# SwissEph.swe_julday使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SwissEph
的用法示例。
在下文中一共展示了SwissEph.swe_julday方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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_rev
public void Test_swe_azalt_rev()
{
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[] { 249.64242931513104, -32.8340765334715 };
double[] xaz = new double[6];
swe.swe_azalt_rev(tjd, SwissEph.SE_ECL2HOR, geopos, xin, xaz);
Assert.AreEqual(142.779825047858, xaz[0], 0.000000000001);
Assert.AreEqual(-1.90862916755642E-05, xaz[1], 0.0000000000001);
Assert.AreEqual(0, xaz[2], 0.0000000000001);
}
}
示例3: 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);
}
}
示例4: 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);
}
}
示例5: Test_swe_calc_ut
public void Test_swe_calc_ut()
{
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_ut(tjd, SwissEph.SE_SUN, SwissEph.SEFLG_MOSEPH, xx, ref serr);
Assert.AreEqual(142.780328315269, xx[0], 0.000000000001);
Assert.AreEqual(-1.57808056001826E-05, xx[1], 0.0000000000001);
Assert.AreEqual(1.01267244282576, 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);
}
}
示例6: TestJulDay
public void TestJulDay()
{
using (var swe = new SwissEph()) {
Assert.AreEqual(0.0, swe.swe_julday(-4713, 11, 24, 12.0, SwissEph.SE_GREG_CAL));
Assert.AreEqual(0.0, swe.swe_julday(-4712, 1, 1, 12.0, SwissEph.SE_JUL_CAL));
Assert.AreEqual(2000000.0, swe.swe_julday(763, 9, 18, 12.0, SwissEph.SE_GREG_CAL));
Assert.AreEqual(2000000.0, swe.swe_julday(763, 9, 14, 12.0, SwissEph.SE_JUL_CAL));
Assert.AreEqual(1063884, swe.swe_julday(-1800, 9, 18, 12.0, SwissEph.SE_GREG_CAL));
Assert.AreEqual(1063865, swe.swe_julday(-1800, 9, 14, 12.0, SwissEph.SE_JUL_CAL));
Assert.AreEqual(2442275.47916667, swe.swe_julday(1974, 8, 15, 23 + 30 / 60.0 + 0 / 3600.0, SwissEph.SE_GREG_CAL), 0.00000001);
Assert.AreEqual(2456774.20375, swe.swe_julday(2014, 4, 26, SwissEph.GetHourValue(16, 53, 24), SwissEph.SE_GREG_CAL));
}
}