7yl4r/pulsarMap

Calculating the direction in degrees

Closed this issue · 6 comments

I have a long lasting question about how to determine the angle from the line to the galactic center using the data. Please help!

7yl4r commented

It has been a very long time since I wrote this code, but it looks like the galactic lat, lon are included in the database.

pulsarMap/js/drawMap.js

Lines 184 to 185 in a1b316e

pulsarData.galacticLongitude = data[row][4];
pulsarData.galacticLatitude = data[row][5]; // < off galactic plane, used primarily to calculate distance w/ z

So to get the angle you just use trig: angle = arctan(opposite/adjacent).

Yeah actually i found it and it's actually based on the galactic longitude.

7yl4r commented

👍