我是靠谱客的博主 机灵丝袜,最近开发中收集的这篇文章主要介绍船舶航向计算,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

参考网址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

最后

以上就是机灵丝袜为你收集整理的船舶航向计算的全部内容,希望文章能够帮你解决船舶航向计算所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

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

评论列表共有 0 条评论

立即
投稿
返回
顶部