开发者

calculate location in virtual radar by gps position and compass

so i got three variables, my location, my target location and the compass heading. how can i calculate where the target location should be represented on a virtual radar?

i guess i first must calculate the distance between the two gps points and the angle of them relative to north or so. and then there should be a formula with sin or co开发者_Go百科s to place that point on a coordinate system...?

ps: in javascript...


Start with simpler problems.

  1. In 2D, try converting back and forth between cartesian and polar coordinates. References are available.
  2. Do the same, but for the polar coordinates use an observer who measures angles from some ray that is not in the X direction.
  3. The same, but using an origin for the polar coordinates that is not at {x=0,y=0}.
  4. In 3D, go back and forth between cartesian and spherical coordinates.
  5. Again, with spherical coordinates in an arbitrary orientation, using an arbitrary origin.
  6. Now convert from GPS coordinates (which are spherical) to cartesian, then to radar-centered spherical.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜