Comments (7)
jspredict looks very handy, but it still relies on looping through at a specified interval.
What I have done to increase performance is throw a binary flag each iteration if the object is in view and if it is false, then check if it was true last iteration (determine if the object just left field of view).
If the object has just left field of view, I skip a number of iterations equal to 3/4th the period of the object (no way it is in view on the other side of the earth).
Example:
At 1200z the ISS comes into field of view. I check at 1201z, 1202z, 1203z and 1204z and it is still in view. At 1205z it is out of view, so instead of adding 60s, I add ~67 minutes (75% of its 90 minute orbital period) and then continue iterating at 60s intervals.
Since I often want 1s intervals this can save me hundreds of thousands of iterations.
from satellite-js.
I use this: https://github.com/nsat/jspredict
from satellite-js.
I do not have a helper function that does that, but if you would like to make a pull request to include something useful like that (or other useful helper utilities you might have), I'd be happy to look over them and see if I can include them :)
from satellite-js.
@laptopdude90 I'm facing the same challenge. Did you find or develop a better way ?
from satellite-js.
@fpfaffendorf No, but I came up with an idea in theory:
Get the angle for two times, far apart, but less than an orbit period. I have a feeling they follow a sinusoidal trend (Not tested) so you could use that to narrow it down a lot, and then find the exact values and verify.
from satellite-js.
@laptopdude90 Thanks for your response. That's an interesting idea that might save some CPU. Specially for LEO satellites.
I think that most satellite prediction software use different formulas to find the rise, transit and set times of a satellite instead of running the math for each instant. I've done that in the past for solar system objects and again, there were formulas. It wasn't necessary to loop.
Best,
from satellite-js.
This can probably be closed.
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
- Jumping coordinates?
- Incorrect Propagation HOT 1
- 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.