cyjoelchen / php-sweph

PHP Extension for Swiss Ephemeris
Other
63 stars 29 forks source link

When using the jpl de431.eph some values are not set #80

Closed blucobalto closed 3 years ago

blucobalto commented 3 years ago

Describe the bug When using the jpl de431.eph some values are not set. I am using the example in Readme.md Use SEFLG_JPLEPH || SEFLG_SPEED; In the return array of planetary data the dimensions 3, 4, 5 are not valued;

To Reproduce Steps to reproduce the behavior:

  1. set: SEFLG_JPLEPH || SEFLG_SPEED
  2. swe_set_ephe_path ("./sweph/ephe"); //for me
  3. swe_set_jpl_file ("de431.eph"); //for me
  4. Date and Hour: 2021/11/01 17:00:00
  5. See values

Expected behavior

With SEFLG_SPEED: "julday": 2459520.2083333335, "0": { "0": 219.48769346485267, "1": 6.167648920321542e-5, "2": 0.9924469626090567, "3": 1.0008847453654508, "4": -1.9935282494445833e-5, "5": -0.0002532148272806739, "serr": "", "rc": 258 }, "1": { "0": 176.38730256037078, "1": 4.781276302406268, "2": 0.0024963818084878624, "3": 13.964784159645811, "4": -0.528824526366118, "5": -3.9819746948354696e-5, "serr": "", "rc": 258 }, "2": { "0": 203.44184090562658, "1": 2.0442185461269946, "2": 1.1682872169599843, "3": 1.4979756689684907, "4": -0.04530736989453414, "5": 0.021981241196193605, "serr": "", "rc": 258 }, .................

With JPL DE431.eph (SEFLG_JPLEPH || SEFLG_SPEED) "julday": 2459520.2083333335, "0": { "0": 219.4876933828836, "1": 6.165079464200357e-5, "2": 0.9924469597778867, "3": 0, "4": 0, "5": 0, "serr": "", "rc": 1 }, "1": { "0": 176.38730252640642, "1": 4.781276296811643, "2": 0.0024963818121133997, "3": 0, "4": 0, "5": 0, "serr": "", "rc": 1 }, "2": { "0": 203.4418408023076, "1": 2.044218528194945, "2": 1.1682872149149703, "3": 0, "4": 0, "5": 0, "serr": "", "rc": 1 }, ................. Thanks a lot, Blu

aloistr commented 3 years ago

I am not fluent in php syntax, but think it must ,like in C, be SEFLG_JPLEPH | SEFLG_SPEED and not ||

With Moshier and Swisseph, speed is always returned, even when not correctly requested, because it is there anyway.

In jpl mode it must be computed specifically and is only provided if correctly requested. Personally, I would not use jpl mode, is has zero advantages.

Am 02.11.2021 um 18:05 schrieb blucobalto @.***>:

 Describe the bug When using the jpl de431.eph some values are not set. I am using the example in Readme.md Use SEFLG_JPLEPH || SEFLG_SPEED; In the return array of planetary data the dimensions 3, 4, 5 are not valued;

To Reproduce Steps to reproduce the behavior:

set: SEFLG_JPLEPH || SEFLG_SPEED swe_set_ephe_path ("./sweph/ephe"); //for me swe_set_jpl_file ("de431.eph"); //for me Date and Hour: 2021/11/01 17:00:00 See values Expected behavior

With Moshier: "julday": 2459520.2083333335, "0": { "0": 219.48769346485267, "1": 6.167648920321542e-5, "2": 0.9924469626090567, "3": 1.0008847453654508, "4": -1.9935282494445833e-5, "5": -0.0002532148272806739, "serr": "", "rc": 258 }, "1": { "0": 176.38730256037078, "1": 4.781276302406268, "2": 0.0024963818084878624, "3": 13.964784159645811, "4": -0.528824526366118, "5": -3.9819746948354696e-5, "serr": "", "rc": 258 }, "2": { "0": 203.44184090562658, "1": 2.0442185461269946, "2": 1.1682872169599843, "3": 1.4979756689684907, "4": -0.04530736989453414, "5": 0.021981241196193605, "serr": "", "rc": 258 }, .................

With JPL DE431.eph (SEFLG_JPLEPH || SEFLG_SPEED) "julday": 2459520.2083333335, "0": { "0": 219.4876933828836, "1": 6.165079464200357e-5, "2": 0.9924469597778867, "3": 0, "4": 0, "5": 0, "serr": "", "rc": 1 }, "1": { "0": 176.38730252640642, "1": 4.781276296811643, "2": 0.0024963818121133997, "3": 0, "4": 0, "5": 0, "serr": "", "rc": 1 }, "2": { "0": 203.4418408023076, "1": 2.044218528194945, "2": 1.1682872149149703, "3": 0, "4": 0, "5": 0, "serr": "", "rc": 1 }, ................. Thanks a lot, Blu

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

blucobalto commented 3 years ago

Ops! You're right. SEFLG_JPLEPH | SEFLG_SPEED; // is the correct statement. The values are calculated correctly.

Thanks a lot, Blu