Geospatial coordinates and distance in kilometers

后端 未结 5 1639
礼貌的吻别
礼貌的吻别 2020-12-02 11:31

This is a followup to this question.

I seem to be stuck on this. Basically, I need to be able to convert back and forth to referring to coordinates either in the st

5条回答
  •  無奈伤痛
    2020-12-02 12:05

    Your conversion between km and radians is wrong. A nautical mile is 1/60th of a degree, so assuming that 1.15... is your conversion from miles to nautical miles, and 1.6... is your conversion from km to statute miles,

       nm = km /  (1.1515 * 1.609344);
       deg = nm / 60;
       rad = toRadians(deg);
    

    In other words, I think you're off by a factor of 1000.

提交回复
热议问题