Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid look angles returned #41

Closed
jbreed opened this issue Feb 8, 2018 · 4 comments
Closed

Invalid look angles returned #41

jbreed opened this issue Feb 8, 2018 · 4 comments

Comments

@jbreed
Copy link

jbreed commented Feb 8, 2018

Currently having issues getting back valid look angles. Maybe someone can review my code to see the hangup, but as it is right now I am getting azimuth reading of 2.xxxx* and switching around satellites I don't see anything over 5, or 6, degrees.

Example Output:
azimuth:2.738130998510715
elevation:0.869799331216238
rangeSat:37079.4326120618

Code example following the readme:

var satrec = sat2.twoline2satrec(thisSat.Line1, thisSat.Line2);
var positionAndVelocity = sat2.propagate(satrec, new Date());
var positionEci = positionAndVelocity.position,
velocityEci = positionAndVelocity.velocity;

var deg2rad = Math.PI / 180;
var observerGd = {
	longitude: -92.000000 * deg2rad,
	latitude:  31.000000 * deg2rad,
	height: 0.302
};
var gmst = sat2.gstime(new Date());
var positionEcf   = sat2.eciToEcf(positionEci, gmst),
	lookAngles    = sat2.ecfToLookAngles(observerGd, positionEcf)

console.log(lookAngles)
@nhamer
Copy link

nhamer commented Apr 14, 2018

azimuth is in radians

@ezze
Copy link
Collaborator

ezze commented Apr 16, 2018

@jbreed, was absence of conversion from radians to degrees the issue in your case?

@jbreed
Copy link
Author

jbreed commented Apr 16, 2018

I haven't looked back at this in a bit. If I recall, many satellites I received spot on AZ and EL except for those that had an inclined orbit.

When I look back at this, I'll be sure to follow up here

@ezze
Copy link
Collaborator

ezze commented Aug 10, 2018

Feel free to open again.

@ezze ezze closed this as completed Aug 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants