资源简介
HYPODD双差地震定位程序包,其中包括ph2dt预处理程序
代码片段和文件信息
#ifndef lint
static char rcsid[]=“$Header: /home1/crhet/julian/HYPODD/hypoDD/RCS/atoangle.cv 1.1 2001/02/15 02:21:44 julian Exp $“;
#endif lint
#include
#include
#ifndef NULL
#define NULL 0
#endif NULL
/*
* Convert string of form “degrees[:minutes[:seconds]]“ to angle
* Also useful for times
*/
double
atoangle(p)
const char *p;
{
double sign;
double d m s;
sign = 1.0;
if (*p == ‘+‘)
p++;
if (*p == ‘-‘) {
sign = -1.0;
p++;
}
d = atof(p);
m = s = 0.0;
if ((p = strchr(p ‘:‘)) != NULL) {
m = atof(++p);
if ((p = strchr(p ‘:‘)) != NULL)
s = atof(++p);
}
return sign*(d + (m + s/60.0)/60.0);
}
- 上一篇:广东行政界线
- 下一篇:msp430f5438读取sht30温湿度数据
评论
共有 条评论