Shenzhen Tourism

A Useful Links

AD

Documentation

Find Technical Support

GIS

Java

Microsoft

Paper

Recommended Reading

US UK RU

Web

GPS方向解析代码

  private static String getDirection(int angle)
  {
         String direction = "";

         if(angle < 90)
         {
             direction = "东偏北" + (90 - angle) + "°";
         }

         if(angle > 90 && angle < 180)
         {
             direction = "东偏南" + (angle - 90) + "°";
         }

         if(angle > 180 && angle < 270)
         {
          direction = "西偏南" + (angle - 180) + "°";
         }

         if(angle > 270)
         {
             direction = "西偏北" + (angle - 270) + "°";
         }
         return direction;
  }




    public int getDirection(byte buff[])
    {
        int cardirection = 0;
        cardirection = buff[0] * 256 + buff[1];
        return cardirection;
    }

posted on 2008-01-22 15:41 kaixin110 阅读(329) 评论(0)  编辑 收藏 所属分类: GPS,GIS,RS,WebGIS


标题  
姓名  
主页
Email (只有博主才能看到) 
验证码 *  看不清,换一张 [登录][注册]
内容(请不要发表任何与政治相关的内容)  
  登录  使用高级评论  新用户注册  返回页首  恢复上次提交      


相关链接: