#include<iostream>#include<boost/geometry.hpp>usingnamespaceboost::geometry;intmain(){typedefmodel::point<double,2,cs::spherical_equatorial<degree>>degree_point;typedefmodel::point<double,2,cs::spherical_equatorial<radian>>radian_point;degree_pointd(4.893,52.373);radian_pointr(0.041,0.8527);doubledist=distance(d,r);std::cout<<"distance:"<<std::endl<<dist<<" over unit sphere"<<std::endl<<dist*3959<<" over a spherical earth, in miles"<<std::endl;return0;}

Output:

distance:
0.0675272 over unit sphere
267.34 over a spherical earth, in miles