You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You have to do it yourself. To calculate x and y position via radec2xy, you need azimuth and elevation (to get the right ascension and declination via azel2radec). This in turn can be calculated from the TLE using satellite.js or orb.js.
You have to do it yourself. To calculate x and y position via radec2xy, you need azimuth and elevation (to get the right ascension and declination via azel2radec). This in turn can be calculated from the TLE using satellite.js or orb.js.
Hi @hmovahedim You need to ascertain the RA and dec values for whatever object you need (the current position would be for new Date()). The trick to getting the "orbital path" would be to extend this datetime to prior and future datetimes ... for whatever time span is appropriate.
For example, if your satellite is geostationary ... it won't have this. So you don't need to worry. However, if the satellite orbits Earth, say once every 90-93 minutes ... extend your x and y calculation for plus / minus 45 - 46.5 minutes.
Hi @hmovahedim there isn't a simple way for you to do this because it isn't trivial.
As has been said, you'd have to do a lot of the work yourself. You'll need to know the ins and outs of TLEs and the relevant maths for orbital calculations. Parallax is likely to be much more relevant for such close objects as satellites so, for me, this is very unlikely to be trivial.
@hmovahedim You can't draw a line with one point - you'll need at least two points for any meaningful line. There isn't a good simple answer to "draw a line". You will need to implement line drawing yourself. You could start by looking at the method drawConstellationLines. You could adapt that and remember that not everything in that will be appropriate for your purpose. For instance,
shows an object - posa - being made from RA/Dec coordinates. In the subsequent lines you can then see how posa and posbare used withmoveToandlineTo` to draw/update a line segment using .
You'll also need to make sure your new function gets called in drawImmediate so that it actually runs. Some other things to consider:
have you taken parallax into account?
if your lines are "long" you'll probably want to segment them given that the different projections do not automatically take into account curvature - it is not rendered using WebGL.
Activity
meNeither commentedon Dec 1, 2021
You have to do it yourself. To calculate x and y position via
radec2xy, you need azimuth and elevation (to get the right ascension and declination viaazel2radec). This in turn can be calculated from the TLE using satellite.js or orb.js.For a complete implementation, have a look at starlitter.info and my messy source code starting from line 2110.
hmovahedim commentedon Dec 6, 2021
Thank you.
But how can i draw line with x and y position in virtualsky ?
michealroberts commentedon Dec 6, 2021
Hi @hmovahedim You need to ascertain the RA and dec values for whatever object you need (the current position would be for
new Date()). The trick to getting the "orbital path" would be to extend this datetime to prior and future datetimes ... for whatever time span is appropriate.For example, if your satellite is geostationary ... it won't have this. So you don't need to worry. However, if the satellite orbits Earth, say once every 90-93 minutes ... extend your x and y calculation for plus / minus 45 - 46.5 minutes.
Does that make sense?
slowe commentedon Dec 6, 2021
Hi @hmovahedim there isn't a simple way for you to do this because it isn't trivial.
As has been said, you'd have to do a lot of the work yourself. You'll need to know the ins and outs of TLEs and the relevant maths for orbital calculations. Parallax is likely to be much more relevant for such close objects as satellites so, for me, this is very unlikely to be trivial.
hmovahedim commentedon Dec 7, 2021
I can calculate RA and DEC so how can i draw line with RA and DEC ?
slowe commentedon Dec 7, 2021
@hmovahedim You can't draw a line with one point - you'll need at least two points for any meaningful line. There isn't a good simple answer to "draw a line". You will need to implement line drawing yourself. You could start by looking at the method drawConstellationLines. You could adapt that and remember that not everything in that will be appropriate for your purpose. For instance,
posa = this.radec2xy(this.stars[a][2], this.stars[a][3]);shows an object -
posa- being made from RA/Dec coordinates. In the subsequent lines you can then see howposaand posbare used withmoveToandlineTo` to draw/update a line segment using .You'll also need to make sure your new function gets called in
drawImmediateso that it actually runs. Some other things to consider: