Tag: 坐标

在C中重新分配双2D数组

我写了一个函数,它应该为每个输入重新分配数组。 我认为这个function运行良好,但是当我尝试使用数组时,我得到了分段错误。 输入: [1,2] [6,3] [2.5,3.5] 我必须检查用户是否以正确的forms'[‘ number ‘,’ number ‘]’输入输入。 我必须至少有2个条目。 输入的结尾不是新行,而是EOF( CTRL + D或CTRL + Z )。 我的代码: double ** allocation (double ** field, int i) { double x = 0, y = 0; char obr[1], cbr[1], col[1]; while (scanf(“%c%lf%c%lf%c”, &obr, &x, &col, &y, &cbr) == 5) { if (col[0] != ‘,’ || […]

将未知的hex数字转换为经度和纬度

F3 c8 42 14 – latitude //05.13637° should be nearby this coordinate 5d a4 40 b2 – longitude //100.47629° should be nearby this coordinate 这是我从GPS设备获得的hex数据,如何转换为可读坐标? 我没有任何手册文件。请帮助。谢谢 22 00 08 00 c3 80 00 20 00 dc f3 c8 42 14 5d a4 40 b2 74 5d 34 4e 52 30 39 47 30 35 31 […]