计算卫星进站、最高仰角时位置误差计算

#include <stdio.h>
#include <iostream>
#include <vector>
#include <iomanip>
using namespace std;
int main()
{
    std::cout<<"input  satellite axis km = ";
        double      axis =99;
        std::cin>>axis;
        std::cout<<"\n";
        double Re=6378.137;
        double    H = axis  -  Re;
        double  a = 1.0;
        double b = -2.0 *cos(93/180.0*3.1415926)*Re;
        double  c = Re*Re - (axis*axis);

        double x1 = (-1.0*b + sqrt(b*b-4.0*a*c))/(2.0*a);
        double x2 =-1.0*b - sqrt(b*b-4.0*a*c)/(2.0*a);

        double  R;
         if(x1>0)
        {   
            std::cout<<fixed<<setprecision(6)<<" satellite bettwen station , "<< x1 <<"   km\n";
             R = x1;
        }else
      {
             std::cout<<fixed<<setprecision(6)<<" satellite bettwen station ,  "<< x2 <<"   km\n";
              R=x2;
        }

              double  point2 = 2.0 * 3.1415926 * R /360.0  * 0.2;
              double  point6 =  2.0 * 3.1415926 * R /360.0  * 0.6;

              std::cout<<fixed<<setprecision(6)<<"3 degree in station , 0.2 degree  position  limit "<< point2 <<" km\n";
              std::cout<<fixed<<setprecision(6)<<"3 degree in station ,0.6 degree   position  limit "<< point6 <<" km\n";

             double  top2 = 2.0 * 3.1415926 * H /360.0  * 0.2;

             double  top6 = 2.0 * 3.1415926 * H /360.0  * 0.6;

       std::cout<<fixed<<setprecision(6)<<"top degree in station , 0.2 degree  position  limit "<< top2 <<" km\n";
       std::cout<<fixed<<setprecision(6)<<"top degree in station ,0.6 degree   position  limit "<< top6 <<" km\n";


}

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值