1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044
|
'\" t
.\" Title: gpsd_json
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
.\" Date: 28 Aug 2011
.\" Manual: GPSD Documentation
.\" Source: The GPSD Project
.\" Language: English
.\"
.TH "GPSD_JSON" "5" "28 Aug 2011" "The GPSD Project" "GPSD Documentation"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
gpsd_json \- gpsd request/response protol
.SH "OVERVIEW"
.PP
gpsd
is a service daemon that can be used to monitor GPSes, DGPS receivers, Marine AIS broadcasts, and various other location\-related and kinematic sensors\&.
.PP
Clients may communicate with
gpsd
via textual requests and responses over a socket\&. It is a bad idea for applications to speak the protocol directly: rather, they should use the
libgps
client library (for C; bindings also exist for other languages) and take appropriate care to conditionalize their code on the major and minor protocol version symbols\&.
.PP
The GPSD protocol is built on top of JSON, JavaScript Object Notation\&. GPSD\*(Aqs use of JSON is restricted in some ways that make parsing it in fixed\-extent languages (such as C) easier\&.
.PP
A request line is introduced by "?" and may include multiple commands\&. Commands begin with a command identifier, followed either by a terminating \*(Aq;\*(Aq or by an equal sign "=" and a JSON object treated as an argument\&. Any \*(Aq;\*(Aq or newline indication (either LF or CR\-LF) after the end of a command is ignored\&. All request lines must be composed of US\-ASCII characters and may be no more than 80 characters in length, exclusive of the trailing newline\&.
.PP
Responses are JSON objects all of which have a "class" attribute the value of which is either the name of the invoking command\&. There are reports (including but not limited to as "TPV", "SKY", "DEVICE", and "ERROR") which are not direct responses to commands\&.
.PP
The order of JSON attributes within a response object is never significant, and you may specify attributes in commands in any order\&. Responses never contain the special JSON value null; instead, attributes with empty or undefined values are omitted\&. The length limit for responses and reports is 1536 characters, including trailing newline; longer responses will be truncated, so client code must be prepared for the possibility of invalid JSON fragments\&.
.PP
In JSON reports, if an attribute is present only if the parent attribute is present or has a particular range, then the parent attribute is emitted first\&.
.PP
There is one constraint on the order in which attributes will be omitted\&. If an optional attribute is present only when a parent attribute has a specified value or range of values, the parent attribute will be emitted first to make parsing easier\&.
.PP
The next subsection section documents the core GPSD protocol\&. Extensions are documented in the following subsections\&. The extensions may not be supported in your
gpsd
instance if it has been compiled with a restricted feature set\&.
.SH "CORE SOCKET PROTOCOL"
.PP
Here are the core\-protocol responses:
.PP
TPV
.RS 4
A TPV object is a time\-position\-velocity report\&. The "class" and "mode" fields will reliably be present\&. The "mode" field will be emitted before optional fields that may be absent when there is no fix\&. Error estimates will be emitted after the fix components they\*(Aqre associated with\&. Others may be reported or not depending on the fix quality\&.
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.B Table\ \&1.\ \&TPV object
.TS
allbox tab(:);
lB lB lB lB.
T{
Name
T}:T{
Always?
T}:T{
Type
T}:T{
Description
T}
.T&
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l.
T{
class
T}:T{
Yes
T}:T{
string
T}:T{
Fixed: "TPV"
T}
T{
tag
T}:T{
No
T}:T{
string
T}:T{
Type tag associated with this GPS sentence; from an NMEA
device this is just the NMEA sentence type\&.
T}
T{
device
T}:T{
No
T}:T{
string
T}:T{
Name of originating device\&.
T}
T{
mode
T}:T{
Yes
T}:T{
numeric
T}:T{
NMEA mode: %d, 0=no mode value yet seen, 1=no fix, 2=2D, 3=3D\&.
T}
T{
time
T}:T{
No
T}:T{
string
T}:T{
Time/date stamp in ISO8601 format, UTC\&. May have a
fractional part of up to \&.001sec precision\&. May be absent if mode
is not 2 or 3\&.
T}
T{
ept
T}:T{
No
T}:T{
numeric
T}:T{
Estimated timestamp error (%f, seconds, 95% confidence)\&.
Present if time is present\&.
T}
T{
lat
T}:T{
No
T}:T{
numeric
T}:T{
Latitude in degrees: +/\- signifies North/South\&. Present
when mode is 2 or 3\&.
T}
T{
lon
T}:T{
No
T}:T{
numeric
T}:T{
Longitude in degrees: +/\- signifies East/West\&. Present
when mode is 2 or 3\&.
T}
T{
alt
T}:T{
No
T}:T{
numeric
T}:T{
Altitude in meters\&. Present if mode is 3\&.
T}
T{
epx
T}:T{
No
T}:T{
numeric
T}:T{
Longitude error estimate in meters, 95% confidence\&. Present
if mode is 2 or 3 and DOPs can be calculated from the satellite
view\&.
T}
T{
epy
T}:T{
No
T}:T{
numeric
T}:T{
Latitude error estimate in meters, 95% confidence\&. Present
if mode is 2 or 3 and DOPs can be calculated from the satellite
view\&.
T}
T{
epv
T}:T{
No
T}:T{
numeric
T}:T{
Estimated vertical error in meters, 95% confidence\&. Present
if mode is 3 and DOPs can be calculated from the satellite
view\&.
T}
T{
track
T}:T{
No
T}:T{
numeric
T}:T{
Course over ground, degrees from true north\&.
T}
T{
speed
T}:T{
No
T}:T{
numeric
T}:T{
Speed over ground, meters per second\&.
T}
T{
climb
T}:T{
No
T}:T{
numeric
T}:T{
Climb (positive) or sink (negative) rate, meters per
second\&.
T}
T{
epd
T}:T{
No
T}:T{
numeric
T}:T{
Direction error estimate in degrees, 95% confidence\&.
T}
T{
eps
T}:T{
No
T}:T{
numeric
T}:T{
Speed error estinmate in meters/sec, 95% confidence\&.
T}
T{
epc
T}:T{
No
T}:T{
numeric
T}:T{
Climb/sink error estimate in meters/sec, 95% confidence\&.
T}
.TE
.sp 1
When the C client library parses a response of this kind, it will assert validity bits in the top\-level set member for each field actually received; see gps\&.h for bitmask names and values\&.
.sp
Here\*(Aqs an example:
.sp
.if n \{\
.RS 4
.\}
.nf
{"class":"TPV","tag":"MID2","device":"/dev/pts/1",
"time":"2005\-06\-08T10:34:48\&.283Z","ept":0\&.005,
"lat":46\&.498293369,"lon":7\&.567411672,"alt":1343\&.127,
"eph":36\&.000,"epv":32\&.321,
"track":10\&.3788,"speed":0\&.091,"climb":\-0\&.085,"mode":3}
.fi
.if n \{\
.RE
.\}
.RE
.PP
SKY
.RS 4
A SKY object reports a sky view of the GPS satellite positions\&. If there is no GPS device available, or no skyview has been reported yet, only the "class" field will reliably be present\&.
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.B Table\ \&2.\ \&SKY object
.TS
allbox tab(:);
lB lB lB lB.
T{
Name
T}:T{
Always?
T}:T{
Type
T}:T{
Description
T}
.T&
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l.
T{
class
T}:T{
Yes
T}:T{
string
T}:T{
Fixed: "SKY"
T}
T{
tag
T}:T{
No
T}:T{
string
T}:T{
Type tag associated with this GPS sentence; from an NMEA
device this is just the NMEA sentence type\&.
T}
T{
device
T}:T{
No
T}:T{
string
T}:T{
Name of originating device
T}
T{
time
T}:T{
No
T}:T{
numeric
T}:T{
Time/date stamp in ISO8601 format, UTC\&. May have a
fractional part of up to \&.001sec precision\&.
T}
T{
xdop
T}:T{
No
T}:T{
numeric
T}:T{
Longitudinal dilution of precision, a dimensionless
factor which should be multiplied by a base UERE to get an
error estimate\&.
T}
T{
ydop
T}:T{
No
T}:T{
numeric
T}:T{
Latitudinal dilution of precision, a dimensionless
factor which should be multiplied by a base UERE to get an
error estimate\&.
T}
T{
vdop
T}:T{
No
T}:T{
numeric
T}:T{
Altitude dilution of precision, a dimensionless
factor which should be multiplied by a base UERE to get an
error estimate\&.
T}
T{
tdop
T}:T{
No
T}:T{
numeric
T}:T{
Time dilution of precision, a dimensionless
factor which should be multiplied by a base UERE to get an
error estimate\&.
T}
T{
hdop
T}:T{
No
T}:T{
numeric
T}:T{
Horizontal dilution of precision, a dimensionless
factor which should be multiplied by a base UERE to get a
circular error estimate\&.
T}
T{
pdop
T}:T{
No
T}:T{
numeric
T}:T{
Spherical dilution of precision, a dimensionless
factor which should be multiplied by a base UERE to get an
error estimate\&.
T}
T{
gdop
T}:T{
No
T}:T{
numeric
T}:T{
Hyperspherical dilution of precision, a dimensionless
factor which should be multiplied by a base UERE to get an
error estimate\&.
T}
T{
satellites
T}:T{
Yes
T}:T{
list
T}:T{
List of satellite objects in skyview
T}
.TE
.sp 1
Many devices compute dilution of precision factors but do not include them in their reports\&. Many that do report DOPs report only HDOP, two\-dimensional circular error\&.
gpsd
always passes through whatever the device actually reports, then attempts to fill in other DOPs by calculating the appropriate determinants in a covariance matrix based on the satellite view\&. DOPs may be missing if some of these determinants are singular\&. It can even happen that the device reports an error estimate in meters when the corresponding DOP is unavailable; some devices use more sophisticated error modeling than the covariance calculation\&.
.sp
The satellite list objects have the following elements:
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.B Table\ \&3.\ \&Satellite object
.TS
allbox tab(:);
lB lB lB lB.
T{
Name
T}:T{
Always?
T}:T{
Type
T}:T{
Description
T}
.T&
l l l l
l l l l
l l l l
l l l l
l l l l.
T{
PRN
T}:T{
Yes
T}:T{
numeric
T}:T{
PRN ID of the satellite\&. 1\-63 are GNSS satellites,
64\-96 are GLONASS satellites, 100\-164 are SBAS satellites
T}
T{
az
T}:T{
Yes
T}:T{
numeric
T}:T{
Azimuth, degrees from true north\&.
T}
T{
el
T}:T{
Yes
T}:T{
numeric
T}:T{
Elevation in degrees\&.
T}
T{
ss
T}:T{
Yes
T}:T{
numeric
T}:T{
Signal strength in dB\&.
T}
T{
used
T}:T{
Yes
T}:T{
boolean
T}:T{
Used in current solution? (SBAS/WAAS/EGNOS satellites
may be flagged used if the solution has corrections from them,
but not all drivers make this information available\&.)
T}
.TE
.sp 1
Note that satellite objects do not have a "class" field, as they are never shipped outside of a SKY object\&.
.sp
When the C client library parses a SKY response, it will assert the SATELLITE_SET bit in the top\-level set member\&.
.sp
Here\*(Aqs an example:
.sp
.if n \{\
.RS 4
.\}
.nf
{"class":"SKY","tag":"MID2","device":"/dev/pts/1",
"time":"2005\-07\-08T11:28:07\&.114Z",
"xdop":1\&.55,"hdop":1\&.24,"pdop":1\&.99,
"satellites":[
{"PRN":23,"el":6,"az":84,"ss":0,"used":false},
{"PRN":28,"el":7,"az":160,"ss":0,"used":false},
{"PRN":8,"el":66,"az":189,"ss":44,"used":true},
{"PRN":29,"el":13,"az":273,"ss":0,"used":false},
{"PRN":10,"el":51,"az":304,"ss":29,"used":true},
{"PRN":4,"el":15,"az":199,"ss":36,"used":true},
{"PRN":2,"el":34,"az":241,"ss":43,"used":true},
{"PRN":27,"el":71,"az":76,"ss":43,"used":true}]}
.fi
.if n \{\
.RE
.\}
.RE
.PP
GST
.RS 4
A GST object is a pseudorange noise report\&.
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.B Table\ \&4.\ \&GST object
.TS
allbox tab(:);
lB lB lB lB.
T{
Name
T}:T{
Always?
T}:T{
Type
T}:T{
Description
T}
.T&
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l.
T{
class
T}:T{
Yes
T}:T{
string
T}:T{
Fixed: "GST"
T}
T{
tag
T}:T{
No
T}:T{
string
T}:T{
Type tag associated with this GPS sentence; from an NMEA
device this is just the NMEA sentence type\&.
T}
T{
device
T}:T{
No
T}:T{
string
T}:T{
Name of originating device
T}
T{
time
T}:T{
No
T}:T{
numeric
T}:T{
Seconds since the Unix epoch, UTC\&. May have a
fractional part of up to \&.001sec precision\&.
T}
T{
rms
T}:T{
No
T}:T{
numeric
T}:T{
Value of the standard deviation of the range inputs to the
navigation process (range inputs include pseudoranges and DGPS
corrections)\&.
T}
T{
major
T}:T{
No
T}:T{
numeric
T}:T{
Standard deviation of semi\-major axis of error ellipse, in meters\&.
T}
T{
minor
T}:T{
No
T}:T{
numeric
T}:T{
Standard deviation of semi\-minor axis of error ellipse, in meters\&.
T}
T{
orient
T}:T{
No
T}:T{
numeric
T}:T{
Orientation of semi\-major axis of error ellipse, in degrees from true north\&.
T}
T{
lat
T}:T{
No
T}:T{
numeric
T}:T{
Standard deviation of latitude error, in meters\&.
T}
T{
lon
T}:T{
No
T}:T{
numeric
T}:T{
Standard deviation of longitude error, in meters\&.
T}
T{
alt
T}:T{
No
T}:T{
numeric
T}:T{
Standard deviation of altitude error, in meters\&.
T}
.TE
.sp 1
Here\*(Aqs an example:
.sp
.if n \{\
.RS 4
.\}
.nf
{"class":"GST","tag":"GST","device":"/dev/ttyUSB0",
"time":"2010\-12\-07T10:23:07\&.096Z","rms":2\&.440,
"major":1\&.660,"minor":1\&.120,"orient":68\&.989,
"lat":1\&.600,"lon":1\&.200,"alt":2\&.520}
.fi
.if n \{\
.RE
.\}
.RE
.PP
ATT
.RS 4
An ATT object is a vehicle\-attitude report\&. It is returned by digital\-compass and gyroscope sensors; depending on device, it may include: heading, pitch, roll, yaw, gyroscope, and magnetic\-field readings\&. Because such sensors are often bundled as part of marine\-navigation systems, the ATT response may also include water depth\&.
.sp
The "class", "mode", and "tag" fields will reliably be present\&. Others may be reported or not depending on the specific device type\&.
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.B Table\ \&5.\ \&ATT object
.TS
allbox tab(:);
lB lB lB lB.
T{
Name
T}:T{
Always?
T}:T{
Type
T}:T{
Description
T}
.T&
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l.
T{
class
T}:T{
Yes
T}:T{
string
T}:T{
Fixed: "ATT"
T}
T{
tag
T}:T{
Yes
T}:T{
string
T}:T{
Type tag associated with this GPS sentence; from an NMEA
device this is just the NMEA sentence type\&.
T}
T{
device
T}:T{
Yes
T}:T{
string
T}:T{
Name of originating device
T}
T{
time
T}:T{
Yes
T}:T{
numeric
T}:T{
Seconds since the Unix epoch, UTC\&. May have a
fractional part of up to \&.001sec precision\&.
T}
T{
heading
T}:T{
No
T}:T{
numeric
T}:T{
Heading, degrees from true north\&.
T}
T{
mag_st
T}:T{
No
T}:T{
string
T}:T{
Magnetometer status\&.
T}
T{
pitch
T}:T{
No
T}:T{
numeric
T}:T{
Pitch in degrees\&.
T}
T{
pitch_st
T}:T{
No
T}:T{
string
T}:T{
Pitch sensor status\&.
T}
T{
yaw
T}:T{
No
T}:T{
numeric
T}:T{
Yaw in degrees
T}
T{
yaw_st
T}:T{
No
T}:T{
string
T}:T{
Yaw sensor status\&.
T}
T{
roll
T}:T{
No
T}:T{
numeric
T}:T{
Roll in degrees\&.
T}
T{
roll_st
T}:T{
No
T}:T{
string
T}:T{
Roll sensor status\&.
T}
T{
dip
T}:T{
No
T}:T{
numeric
T}:T{
Local magnetic inclination, degrees, positive when the magnetic
field points downward (into the Earth)\&.
T}
T{
mag_len
T}:T{
No
T}:T{
numeric
T}:T{
Scalar magnetic field strength\&.
T}
T{
mag_x
T}:T{
No
T}:T{
numeric
T}:T{
X component of magnetic field strength\&.
T}
T{
mag_y
T}:T{
No
T}:T{
numeric
T}:T{
Y component of magnetic field strength\&.
T}
T{
mag_z
T}:T{
No
T}:T{
numeric
T}:T{
Z component of magnetic field strength\&.
T}
T{
acc_len
T}:T{
No
T}:T{
numeric
T}:T{
Scalar acceleration\&.
T}
T{
acc_x
T}:T{
No
T}:T{
numeric
T}:T{
X component of acceleration\&.
T}
T{
acc_y
T}:T{
No
T}:T{
numeric
T}:T{
Y component of acceleration\&.
T}
T{
acc_z
T}:T{
No
T}:T{
numeric
T}:T{
Z component of acceleration\&.
T}
T{
gyro_x
T}:T{
No
T}:T{
numeric
T}:T{
X component of acceleration\&.
T}
T{
gyro_y
T}:T{
No
T}:T{
numeric
T}:T{
Y component of acceleration\&.
T}
T{
depth
T}:T{
No
T}:T{
numeric
T}:T{
Water depth in meters\&.
T}
T{
temperature
T}:T{
No
T}:T{
numeric
T}:T{
Temperature at sensor, degrees centigrade\&.
T}
.TE
.sp 1
The heading, pitch, and roll status codes (if present) vary by device\&. For the TNT Revolution digital compasses, they are coded as follows:
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.B Table\ \&6.\ \&Device flags
.TS
allbox tab(:);
lB lB.
T{
Code
T}:T{
Description
T}
.T&
l l
l l
l l
l l
l l
l l
l l.
T{
C
T}:T{
magnetometer calibration alarm
T}
T{
L
T}:T{
low alarm
T}
T{
M
T}:T{
low warning
T}
T{
N
T}:T{
normal
T}
T{
O
T}:T{
high warning
T}
T{
P
T}:T{
high alarm
T}
T{
V
T}:T{
magnetometer voltage level alarm
T}
.TE
.sp 1
When the C client library parses a response of this kind, it will assert ATT_IS\&.
.sp
Here\*(Aqs an example:
.sp
.if n \{\
.RS 4
.\}
.nf
{"class":"ATT","tag":"PTNTHTM","time":1270938096\&.843,
"heading":14223\&.00,"mag_st":"N",
"pitch":169\&.00,"pitch_st":"N", "roll":\-43\&.00,"roll_st":"N",
"dip":13641\&.000,"mag_x":2454\&.000}
.fi
.if n \{\
.RE
.\}
.RE
.PP
And here are the commands:
.PP
?VERSION;
.RS 4
Returns an object with the following attributes:
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.B Table\ \&7.\ \&VERSION object
.TS
allbox tab(:);
lB lB lB lB.
T{
Name
T}:T{
Always?
T}:T{
Type
T}:T{
Description
T}
.T&
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l.
T{
class
T}:T{
Yes
T}:T{
string
T}:T{
Fixed: "VERSION"
T}
T{
release
T}:T{
Yes
T}:T{
string
T}:T{
Public release level
T}
T{
rev
T}:T{
Yes
T}:T{
string
T}:T{
Internal revision\-control level\&.
T}
T{
proto_major
T}:T{
Yes
T}:T{
numeric
T}:T{
API major revision level\&.
T}
T{
proto_minor
T}:T{
Yes
T}:T{
numeric
T}:T{
API minor revision level\&.
T}
T{
remote
T}:T{
No
T}:T{
string
T}:T{
URL of the remote daemon reporting this version\&. If
empty, this is the version of the local daemon\&.
T}
.TE
.sp 1
The daemon ships a VERSION response to each client when the client first connects to it\&.
.sp
When the C client library parses a response of this kind, it will assert the VERSION_SET bit in the top\-level set member\&.
.sp
Here\*(Aqs an example:
.sp
.if n \{\
.RS 4
.\}
.nf
{"class":"VERSION","version":"2\&.40dev",
"rev":"06f62e14eae9886cde907dae61c124c53eb1101f",
"proto_major":3,"proto_minor":1
}
.fi
.if n \{\
.RE
.\}
.RE
.PP
?DEVICES;
.RS 4
Returns a device list object with the following elements:
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.B Table\ \&8.\ \&DEVICES object
.TS
allbox tab(:);
lB lB lB lB.
T{
Name
T}:T{
Always?
T}:T{
Type
T}:T{
Description
T}
.T&
l l l l
l l l l
l l l l.
T{
class
T}:T{
Yes
T}:T{
string
T}:T{
Fixed: "DEVICES"
T}
T{
devices
T}:T{
Yes
T}:T{
list
T}:T{
List of device descriptions
T}
T{
remote
T}:T{
No
T}:T{
string
T}:T{
URL of the remote daemon reporting the device set\&. If
empty, this is a DEVICES response from the local daemon\&.
T}
.TE
.sp 1
When the C client library parses a response of this kind, it will assert the DEVICELIST_SET bit in the top\-level set member\&.
.sp
Here\*(Aqs an example:
.sp
.if n \{\
.RS 4
.\}
.nf
{"class"="DEVICES","devices":[
{"class":"DEVICE","path":"/dev/pts/1","flags":1,"driver":"SiRF binary"},
{"class":"DEVICE","path":"/dev/pts/3","flags":4,"driver":"AIVDM"}]}
.fi
.if n \{\
.RE
.\}
.sp
The daemon occasionally ships a bare DEVICE object to the client (that is, one not inside a DEVICES wrapper)\&. The data content of these objects will be described later as a response to the ?DEVICE command\&.
.RE
.PP
?WATCH;
.RS 4
This command sets watcher mode\&. It also sets or elicits a report of per\-subscriber policy and the raw bit\&. An argument WATCH object changes the subscriber\*(Aqs policy\&. The response describes the subscriber\*(Aqs policy\&. The response will also include a DEVICES object\&.
.sp
A WATCH object has the following elements:
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.B Table\ \&9.\ \&WATCH object
.TS
allbox tab(:);
lB lB lB lB.
T{
Name
T}:T{
Always?
T}:T{
Type
T}:T{
Description
T}
.T&
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l.
T{
class
T}:T{
Yes
T}:T{
string
T}:T{
Fixed: "WATCH"
T}
T{
enable
T}:T{
No
T}:T{
boolean
T}:T{
Enable (true) or disable (false) watcher mode\&. Default
is true\&.
T}
T{
json
T}:T{
No
T}:T{
boolean
T}:T{
Enable (true) or disable (false) dumping of JSON reports\&.
Default is false\&.
T}
T{
nmea
T}:T{
No
T}:T{
boolean
T}:T{
Enable (true) or disable (false) dumping of binary
packets as pseudo\-NMEA\&. Default
is false\&.
T}
T{
raw
T}:T{
No
T}:T{
integer
T}:T{
Controls \*(Aqraw\*(Aq mode\&. When this attribute is set to 1
for a channel, gpsd reports the
unprocessed NMEA or AIVDM data stream from whatever device is attached\&.
Binary GPS packets are hex\-dumped\&. RTCM2 and RTCM3
packets are not dumped in raw mode\&. When this attribute is set to
2 for a channel that processes binary data,
gpsd reports the received data verbatim
without hex\-dumping\&.
T}
T{
scaled
T}:T{
No
T}:T{
boolean
T}:T{
If true, apply scaling divisors to output before
dumping; default is false\&.
T}
T{
split24
T}:T{
No
T}:T{
boolean
T}:T{
If true, aggregate AIS type24 sentence parts\&. If false,
report each part as a separate JSON object, leaving the
client to match MMSIs and aggregate\&. Default is
false\&. Applies only to AIS reports\&.
T}
T{
pps
T}:T{
No
T}:T{
boolean
T}:T{
If true, emit a PPS JSON message when the device issues
1PPS\&. Intended to be used with the "nmea" and "raw" modes\&.
Default is false\&. \fBNote: this is an
unstable experimental feature which may change or be removed
without notice\&.\fR
T}
T{
device
T}:T{
No
T}:T{
string
T}:T{
If present, enable watching only of the specified device
rather than all devices\&. Useful with raw and NMEA modes
in which device responses aren\*(Aqt tagged\&. Has no effect when
used with enable:false\&.
T}
T{
remote
T}:T{
No
T}:T{
string
T}:T{
URL of the remote daemon reporting the watch set\&. If
empty, this is a WATCH response from the local daemon\&.
T}
.TE
.sp 1
There is an additional boolean "timing" attribute which is undocumented because that portion of the interface is considered unstable and for developer use only\&.
.sp
In watcher mode, GPS reports are dumped as TPV and SKY responses\&. AIS, Subframe and RTCM reporting is described in the next section\&.
.sp
When the C client library parses a response of this kind, it will assert the POLICY_SET bit in the top\-level set member\&.
.sp
Here\*(Aqs an example:
.sp
.if n \{\
.RS 4
.\}
.nf
{"class":"WATCH", "raw":1,"scaled":true}
.fi
.if n \{\
.RE
.\}
.RE
.PP
?POLL;
.RS 4
The POLL command requests data from the last\-seen fixes on all active GPS devices\&. Devices must previously have been activated by ?WATCH to be pollable\&.
.sp
Polling can lead to possibly surprising results when it is used on a device such as an NMEA GPS for which a complete fix has to be accumulated from several sentences\&. If you poll while those sentences are being emitted, the response will contain the last complete fix data and may be as much as one cycle time (typically 1 second) stale\&.
.sp
The POLL response will contain a timestamped list of TPV objects describing cached data, and a timestamped list of SKY objects describing satellite configuration\&. If a device has not seen fixes, it will be reported with a mode field of zero\&.
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.B Table\ \&10.\ \&POLL object
.TS
allbox tab(:);
lB lB lB lB.
T{
Name
T}:T{
Always?
T}:T{
Type
T}:T{
Description
T}
.T&
l l l l
l l l l
l l l l
l l l l
l l l l.
T{
class
T}:T{
Yes
T}:T{
string
T}:T{
Fixed: "POLL"
T}
T{
time
T}:T{
Yes
T}:T{
Numeric
T}:T{
Timestamp in ISO 8601 format\&. May have a
fractional part of up to \&.001sec precision\&.
T}
T{
active
T}:T{
Yes
T}:T{
Numeric
T}:T{
Count of active devices\&.
T}
T{
fixes
T}:T{
Yes
T}:T{
JSON array
T}:T{
Comma\-separated list of TPV objects\&.
T}
T{
skyviews
T}:T{
Yes
T}:T{
JSON array
T}:T{
Comma\-separated list of SKY objects\&.
T}
.TE
.sp 1
Here\*(Aqs an example of a POLL response:
.sp
.if n \{\
.RS 4
.\}
.nf
{"class":"POLL","time":"2010\-06\-04T10:31:00\&.289Z","active":1,
"tpv":[{"class":"TPV","tag":"MID41","device":"/dev/ttyUSB0",
"time":"2010\-09\-08T13:33:06\&.095Z",
"ept":0\&.005,"lat":40\&.035093060,
"lon":\-75\&.519748733,"track":99\&.4319,"speed":0\&.123,"mode":2}],
"sky":[{"class":"SKY","tag":"MID41","device":"/dev/ttyUSB0",
"time":1270517264\&.240,"hdop":9\&.20,
"satellites":[{"PRN":16,"el":55,"az":42,"ss":36,"used":true},
{"PRN":19,"el":25,"az":177,"ss":0,"used":false},
{"PRN":7,"el":13,"az":295,"ss":0,"used":false},
{"PRN":6,"el":56,"az":135,"ss":32,"used":true},
{"PRN":13,"el":47,"az":304,"ss":0,"used":false},
{"PRN":23,"el":66,"az":259,"ss":0,"used":false},
{"PRN":20,"el":7,"az":226,"ss":0,"used":false},
{"PRN":3,"el":52,"az":163,"ss":32,"used":true},
{"PRN":31,"el":16,"az":102,"ss":0,"used":false}
]}]}
.fi
.if n \{\
.RE
.\}
.if n \{\
.sp
.\}
.RS 4
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBNote\fR
.ps -1
.br
Client software should not assume the field inventory of the POLL response is fixed for all time\&. As
gpsd
collects and caches more data from more sensor types, those data are likely to find their way into this response\&.
.sp .5v
.RE
.RE
.PP
PPS
.RS 4
This message is emitted each time the daemon sees a PPS (Pulse Per Second) strobe from a device\&.
.sp
A PPS object has the following elements:
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.B Table\ \&11.\ \&PPS object
.TS
allbox tab(:);
lB lB lB lB.
T{
Name
T}:T{
Always?
T}:T{
Type
T}:T{
Description
T}
.T&
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l.
T{
class
T}:T{
Yes
T}:T{
string
T}:T{
Fixed: "PPS"
T}
T{
device
T}:T{
Yes
T}:T{
string
T}:T{
Name of originating device
T}
T{
real_sec
T}:T{
Yes
T}:T{
numeric
T}:T{
seconds from the realtime clock
T}
T{
real_nsec
T}:T{
Yes
T}:T{
numeric
T}:T{
nanoseconds from the realtime clock
T}
T{
clock_sec
T}:T{
Yes
T}:T{
numeric
T}:T{
seconds from the system clock
T}
T{
clock_nsec
T}:T{
Yes
T}:T{
numeric
T}:T{
nanoseconds from the system clock
T}
.TE
.sp 1
This message is emitted once per second to watchers of a device emitting PPS, and is intended to report the drift between the start of the GPS second and seconds as reported by the system clock (which may be NTP\-corrected)\&.
.sp
The message contains second/microsecond pairs for two clocks; the realtime clock without NTP correction (the result of clock_gettime(CLOCK_REALTIME), but only to microsecond precision) and the ordinary system clock (which may be NTP corrected)\&.
.sp
There are various sources of error in the reported clock times\&. For PPS delivered via a real serial\-line strobe, serial\-interrupt latency plus processing time to the timer call should be bounded above by about 10 microseconds; USB\-to\-serial control\-line emulation is known to add jitter of about 50 microseconds\&. (Both figures are for GPSD running in non\-realtime mode on an x86 with a gigahertz clock and are estimates based on measured latency in other applications)
.sp
Here\*(Aqs an example:
.sp
.if n \{\
.RS 4
.\}
.nf
{"class":"PPS","device":"/dev/ttyUSB0",
"real_sec":1330212592, "real_nsec":343182,
"clock_sec":1330212592,"clock_nsec":343184}
.fi
.if n \{\
.RE
.\}
.RE
.PP
?DEVICE
.RS 4
This command reports (when followed by \*(Aq;\*(Aq) the state of a device, or sets (when followed by \*(Aq=\*(Aq and a DEVICE object) device\-specific control bits, notably the device\*(Aqs speed and serial mode and the native\-mode bit\&. The parameter\-setting form will be rejected if more than one client is attached to the channel\&.
.sp
Pay attention to the response, because it is possible for this command to fail if the GPS does not support a speed\-switching command or only supports some combinations of serial modes\&. In case of failure, the daemon and GPS will continue to communicate at the old speed\&.
.sp
Use the parameter\-setting form with caution\&. On USB and Bluetooth GPSes it is also possible for serial mode setting to fail either because the serial adaptor chip does not support non\-8N1 modes or because the device firmware does not properly synchronize the serial adaptor chip with the UART on the GPS chipset when the speed changes\&. These failures can hang your device, possibly requiring a GPS power cycle or (in extreme cases) physically disconnecting the NVRAM backup battery\&.
.sp
A DEVICE object has the following elements:
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.B Table\ \&12.\ \&CONFIGCHAN object
.TS
allbox tab(:);
lB lB lB lB.
T{
Name
T}:T{
Always?
T}:T{
Type
T}:T{
Description
T}
.T&
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l
l l l l.
T{
class
T}:T{
Yes
T}:T{
string
T}:T{
Fixed: "DEVICE"
T}
T{
path
T}:T{
No
T}:T{
string
T}:T{
Name the device for which the control bits are
being reported, or for which they are to be applied\&. This
attribute may be omitted only when there is exactly one
subscribed channel\&.
T}
T{
activated
T}:T{
No
T}:T{
string
T}:T{
Time the device was activated as an ISO8601
timestamp\&. If the device is inactive this attribute is
absent\&.
T}
T{
flags
T}:T{
No
T}:T{
integer
T}:T{
Bit vector of property flags\&. Currently defined flags are:
describe packet types seen so far (GPS, RTCM2, RTCM3,
AIS)\&. Won\*(Aqt be reported if empty, e\&.g\&. before
gpsd has seen identifiable packets
from the device\&.
T}
T{
driver
T}:T{
No
T}:T{
string
T}:T{
GPSD\*(Aqs name for the device driver type\&. Won\*(Aqt be reported before
gpsd has seen identifiable packets
from the device\&.
T}
T{
subtype
T}:T{
When the daemon sees a delayed response to a probe for
subtype or firmware\-version information\&.
T}:T{
string
T}:T{
Whatever version information the device returned\&.
T}
T{
bps
T}:T{
No
T}:T{
integer
T}:T{
Device speed in bits per second\&.
T}
T{
parity
T}:T{
Yes
T}:T{
string
T}:T{
N, O or E for no parity, odd, or even\&.
T}
T{
stopbits
T}:T{
Yes
T}:T{
string
T}:T{
Stop bits (1 or 2)\&.
T}
T{
native
T}:T{
No
T}:T{
integer
T}:T{
0 means NMEA mode and 1 means
alternate mode (binary if it has one, for SiRF and Evermore chipsets
in particular)\&. Attempting to set this mode on a non\-GPS
device will yield an error\&.
T}
T{
cycle
T}:T{
No
T}:T{
real
T}:T{
Device cycle time in seconds\&.
T}
T{
mincycle
T}:T{
No
T}:T{
real
T}:T{
Device minimum cycle time in seconds\&. Reported from
?CONFIGDEV when (and only when) the rate is switchable\&. It is
read\-only and not settable\&.
T}
.TE
.sp 1
The serial parameters will be omitted in a response describing a TCP/IP source such as an Ntrip, DGPSIP, or AIS feed\&.
.sp
The contents of the flags field should be interpreted as follows:
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.B Table\ \&13.\ \&Device flags
.TS
allbox tab(:);
lB lB lB.
T{
C #define
T}:T{
Value
T}:T{
Description
T}
.T&
l l l
l l l
l l l
l l l.
T{
SEEN_GPS
T}:T{
0x01
T}:T{
GPS data has been seen on this device
T}
T{
SEEN_RTCM2
T}:T{
0x02
T}:T{
RTCM2 data has been seen on this device
T}
T{
SEEN_RTCM3
T}:T{
0x04
T}:T{
RTCM3 data has been seen on this device
T}
T{
SEEN_AIS
T}:T{
0x08
T}:T{
AIS data has been seen on this device
T}
.TE
.sp 1
When the C client library parses a response of this kind, it will assert the DEVICE_SET bit in the top\-level set member\&.
.sp
Here\*(Aqs an example:
.sp
.if n \{\
.RS 4
.\}
.nf
{"class":"DEVICE","bps":4800,"parity":"N","stopbits":1,"native":0}
.fi
.if n \{\
.RE
.\}
.RE
.PP
When a client is in watcher mode, the daemon will ship it DEVICE notifications when a device is added to the pool or deactivated\&.
.PP
When the C client library parses a response of this kind, it will assert the DEVICE_SET bit in the top\-level set member\&.
.PP
Here\*(Aqs an example:
.sp
.if n \{\
.RS 4
.\}
.nf
{"class":"DEVICE","path":"/dev/pts1","activated":0}
.fi
.if n \{\
.RE
.\}
.PP
The daemon may ship an error object in response to a syntactically invalid command line or unknown command\&. It has the following elements:
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.B Table\ \&14.\ \&ERROR notification object
.TS
allbox tab(:);
lB lB lB lB.
T{
Name
T}:T{
Always?
T}:T{
Type
T}:T{
Description
T}
.T&
l l l l
l l l l.
T{
class
T}:T{
Yes
T}:T{
string
T}:T{
Fixed: "ERROR"
T}
T{
message
T}:T{
Yes
T}:T{
string
T}:T{
Textual error message
T}
.TE
.sp 1
.PP
Here\*(Aqs an example:
.sp
.if n \{\
.RS 4
.\}
.nf
{"class":"ERROR","message":"Unrecognized request \*(Aq?FOO\*(Aq"}
.fi
.if n \{\
.RE
.\}
.PP
When the C client library parses a response of this kind, it will assert the ERR_SET bit in the top\-level set member\&.
.SH "RTCM2"
.PP
RTCM\-104 is a family of serial protocols used for broadcasting pseudorange corrections from differential\-GPS reference stations\&. Many GPS receivers can accept these corrections to improve their reporting accuracy\&.
.PP
RTCM\-104 comes in two major and incompatible flavors, 2\&.x and 3\&.x\&. Each major flavor has minor (compatible) revisions\&.
.PP
The applicable standard for RTCM Version 2\&.x is
RTCM Recommended Standards for Differential NAVSTAR GPS Service
RTCM Paper 194\-93/SC 104\-STD\&. For RTCM 3\&.1 it is
RTCM Paper 177\-2006\-SC104\-STD\&. Ordering instructions for both standards are accessible from the website of the
\m[blue]\fBRadio Technical Commission for Maritime Services\fR\m[]\&\s-2\u[1]\d\s+2
under "Publications"\&.
.SS "RTCM WIRE TRANSMISSIONS"
.PP
Differential\-GPS correction stations consist of a GPS reference receiver coupled to a low frequency (LF) transmitter\&. The GPS reference receiver is a survey\-grade GPS that does GPS carrier tracking and can work out its own position to a few millimeters\&. It generates range and range\-rate corrections and encodes them into RTCM104\&. It ships the RTCM104 to the LF transmitter over serial rs\-232 signal at 100 baud or 200 baud depending on the requirements of the transmitter\&.
.PP
The LF transmitter broadcasts the approximately 300khz radio signal that differential\-GPS radio receivers pick up\&. Transmitters that are meant to have a higher range will need to transmit at the slower rate\&. The higher the data rate the harder it will be for the remote radio receiver to receive with a good signal\-to\-noise ration\&. (Higher data rate signals can\*(Aqt be averaged over as long a time frame, hence they appear noisier\&.)
.SS "RTCM WIRE FORMATS"
.PP
An RTCM 2\&.x message consists of a sequence of up to 33 30\-bit words\&. The 24 most significant bits of each word are data and the six least significant bits are parity\&. The parity algorithm used is the same ISGPS\-2000 as that used on GPS satellite downlinks\&. Each RTCM 2\&.x message consists of two header words followed by zero or more data words, depending upon message type\&.
.PP
An RTCM 3\&.x message begins with a fixed leader byte 0xD3\&. That is followed by six bits of version information and 10 bits of payload length information\&. Following that is the payload; following the payload is a 3\-byte checksum of the payload using the Qualcomm CRC\-24Q algorithm\&.
.SS "RTCM2 JSON FORMAT"
.PP
Each RTCM2 message is dumped as a single JSON object per message, with the message fields as attributes of that object\&. Arrays of satellite, station, and constellation statistics become arrays of JSON sub\-objects\&. Each sentence will normally also have a "device" field containing the pathname of the originating device\&.
.PP
All attributes other than the device field are mandatory\&. Header attributes are emitted before others\&.
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBHeader portion\fR
.RS 4
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.B Table\ \&15.\ \&SKY object
.TS
allbox tab(:);
lB lB lB.
T{
Name
T}:T{
Type
T}:T{
.PP
Description
T}
.T&
l l l
l l l
l l l
l l l
l l l
l l l
l l l.
T{
class
T}:T{
string
T}:T{
.PP
Fixed: "RTCM2"\&.
T}
T{
type
T}:T{
integer
T}:T{
.PP
Message type (1\-9)\&.
T}
T{
station_id
T}:T{
integer
T}:T{
.PP
The id of the GPS reference receiver\&. The LF transmitters also have (different) id numbers\&.
T}
T{
zcount
T}:T{
real
T}:T{
.PP
The reference time of the corrections in the message in seconds within the current hour\&. Note that it is in GPS time, which is some seconds ahead of UTC (see the U\&.S\&. Naval Observatory\*(Aqs
\m[blue]\fBtable of leap second corrections\fR\m[]\&\s-2\u[2]\d\s+2)\&.
T}
T{
seqnum
T}:T{
integer
T}:T{
.PP
Sequence number\&. Only 3 bits wide, wraps after 7\&.
T}
T{
length
T}:T{
integer
T}:T{
.PP
The number of words after the header that comprise the message\&.
T}
T{
station_health
T}:T{
integer
T}:T{
.PP
Station transmission status\&. Indicates the health of the beacon as a reference source\&. Any nonzero value means the satellite is probably transmitting bad data and should not be used in a fix\&. 6 means the transmission is unmonitored\&. 7 means the station is not working properly\&. Other values are defined by the beacon operator\&.
T}
.TE
.sp 1
.PP
<message type> is one of
.PP
1
.RS 4
full corrections \- one message containing corrections for all GPS satellites in view\&. This is not common\&.
.RE
.PP
3
.RS 4
reference station parameters \- the position of the reference station GPS antenna\&.
.RE
.PP
4
.RS 4
datum \(em the datum to which the DGPS data is referred\&.
.RE
.PP
5
.RS 4
constellation health \(em information about the satellites the beacon can see\&.
.RE
.PP
6
.RS 4
null message \(em just a filler\&.
.RE
.PP
7
.RS 4
radio beacon almanac \(em information about this or other beacons\&.
.RE
.PP
9
.RS 4
subset corrections \(em a message containing corrections for only a subset of the GPS satellites in view\&.
.RE
.PP
16
.RS 4
special message \(em a text message from the beacon operator\&.
.RE
.PP
31
.RS 4
GLONASS subset corrections \(em a message containing corrections for a set of the GLONASS satellites in view\&.
.RE
.RE
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBType 1 and 9: Correction data\fR
.RS 4
.PP
One or more satellite objects follow the header for type 1 or type 9 messages\&. Here is the format:
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.B Table\ \&16.\ \&Satellite object
.TS
allbox tab(:);
lB lB lB.
T{
Name
T}:T{
Type
T}:T{
.PP
Description
T}
.T&
l l l
l l l
l l l
l l l
l l l.
T{
ident
T}:T{
integer
T}:T{
.PP
The PRN number of the satellite for which this is correction data\&.
T}
T{
udre
T}:T{
integer
T}:T{
.PP
User Differential Range Error (0\-3)\&. See the table following for values\&.
T}
T{
iod
T}:T{
integer
T}:T{
.PP
Issue Of Data, matching the IOD for the current ephemeris of this satellite, as transmitted by the satellite\&. The IOD is a unique tag that identifies the ephemeris; the GPS using the DGPS correction and the DGPS generating the data must use the same orbital positions for the satellite\&.
T}
T{
prc
T}:T{
real
T}:T{
.PP
The pseudorange error in meters for this satellite as measured by the beacon reference receiver at the epoch indicated by the z_count in the parent record\&.
T}
T{
rrc
T}:T{
real
T}:T{
.PP
The rate of change of pseudorange error in meters/sec for this satellite as measured by the beacon reference receiver at the epoch indicated by the z_count field in the parent record\&. This is used to calculate pseudorange errors at other epochs, if required by the GPS receiver\&.
T}
.TE
.sp 1
.PP
User Differential Range Error values are as follows:
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.B Table\ \&17.\ \&UDRE values
.TS
allbox tab(:);
l l
l l
l l
l l.
T{
0
T}:T{
1\-sigma error <= 1m
T}
T{
1
T}:T{
1\-sigma error <= 4m
T}
T{
2
T}:T{
1\-sigma error <= 8m
T}
T{
3
T}:T{
1\-sigma error > 8m
T}
.TE
.sp 1
.PP
Here\*(Aqs an example:
.sp
.if n \{\
.RS 4
.\}
.nf
{"class":"RTCM2","type":1,
"station_id":688,"zcount":843\&.0,"seqnum":5,"length":19,"station_health":6,
"satellites":[
{"ident":10,"udre":0,"iod":46,"prc":\-2\&.400,"rrc":0\&.000},
{"ident":13,"udre":0,"iod":94,"prc":\-4\&.420,"rrc":0\&.000},
{"ident":7,"udre":0,"iod":22,"prc":\-5\&.160,"rrc":0\&.002},
{"ident":2,"udre":0,"iod":34,"prc":\-6\&.480,"rrc":0\&.000},
{"ident":4,"udre":0,"iod":47,"prc":\-8\&.860,"rrc":0\&.000},
{"ident":8,"udre":0,"iod":76,"prc":\-7\&.980,"rrc":0\&.002},
{"ident":5,"udre":0,"iod":99,"prc":\-8\&.260,"rrc":0\&.002},
{"ident":23,"udre":0,"iod":81,"prc":\-8\&.060,"rrc":0\&.000},
{"ident":16,"udre":0,"iod":70,"prc":\-11\&.740,"rrc":0\&.000},
{"ident":30,"udre":0,"iod":4,"prc":\-18\&.960,"rrc":\-0\&.006},
{"ident":29,"udre":0,"iod":101,"prc":\-24\&.960,"rrc":\-0\&.002}
]}
.fi
.if n \{\
.RE
.\}
.RE
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBType 3: Reference Station Parameters\fR
.RS 4
.PP
Here are the payload members of a type 3 (Reference Station Parameters) message:
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.B Table\ \&18.\ \&Reference Station Parameters
.TS
allbox tab(:);
lB lB lB.
T{
Name
T}:T{
Type
T}:T{
.PP
Description
T}
.T&
l l l
l l l
l l l.
T{
x
T}:T{
real
T}:T{
.PP
ECEF X coordinate\&.
T}
T{
y
T}:T{
real
T}:T{
.PP
ECEF Y coordinate\&.
T}
T{
z
T}:T{
real
T}:T{
.PP
ECEF Z coordinate\&.
T}
.TE
.sp 1
.PP
The coordinates are the position of the station, in meters to two decimal places, in Earth Centred Earth Fixed coordinates\&. These are usually referred to the WGS84 reference frame, but may be referred to NAD83 in the US (essentially identical to WGS84 for all except geodesists), or to some other reference frame in other parts of the world\&.
.PP
An invalid reference message is represented by a type 3 header without payload fields\&.
.PP
Here\*(Aqs an example:
.sp
.if n \{\
.RS 4
.\}
.nf
{"class":"RTCM2","type":3,
"station_id":652,"zcount":1657\&.2,"seqnum":2,"length":4,"station_health":6,
"x":3878620\&.92,"y":670281\&.40,"z":5002093\&.59
}
.fi
.if n \{\
.RE
.\}
.RE
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBType 4: Datum\fR
.RS 4
.PP
Here are the payload members of a type 4 (Datum) message:
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.B Table\ \&19.\ \&Datum
.TS
allbox tab(:);
lB lB lB.
T{
Name
T}:T{
Type
T}:T{
.PP
Description
T}
.T&
l l l
l l l
l l l
l l l
l l l
l l l.
T{
dgnss_type
T}:T{
string
T}:T{
.PP
Either "GPS", "GLONASS", "GALILEO", or "UNKNOWN"\&.
T}
T{
dat
T}:T{
integer
T}:T{
.PP
0 or 1 and indicates the sense of the offset shift given by dx, dy, dz\&. dat = 0 means that the station coordinates (in the reference message) are referred to a local datum and that adding dx, dy, dz to that position will render it in GNSS coordinates (WGS84 for GPS)\&. If dat = 1 then the ref station position is in GNSS coordinates and adding dx, dy, dz will give it referred to the local datum\&.
T}
T{
datum_name
T}:T{
string
T}:T{
.PP
A standard name for the datum\&.
T}
T{
dx
T}:T{
real
T}:T{
.PP
X offset\&.
T}
T{
dy
T}:T{
real
T}:T{
.PP
Y offset\&.
T}
T{
dz
T}:T{
real
T}:T{
.PP
Z offset\&.
T}
.TE
.sp 1
.PP
<dx> <dy> <dz> are offsets to convert from local datum to GNSS datum or vice versa\&. These fields are optional\&.
.PP
An invalid datum message is represented by a type 4 header without payload fields\&.
.RE
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBType 5: Constellation Health\fR
.RS 4
.PP
One or more of these follow the header for type 5 messages \(em one for each satellite\&.
.PP
Here is the format:
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.B Table\ \&20.\ \&Constellation health
.TS
allbox tab(:);
lB lB lB.
T{
Name
T}:T{
Type
T}:T{
.PP
Description
T}
.T&
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l.
T{
ident
T}:T{
integer
T}:T{
.PP
The PRN number of the satellite\&.
T}
T{
iodl
T}:T{
bool
T}:T{
.PP
True indicates that this information relates to the satellite information in an accompanying type 1 or type 9 message\&.
T}
T{
health
T}:T{
integer
T}:T{
0 indicates that the satellite is healthy\&. Any other value
indicates a problem (coding is not known)\&..PP
T}
T{
snr
T}:T{
integer
T}:T{
.PP
The carrier/noise ratio of the received signal in the range 25 to 55 dB(Hz)\&.
T}
T{
health_en
T}:T{
bool
T}:T{
.PP
If set to True it indicates that the satellite is healthy even if the satellite navigation data says it is unhealthy\&.
T}
T{
new_data
T}:T{
bool
T}:T{
True indicates that the IOD for this satellite will
soon be updated in type 1 or 9 messages\&..PP
T}
T{
los_warning
T}:T{
bool
T}:T{
.PP
Line\-of\-sight warning\&. True indicates that the satellite will shortly go unhealthy\&.
T}
T{
tou
T}:T{
integer
T}:T{
.PP
Healthy time remaining in seconds\&.
T}
.TE
.sp 1
.RE
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBType 6: Null\fR
.RS 4
.PP
This just indicates a null message\&. There are no payload fields\&.
.RE
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBUnknown message\fR
.RS 4
.PP
This format is used to dump message words in hexadecimal when the message type field doesn\*(Aqt match any of the known ones\&.
.PP
Here is the format:
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.B Table\ \&21.\ \&Unknown Message
.TS
allbox tab(:);
lB lB lB.
T{
Name
T}:T{
Type
T}:T{
.PP
Description
T}
.T&
l l l.
T{
data
T}:T{
list
T}:T{
.PP
A list of strings\&.
T}
.TE
.sp 1
.PP
Each string in the array is a hex literal representing 30 bits of information, after parity checks and inversion\&. The high two bits should be ignored\&.
.RE
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBType 7: Radio Beacon Almanac\fR
.RS 4
.PP
Here is the format:
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.B Table\ \&22.\ \&Contellation health
.TS
allbox tab(:);
lB lB lB.
T{
Name
T}:T{
Type
T}:T{
.PP
Description
T}
.T&
l l l
l l l
l l l
l l l
l l l
l l l
l l l.
T{
lat
T}:T{
real
T}:T{
.PP
Latitude in degrees, of the LF transmitter antenna for the station for which this is an almanac\&. North is positive\&.
T}
T{
lon
T}:T{
real
T}:T{
.PP
Longitude in degrees, of the LF transmitter antenna for the station for which this is an almanac\&. East is positive\&.
T}
T{
range
T}:T{
integer
T}:T{
Published range of the station in km\&..PP
T}
T{
frequency
T}:T{
real
T}:T{
.PP
Station broadcast frequency in kHz\&.
T}
T{
health
T}:T{
integer
T}:T{
.PP
<health> is the health of the station for which this is an almanac\&. If it is non\-zero, the station is issuing suspect data and should not be used for fixes\&. The ITU and RTCM104 standards differ about the mode detailed interpretation of the <health> field and even about its bit width\&.
T}
T{
station_id
T}:T{
integer
T}:T{
.PP
The id of the transmitter\&. This is not the same as the reference id in the header, the latter being the id of the reference receiver\&.
T}
T{
bitrate
T}:T{
integer
T}:T{
.PP
The transmitted bitrate\&.
T}
.TE
.sp 1
.PP
Here\*(Aqs an example:
.sp
.if n \{\
.RS 4
.\}
.nf
{"class":"RTCM2","type":9,"station_id":268,"zcount":252\&.6,
"seqnum":4,"length":5,"station_health":0,
"satellites":[
{"ident":13,"udre":0,"iod":3,"prc":\-25\&.940,"rrc":0\&.066},
{"ident":2,"udre":0,"iod":73,"prc":0\&.920,"rrc":\-0\&.080},
{"ident":8,"udre":0,"iod":22,"prc":23\&.820,"rrc":0\&.014}
]}
.fi
.if n \{\
.RE
.\}
.RE
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBType 13: GPS Time of Week\fR
.RS 4
.PP
Here are the payload members of a type 13 (Groumf Tramitter Parameters) message:
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.B Table\ \&23.\ \&Grund Transmitter Parameters
.TS
allbox tab(:);
lB lB lB.
T{
Name
T}:T{
Type
T}:T{
.PP
Description
T}
.T&
l l l
l l l
l l l
l l l
l l l.
T{
status
T}:T{
bool
T}:T{
.PP
If True, signals user to expect a type 16 explanatory message associated with this station\&. Probably indicates some sort of unusual event\&.
T}
T{
rangeflag
T}:T{
bool
T}:T{
.PP
If True, indicates that the estimated range is different from that found in the Type 7 message (which contains the beacon\*(Aqs listed range)\&. Generally indicates a range reduction due to causes such as poor ionospheric conditions or reduced transmission power\&.
T}
T{
lat
T}:T{
real
T}:T{
.PP
Degrees latitude, signed\&. Positive is N, negative is S\&.
T}
T{
lon
T}:T{
real
T}:T{
.PP
Degrees longitude, signed\&. Positive is E, negative is W\&.
T}
T{
range
T}:T{
integer
T}:T{
.PP
Transmission range in km (1\-1024)\&.
T}
.TE
.sp 1
.PP
This message type replaces message type 3 (Reference Station Parameters) in RTCM 2\&.3\&.
.RE
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBType 14: GPS Time of Week\fR
.RS 4
.PP
Here are the payload members of a type 14 (GPS Time of Week) message:
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.B Table\ \&24.\ \&Reference Station Parameters
.TS
allbox tab(:);
lB lB lB.
T{
Name
T}:T{
Type
T}:T{
.PP
Description
T}
.T&
l l l
l l l
l l l.
T{
week
T}:T{
integer
T}:T{
.PP
GPS week (0\-123)\&.
T}
T{
hour
T}:T{
integer
T}:T{
.PP
Hour of week (0\-167)\&.
T}
T{
leapsecs
T}:T{
integer
T}:T{
.PP
Leap Seconds (0\-63)\&.
T}
.TE
.sp 1
.PP
Here\*(Aqs an example:
.sp
.if n \{\
.RS 4
.\}
.nf
{"class":"RTCM2","type":14,"station_id":652,"zcount":1657\&.2,
"seqnum":3,"length":1,"station_health":6,"week":601,"hour":109,
"leapsecs":15}
.fi
.if n \{\
.RE
.\}
.RE
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBType 16: Special Message\fR
.RS 4
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.B Table\ \&25.\ \&Special Message
.TS
allbox tab(:);
lB lB lB.
T{
Name
T}:T{
Type
T}:T{
.PP
Description
T}
.T&
l l l.
T{
message
T}:T{
string
T}:T{
.PP
A text message sent by the beacon operator\&.
T}
.TE
.sp 1
.RE
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBType 31: Correction data\fR
.RS 4
.PP
One or more GLONASS satellite objects follow the header for type 1 or type 9 messages\&. Here is the format:
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.B Table\ \&26.\ \&Satellite object
.TS
allbox tab(:);
lB lB lB.
T{
Name
T}:T{
Type
T}:T{
.PP
Description
T}
.T&
l l l
l l l
l l l
l l l
l l l
l l l.
T{
ident
T}:T{
integer
T}:T{
.PP
The PRN number of the satellite for which this is correction data\&.
T}
T{
udre
T}:T{
integer
T}:T{
.PP
User Differential Range Error (0\-3)\&. See the table following for values\&.
T}
T{
change
T}:T{
boolean
T}:T{
.PP
Change\-of\-ephemeris bit\&.
T}
T{
tod
T}:T{
uinteger
T}:T{
.PP
Count of 30\-second periods since the top of the hour\&.
T}
T{
prc
T}:T{
real
T}:T{
.PP
The pseudorange error in meters for this satellite as measured by the beacon reference receiver at the epoch indicated by the z_count in the parent record\&.
T}
T{
rrc
T}:T{
real
T}:T{
.PP
The rate of change of pseudorange error in meters/sec for this satellite as measured by the beacon reference receiver at the epoch indicated by the z_count field in the parent record\&. This is used to calculate pseudorange errors at other epochs, if required by the GPS receiver\&.
T}
.TE
.sp 1
.PP
Here\*(Aqs an example:
.sp
.if n \{\
.RS 4
.\}
.nf
{"class":"RTCM2","type":31,"station_id":652,"zcount":1642\&.2,
"seqnum":0,"length":14,"station_health":6,
"satellites":[
{"ident":5,"udre":0,"change":false,"tod":0,"prc":132\&.360,"rrc":0\&.000},
{"ident":15,"udre":0,"change":false,"tod":0,"prc":134\&.840,"rrc":0\&.002},
{"ident":14,"udre":0,"change":false,"tod":0,"prc":141\&.520,"rrc":0\&.000},
{"ident":6,"udre":0,"change":false,"tod":0,"prc":127\&.000,"rrc":0\&.000},
{"ident":21,"udre":0,"change":false,"tod":0,"prc":128\&.780,"rrc":0\&.000},
{"ident":22,"udre":0,"change":false,"tod":0,"prc":125\&.260,"rrc":0\&.002},
{"ident":20,"udre":0,"change":false,"tod":0,"prc":117\&.280,"rrc":\-0\&.004},
{"ident":16,"udre":0,"change":false,"tod":17,"prc":113\&.460,"rrc":0\&.018}
]}
.fi
.if n \{\
.RE
.\}
.RE
.SH "RTCM3 DUMP FORMAT"
.PP
The support for RTCM104v3 dumping is incomplete and buggy\&. Do not attempt to use it for production! Anyone interested in it should read the source code\&.
.SH "AIS DUMP FORMATS"
.PP
AIS support is an extension\&. It may not be present if your instance of
gpsd
has been built with a restricted feature set\&.
.PP
AIS packets are dumped as JSON objects with class "AIS"\&. Each AIS report object contains a "type" field giving the AIS message type and a "scaled" field telling whether the remainder of the fields are dumped in scaled or unscaled form\&. (These will be emitted before any type\-specific fields\&.) It will also contain a "device" field naming the data source\&. Other fields have names and types as specified in the
AIVDM/AIVDO Protocol Decoding
document on the GPSD project website; each message field table may be directly interpreted as a specification for the members of the corresponding JSON object type\&.
.PP
By default, certain scaling and conversion operations are performed for JSON output\&. Latitudes and longitudes are scaled to decimal degrees rather than the native AIS unit of 1/10000th of a minute of arc\&. Ship (but not air) speeds are scaled to knots rather than tenth\-of\-knot units\&. Rate of turn may appear as "nan" if is unavailable, or as one of the strings "fastright" or "fastleft" if it is out of the AIS encoding range; otherwise it is quadratically mapped back to the turn sensor number in degrees per minute\&. Vessel draughts are converted to decimal meters rather than native AIS decimeters\&. Various other scaling conversions are described in
"AIVDM/AIVDO Protocol Decoding"\&.
.SH "SUBFRAME DUMP FORMATS"
.PP
Subframe support is always compiled into
gpsd
but many GPSes do not output subframe data or the
gpsd
driver may not support subframes\&.
.PP
Subframe packets are dumped as JSON objects with class "SUBFRAME"\&. Each subframe report object contains a "frame" field giving the subframe number, a "tSV" field for the transmitting satellite number, a "TOW17" field containing the 17 MSBs of the start of the next 12\-second message and a "scaled" field telling whether the remainder of the fields are dumped in scaled or unscaled form\&. It will also contain a "device" field naming the data source\&. Each SUBFRAME object will have a sub\-object specific to that subframe page type\&. Those sub\-object fields have names and types similar to those specified in the IS\-GPS\-200E document; each message field table may be directly interpreted as a specification for the members of the corresponding JSON object type\&.
.SH "SEE ALSO"
.PP
\fBgpsd\fR(8),
\fBlibgps\fR(3),
.SH "AUTHOR"
.PP
The protocol was designed and documented by Eric S\&. Raymond\&.
.SH "NOTES"
.IP " 1." 4
Radio Technical Commission for Maritime Services
.RS 4
\%http://www.rtcm.org/
.RE
.IP " 2." 4
table of leap second corrections
.RS 4
\%ftp://maia.usno.navy.mil/ser7/tai-utc.dat
.RE
|