Giter VIP home page Giter VIP logo

Comments (7)

davidcalhoun avatar davidcalhoun commented on September 27, 2024 1

It sounds like there's a problem in your code that is causing an infinite loop. Double check the stop condition and make sure it is indeed exiting. I'm using a similar looping strategy with own library and it works fine and is very fast.

One second intervals will get you a pretty nice ground track, except at extreme polar latitudes on Mercator projection maps, which have more map distortion and need <1s intervals for a slightly smoother-looking line at those latitudes.

from satellite-js.

thkruz avatar thkruz commented on September 27, 2024

I regularly do the whole catalog on a one second loop, so I agree with @davidcalhoun that your issue is that it isn't exiting. If you post your current code then I'd be happy to take a look.

I'd recommend interpolating between 250 or 500 millisecond measurements if you really want that level of detail - but as was said, you probably don't need that except in really specific cases. What are you trying to accomplish?

from satellite-js.

JaniniRami avatar JaniniRami commented on September 27, 2024

I felt that my function for predicting the position for every second in the day is wrong so I didn't include it in the issue, but ill include it now as you asked to see it, I hope I can get some feedback of what is the proper way to do it.

from satellite-js.

JaniniRami avatar JaniniRami commented on September 27, 2024

@thkruz I am trying to get a list of lat/lon for the ISS throughout the day to plot them on a map creating a ground track look alike map.

from satellite-js.

thkruz avatar thkruz commented on September 27, 2024

Two things that jump out (I can do some more testing when I get home):

Comment out the console.log and try again. You should instead do something like this:

Put this outside the loop.

var positionArray = [];

And this at the bottom

positionArray.push(position);
}

console.log(positionArray)

Second, lesser thing, is that having the var statements INSIDE the loop is going to cause new objects to be created every time. I would declare all your variables at the top ie:

var positionAndVelocity, positionEci, ... etc

and the just change the values inside the loop so that it reuses those objects over and over.

from satellite-js.

thkruz avatar thkruz commented on September 27, 2024

@thkruz I am trying to get a list of lat/lon for the ISS throughout the day to plot them on a map creating a ground track look alike map.

Then @davidcalhoun is definitely correct that you do not need millisecond intervals. Try 500 milliseconds and see if you like the results. A more complete solution would change i to increment by 1000 unless the current latitude > 80 || < -80 and then increment by 250.

from satellite-js.

JaniniRami avatar JaniniRami commented on September 27, 2024

Thank you so much, removing the vars and declaring them outside the function made it work, Also thanks for the advice I will try to use milliseconds instead of seconds and see how they compare in accuracy!

from satellite-js.

Related Issues (20)

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.