int main() { initialization("./Sogou2Wgs.txt"); initializeGps2Sogou("./gps-geomap5.txt"); printf("-----------------------------------------------------------------------------------\n"); printf("| %20s | %20s | %15s | %6s | %6s |\n", "Result Geo. ", "Exp Geo.(lng, lat) ", "Error(m) ", "DST(m)", "Pass"); printf("-----------------------------------------------------------------------------------\n"); test(12945920,4838036, 116.3, 40); test(1.2955019478728717E7, 4854493.340584632, 116.38190182005815,40.113740603544244); test(1.2955215777776444E7, 4855249.127650006, 116.3836663456,40.118954345599995); test(1.2911718286479497E7, 4334918.4958437085, 115.9923643456,36.4342783456); test(1.3035199301630903E7, 4295933.870026584, 117.1019833456,36.1509183456); test(1.3051735312838482E7, 4194944.964167472, 117.2502993456,35.411171345599996); test(1.302790298257175E7, 4019163.729176183, 117.0360653456,34.1069853456); test(1.2951339413848642E7, 4845788.30159646, 116.34878, 40.05362); // 清河 // http://tu.sogou.com:1999/api/smap?lng=116.373011684&lat=40.1188770425&x=12951917.0&y=4843339.0 test(12951564, 4841884, 116.35080430938172,40.026668567754236); test(12951781,4842368, 116.35275641218232,40.03001253753806); test(12953170,4803802, 116.36521906042799,39.76315165132224); test(12958204,4806723, 116.41048374835975,39.78344148354328); test(12952357,4842432, 116.35793865632024,40.03046549593787); test(12951756,4842408, 116.35253560650165,40.03028827017125); // 权金城 test(12951987,4843332, 116.3546098059287,40.03667635288874); printf("-----------------------------------------------------------------------------------\n"); testGps(89.100,22.000, 9918674.55299559, 2495374.96035172); testGps(110.12,45.34, 1.2258635709840195e7, 5644526.164490255); testGps(115.48,45.34, 1.2855314672668554E7, 5644526.164490255); // testGps(89.100,22.000, 9918674.55299559, 2495374.96035172); }
int main( int argc, char ** argv ) { if ( argc == 2 ) dataPath = argv[1]; std::cout << "System uses " << ( IS_BIG_ENDIAN ? " B I G " : "little" ); std::cout << " endian byte order." << std::endl; // Test-load each binary config file. testGps( dataPath ); testLog( dataPath ); testSys( dataPath ); return 0; }