double dectod(string a) //赤纬转化为度
{
string a=" 32d30 -29d55";
string b=a.substr(0.1);
if(b=="-")
{
string c=a.substr(1,2);
double c1=atof(c.c_str());
string d=a.substr(5,2);
double d1=atof(d.c_str());
double d2=(double)d1/60;
return -(c1+d2);
}
else
{
string e=a.substr(0,2);
double e1=atof(e.c_str());
string f=a.substr(3,2);
double f1=atof(f.c_str());
double f2=(double)f1/60;
return e1+f2;
}
{
string a=" 32d30 -29d55";
string b=a.substr(0.1);
if(b=="-")
{
string c=a.substr(1,2);
double c1=atof(c.c_str());
string d=a.substr(5,2);
double d1=atof(d.c_str());
double d2=(double)d1/60;
return -(c1+d2);
}
else
{
string e=a.substr(0,2);
double e1=atof(e.c_str());
string f=a.substr(3,2);
double f1=atof(f.c_str());
double f2=(double)f1/60;
return e1+f2;
}
}
/*string→int atoi()
string→long int atol()
string→doble atof() (双精度值 )*/