GPS数据GPRMC的转换

#include
#include
int main()
{
    double gpslng = 11355.8494;
    double gpslat = 2231.6704;
    double resultlng = 0;
    double resultlat = 0;
    resultlng = (int)(gpslng/100) + (gpslng/100.0 - (int)(gpslng/100)) *100.0 / 60.0;
    resultlat = (int)(gpslat/100) + (gpslat/100.0 - (int)(gpslat/100)) *100.0 / 60.0;
    printf("lng = %lf,lat = %lf\n",resultlng,resultlat);

    return 0;
}

你可能感兴趣的:(嵌入式)