GithubHelp home page GithubHelp logo

ryuphi / astrology-api Goto Github PK

View Code? Open in Web Editor NEW
131.0 5.0 46.0 2.1 MB

Astrology API Rest

License: GNU Affero General Public License v3.0

JavaScript 100.00%
astrology api nodejs swisseph astrology-api docker swiss-ephemeris

astrology-api's People

Contributors

dependabot[bot] avatar ryuphi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

astrology-api's Issues

The API is returning incorrect data

Many thanks to author for creating this. I think I am doing something wrong and nothing to do with this project.

I have the following details
27-Apr-1979
06.45 AM
Meerut (Uttar Pradesh)
+5.30

I setup the project locally and pass the information
Got the longitude/Latitude values from here https://www.latlong.net/

http://localhost:3000/horoscope?time=1979-04-27T06%3A45%3A00%2B05%3A30&latitude=28.984463&longitude=77.706413

Unescaped URL (for ref only)
http://localhost:3000/horoscope?time=1979-04-27T06:45:00+05:30&latitude=28.984463&longitude=77.706413

The result I am getting is incorrect, like Sun degree is 6 degree and sign is 2 which is incorrect. Kindly help with this, not sure what I am doing wrong.

Correct data

image

Gracias!

Encontré tu trabajo por casualidad
investigando recursos para una App que quiero montar simulando el sistema solar.

Quedé asombrado con este trabajo:
https://github.com/eleanorlutz/asteroids_atlas_of_space
y voy a esforzarme por modelar bien un software que considere varias fuentes de datos, las procese con opciones flexibles y rinda como Cliente Web.

Ojalá mantengamos contacto para motivarnos en este tipo de proyectos
pues también me gustala astrología y quisiera mejores herramientas.
Saludos!

Got error while installing node modules

Error: Cannot find module 'C:\Workspace\Projects\astrology-api\node_modules\swisseph\lib/../build/Release/swisseph.node'
Require stack:

  • C:\Workspace\Projects\astrology-api\node_modules\swisseph\lib\swisseph.js
  • C:\Workspace\Projects\astrology-api\src\astrologer\astros.js
  • C:\Workspace\Projects\astrology-api\src\astrologer\index.js
  • C:\Workspace\Projects\astrology-api\src\api\index.js
  • C:\Workspace\Projects\astrology-api\app.js
  • C:\Workspace\Projects\astrology-api\index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:885:15)
    at Function.Module._load (internal/modules/cjs/loader.js:730:27)
    at Module.require (internal/modules/cjs/loader.js:957:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object. (C:\Workspace\Projects\astrology-api\node_modules\swisseph\lib\swisseph.js:1:16)
    at Module._compile (internal/modules/cjs/loader.js:1068:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
    at Module.load (internal/modules/cjs/loader.js:933:32)
    at Function.Module._load (internal/modules/cjs/loader.js:774:14)
    at Module.require (internal/modules/cjs/loader.js:957:19) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    'C:\Workspace\Projects\astrology-api\node_modules\swisseph\lib\swisseph.js',
    'C:\Workspace\Projects\astrology-api\src\astrologer\astros.js',
    'C:\Workspace\Projects\astrology-api\src\astrologer\index.js',
    'C:\Workspace\Projects\astrology-api\src\api\index.js',
    'C:\Workspace\Projects\astrology-api\app.js',
    'C:\Workspace\Projects\astrology-api\index.js'
    ]
    }
    error Command failed with exit code 1.
    info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

House calculations and planet longitudes not matching with Swiss Ephemeris

The effort put in by you is appreciable. However, when I checked with Swiss Ephemeris the results are at variance. To test it, I used following data: date =11th May 2000, place longitude 78.00, Latitude 13.00, Time 5:30AM Time zone +5:30 i.e. UT=0.00 , House system=Placidus
So the test url was :
https://dev-astrology-api.herokuapp.com/horoscope?time=2000-05-11T05:30:00%2B05:30&latitude=13.000&longitude=78.000
The Ascendant result was "{"asc":{"position":{"degrees":13,"minutes":17,"seconds":25,"longitude":43.29034759846253},"sign":2}"
While using test page of astro.com, https://www.astro.com/swisseph/swetest.htm with following "Option = -b11.05.2000 -p -house78.00,13.00,P -ut0:00" the result obtained are as follows:
/ulb/swetest -b11.5.2002 -n1 -s1 -fPLBRS -pp -eswe -b11.05.2000 -p -house78.00,13.00,P -ut0:00
date (dmy) 11.5.2000 greg. 0:00:00 UT version 2.10.01a
UT: 2451675.500000000 delta t: 63.931325 sec
TT: 2451675.500739946
geo. Long 78.000000, Lat 13.000000, alt 0.000000
Epsilon (t/m) 23°26'16.8419 23°26'21.2387
Nutation -0° 0'16.2303 -0° 0' 4.3967
Houses system P (Placidus) for long= 78° 0' 0.0000, lat= 13° 0' 0.0000
house 1 43°17'21.1025 394° 5'19.7268
house 2 72°11' 5.8018 344°39' 3.5695
house 3 98°14'41.3484 330°45'22.6552
house 4 124°44'25.4895 351°24'55.2438
house 5 154°26'51.7827 393°54'22.7902
house 6 188°15'42.1466 419°56'24.2202

Another software (using Swiss Ephemeris) gives exactly same House positions as above. But the result given by your implementation has a difference of about 4" of arc.

Please check and revert back.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.