#ifndef _STRUCT_H #define _STRUCT_H #include "stdio.h" #include "iostream" #include "iomanip" #include "fstream" #include "string.h" #include "sstream" #include "list" #include "cmath" #define RESET "\033[0m" /* reset */ #define BOLDRED "\033[1m\033[31m" /* Bold Red */ #define INTERVAL "-i" #define HL "-I" #define REFER "-r" #define OUTMSH "-o" #define MAGNIFY "-m" #define Pi (4.0*atan(1.0)) #define WGS84_PoleRadius 6356752.3//WGS84椭球极半径 #define WGS84_EquatorRadius 6378137//WGS84椭球长半径 #define EarthRadius 6371008.8 using namespace std; struct posi { int id; double x,y,z; double alti; }; typedef list PosiList; //计算一个参考椭球或者参考球在纬度位置的半径 double refRadius(double lati,double refr,double refR) { return refr*refR/sqrt(pow(refr,2)*pow(cos((double) lati*Pi/180.0),2)+pow(refR,2)*pow(sin((double) lati*Pi/180.0),2)); } #endif