大头
Table_bottom

标签云
Table_bottom

分类
Table_bottom

日历
二月
28293031123
45678910
11121314151617
18192021222324
252627282912
Table_bottom

评论
Table_bottom

留言
Table_bottom

微博
Table_bottom

热门文章
Table_bottom

随机文章
Table_bottom

豆瓣上谁关注这里
Table_bottom

链接
Table_bottom

搜索栏
Table_bottom

RSS
RSS Link
Table_bottom

功能
Table_bottom

页面
Table_bottom

计数器
462732
Table_bottom

访客统计
Table_bottom

存档
Table_bottom

蓝屏

尽量不要出现蓝屏。

阅读全文

关于left / right / stereo / mono

机顶盒是如何处理Left / Right / Stereo / Mono的。

阅读全文

安装卫星天线时计算方位角和仰角

输入:本地经度,本地纬度,卫星经度。

输出:卫星天线的方位角,仰角。 

需要数学库的支持,可调整M_PI的精度。 

 

 

 

  1. void do_calculate(float local_longititude, float local_latitude, float satellite_longititude, float * orientation, float * evaluation)
  2. {
  3.         float   temp1, temp2, ori, eva;
  4.  
  5.         local_longititude        = local_longititude/100.0/180.0*M_PI;
  6.         local_latitude              = local_latitude/100.0/180.0*M_PI;
  7.         satellite_longititude   = satellite_longititude/100.0/180.0*M_PI;
  8.  
  9.         ori = atan(tan(local_longititude - satellite_longititude)/sin(local_latitude))/M_PI*180 + 180.0;
  10.  
  11.         if (ori < 0)
  12.                 *orientation = (INT32)(ori * 100.0 + 360);
  13.         else
  14.                 *orientation = (INT32)(ori * 100.0);
  15.  
  16.         temp1 = cos(local_latitude);
  17.         temp2 = cos(local_longititude - satellite_longititude);
  18.  
  19.         eva = atan((temp1*temp2 - 0.15)/sqrt(1 - (temp1*temp1*temp2*temp2))); // 0.15127
  20.  
  21.         if (eva < 0)
  22.                 *evaluation = (INT32)((eva/M_PI*180 + 360) * 100.0);
  23.         else
  24.                 *evaluation = (INT32)(eva/M_PI*180 * 100.0);
  25. }
  26.