#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";
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)