Comments (4)
// Or you can use a JavaScript Date
var positionAndVelocity = satellite.propagate(satrec, new Date());
Create a Date variable passTime = new Date(year, month, day, hours, minutes, seconds, milliseconds);
Then use var positionAndVelocity = satellite.propagate(satrec, passTime); instead.
As for changing your location...
// Set the Observer at 122.03 West by 36.96 North, in RADIANS
var observerGd = {
longitude: satellite.degreesToRadians(-122.0308),
latitude: satellite.degreesToRadians(36.9613422),
height: 0.370
};
Just change those values to the location you want to use.
It's that simple! Let me know if you need anything clarified or have more questions.
from satellite-js.
Thanks, but in my case I don't know the date. I need to know when the satellite will be passing nearby my location. I want to know when I will be able to observe it from my position :).
Something like this site: https://spotthestation.nasa.gov/sightings/view.cfm?country=France®ion=None&city=Paris. It gives you a list of dates when ISS will be visible from a given city.
from satellite-js.
This is done through iteration. I don't have a code editor available and probably have a glaring error, but conceptually:
// Set Start Time
passTime = new Date(year, month, day, hours, minutes, seconds, milliseconds);
// Loop at 30 second intervals for 1 day
for (timeAdjust = 0; timeAdjust < 2880; timeAdjust++) {
passTime = passTime + (timeAdjust * 30) // Add 30 seconds this loop
positionAndVelocity = satellite.propagate(satrec, passTime);
...
if (elevation > 10) {
// Do stuff for visible passes like adding it to a table
}
}
There are things you can do to reduce the time this loop takes, like skipping ahead in time after an object leaves field of view, but there is no way around guess-and-check.
from satellite-js.
Thank you! That's what I needed.
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 10
- 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
- jday() and invjday() do NOT keep milliseconds HOT 4
- Can I use satellite-js to create czml files? HOT 5
- satellite.min.js HOT 4
- Getting lat/lon for a whole day. HOT 7
- 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.