calc_error.c
来自「根据GPS官方网站提供的gps定位方法而编写的C语言gps定位代码」· C语言 代码 · 共 15 行
C
15 行
#include <math.h>#include "gps.h"/* * Allows approximate calculation of ground distance * from known latitude and longitude - the values * MY_LAT and MY_LON in gps.h */calc_error(double lat, double lon , double height) /* these are in degrees */{ double dx = ( MY_LAT - lat) * 111225.0; double dy = ( MY_LON - lon) * 68875.0; double error = sqrt( dx * dx + dy * dy); printf("Pos error = %f\n",error);}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?