我是靠谱客的博主 机灵丝袜,这篇文章主要介绍船舶航向计算,现在分享给大家,希望可以做个参考。

参考网址http://rebelengineering.blogspot.com/

Here is some of our code- this section is a compound if function written last night that determines the course angle based on the cartesian plane and the angle in degrees that the boat needs to travel.

{
   if((myLat- wp1Lat) < 0) //Top hemispehere
       {
       if((myLong - wp1Long) < 0) //Left Hemishpere
       {float course = 180 - angle;}
      
       else  //Right hemishpere
       {course = angle;}
       }
   else // Lower hemisphere
      {
      if((myLong - wp1Long) > 0) //Left Hemishpere
      {course = 180 + angle;}
     
      else  //Right hemishpere
      {course = 180 - angle;}
     
      Serial.print("        course:       ");
      Serial.print(course,4);
      }
}

This is the final code that calculates the course of the boat. This does NOT include tacking, only the actual angle course from point

最后

以上就是机灵丝袜最近收集整理的关于船舶航向计算的全部内容,更多相关船舶航向计算内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(114)

评论列表共有 0 条评论

立即
投稿
返回
顶部