double huduzhuanhuan(double x) //度分秒转换弧度
{
double y;
double iD;
double iS, iM;
iD = Math.Floor(x);
iM = Math.Floor((x - iD) * 100);
iS = Math.Round(((x - iD) * 100 - iM) * 100, 4);
y = iD + iM / 60 + iS / 3600;
y = (Math.PI * y) / 180;
return y;
}
double jiaoduzhuanhuan(double x)//弧度转换度分秒
{
double y;
double iD;
double iS, iM;
y = (x * 180) / Math.PI;
iD = Math.Floor(y);
iM = Math.Floor((y - iD) * 60);
iS = Math.Round(((y - iD) * 60 - iM) * 60, 4);
y = iD + iM / 100 + iS / 10000;
return y;
}
{
double y;
double iD;
double iS, iM;
iD = Math.Floor(x);
iM = Math.Floor((x - iD) * 100);
iS = Math.Round(((x - iD) * 100 - iM) * 100, 4);
y = iD + iM / 60 + iS / 3600;
y = (Math.PI * y) / 180;
return y;
}
double jiaoduzhuanhuan(double x)//弧度转换度分秒
{
double y;
double iD;
double iS, iM;
y = (x * 180) / Math.PI;
iD = Math.Floor(y);
iM = Math.Floor((y - iD) * 60);
iS = Math.Round(((y - iD) * 60 - iM) * 60, 4);
y = iD + iM / 100 + iS / 10000;
return y;
}