Comments (7)
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.
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.
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.
@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.
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 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.
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)
- Does satellite.js provide a way to determine if a satellite is above a ground station? HOT 2
- ecfToEci not defined in index.d.ts HOT 1
- TLE Errors - CelesTrak data now at https://celestrak.org HOT 1
- Two Errors in Existing Implementation HOT 8
- Detail units in README HOT 1
- Possible issue with accuracy HOT 5
- Non-LEO orbits do not properly display HOT 2
- Idea: WASM version of the library? HOT 11
- Cannot read properties of undefined (reading 'twoline2satrec') HOT 2
- How can I get the time for when a satellite will be over the antemeridian again? HOT 2
- Feature request: sgp4-xp HOT 3
- jday not in index.d.ts HOT 3
- Error in calculating the Doppler Factor. HOT 5
- Vulnerabilities in devDependencies
- unable to import in node.js
- Uncaught (in promise) TypeError: longstr1 is undefined
- bug: PositionAndVelocity's type should be EciVec3 | false
- Dates can effect propagation drasitically HOT 7
- In cesuim, I want draw the orbit of the satellite,in ECI Coordinate systemใ HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from satellite-js.