Giter Club home page Giter Club logo

aa-js's Introduction

Hi ๐Ÿ‘‹, I'm onekiloparsec

An astrophysicist turned software tech lead

onekiloparsec

  • ๐Ÿ”ญ Iโ€™m currently working on arcsecond.io

  • ๐Ÿ‘จโ€๐Ÿ’ป All my projects are available on GitHub (my own personel website is now superfluous).

  • ๐Ÿ’ฌ Ask me about django, vue.js, swift, objective-c, python, stellar evolution and quantum optics...

  • ๐Ÿ“ซ How to reach me [email protected] or [email protected] for personal & astro matters.

  • ๐Ÿ“ซ Professionaly, you can reach me at [email protected]

  • You may be interested in reading why I chose such nickname here...

onekiloparsec onekiloparsec cedric.foellmi onekiloparsec

aa-js's People

Contributors

cedric-foellmi avatar coffee-converter avatar dependabot[bot] avatar onekiloparsec 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

aa-js's Issues

Add a license

Did you have a particular license in mind when making this work available? Would you mind adding one to help ensure the future availability of these tools? I recommend GPL v3. It's what I use myself.

Can't consume AA.js from nom

Hey, excellent project! I'm trying to integrate in a personal project built on node.js.
I can't do that out of the box because only the src/ folder is distributed via npm (node doesn't support es modules at this time). So I have to build it using rollup:

$ rollup node_modules/aa.js/src/index.js --file aa.js/index.js --format cjs

Then I can import it doing:

const { moon } = require("./aa.js");

It's obviously not ideal. I can see a webpack configuration, but the resulting files should be added to npm and a new version of the package published.

ts7016 error - cannot resolve types between index.d.ts and package.json

I performed an npm install aa-js into my Typescript project and VS Code is giving this linting error on the import statement.

I followed the example in the readme and started by importing julian days.

import { juliandays, Earth } from 'aa-js'

const jd = juliandays.getJulianDay(new Date())

Under the 'aa-js' it provides an error and this is the message:

Could not find a declaration file for module 'aa-js'. '/[appname]/node_modules/aa-js/dist/aa-js.js' implicitly has an 'any' type. There are types at '[appname]/node_modules/aa-js/dist/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'aa-js' library may need to update its package.json or typings. ts(7016)

For example, this code does work:

import {
  Sun,
  coordinates,
  type JulianDay,
  GeographicCoordinates,
  HorizontalCoordinates,
  EquatorialCoordinates,
} from "aa-js";

export const calcSunAltitude = (
  jd: JulianDay,
  coord: GeographicCoordinates
): HorizontalCoordinates => {
  const sunGeoEquCoord: EquatorialCoordinates =
    Sun.getGeocentricEquatorialCoordinates(jd);
  return coordinates.transformEquatorialToHorizontal(jd, sunGeoEquCoord, coord)
    .altitude;
};

Although I am able to compile and run the web application with this error, I am not provided with any Typescript intellisense or typechecking.

MapTo0To360Range causing loss of precision

Thank you for this awesome library! I use it to make an app that calculates precise age.

However I noticed that precision wasn't great. Specifically because of the function MapTo0To360Range, so I removed it in a local version. This also made my code simpler because I was reimplementing the lost information anyway (number of orbital cycles between dates).

Could This be removed and have this function be available to be used independently by developers? This is a breaking change so I suggest a whole new function, but without MapTo0To360Range, while the current function would become a wrapper.

I can make a PR if this sounds good!

Introduce Mars details and coordinates

Hi I'm trying to see if I can use this library, I tried your basic example:

import { julianday, moon } from 'astronomical-algorithms'

...

const jd = julianday.getJulianDay(new Date()),
const coords = moon.equatorialCoordinates(jd)

but at compile I get this error:

"export 'julianday' was not found in 'astronomical-algorithms'

I know it's still a wip, I'm just trying to understand if i'm making mistakes on my side, thanks

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.