New BETA Socket / NTRIP Server feature. Capable of operating in two modes - either (a) as an open, unauthenticated TCP socket server, or (b) as an authenticated NTRIP server.
In open socket server mode, the output socket stream can be accessed by any TCP socket client capable of parsing raw GNSS data, including another instance of PyGPSClient or gnssdump (the CLI utility installed with pyubx2) running on another machine (assuming the traffic is permitted through any firewalls).
In NTRIP server mode, the socket stream can be accessed by any authenticated NTRIP client. The sourcetable contains a single entry corresponding to the PyGPSClient host. The server authentication credentials are set via two environment variables PYGPSCLIENT_USER and PYGPSCLIENT_PASSWORD.
In either mode, the maximum number of clients is arbitrarily limited to 5. A label on the settings panel indicates the number of connected clients - this turns red when the maximum has been reached.
The socket host address is 0.0.0.0 (i.e. binds to all available IP addresses on the host machine). The socket port defaults to 50010 but is configurable via the settings panel (2101 is the convention for NTRIP servers but is not mandated).
The default configuration for the socket server is set in globals.py as SOCKSERVER_HOST, SOCKSERVER_PORT and SOCKSERVER_MAX_CLIENTS.
Fixes # (issue)
Testing
Please test all changes, however trivial, against the supplied unittest suite tests/test_*.py e.g. by executing the tests/testsuite.py module or using your IDE's native Python unittest integration facilities. Please describe any test cases you have amended or added to this suite to maintain >= 99% code coverage.
Checklist:
[x] My code follows the style guidelines of this project (see CONTRIBUTING.MD).
[x] I have performed a self-review of my own code.
[x] I have commented my code, particularly in hard-to-understand areas.
[x] I have made corresponding changes to the documentation.
[ ] (if appropriate) I have added test cases to the tests/test_*.py unittest suite to maintain >= 99% code coverage.
[x] I have tested my code against the full tests/test_*.py unittest suite.
[x] My changes generate no new warnings.
[x] Any dependent changes have been merged and published in downstream modules.
[x] I understand and acknowledge that the code will be published under a BSD 3-Clause license.
PyGPSClient Pull Request Template
Description
RELEASE CANDIDATE v1.3.5
ENHANCEMENTS:
gnssdump
(the CLI utility installed withpyubx2
) running on another machine (assuming the traffic is permitted through any firewalls).PYGPSCLIENT_USER
andPYGPSCLIENT_PASSWORD
.0.0.0.0
(i.e. binds to all available IP addresses on the host machine). The socket port defaults to50010
but is configurable via the settings panel (2101
is the convention for NTRIP servers but is not mandated).globals.py
asSOCKSERVER_HOST
,SOCKSERVER_PORT
andSOCKSERVER_MAX_CLIENTS
.Fixes # (issue)
Testing
Please test all changes, however trivial, against the supplied unittest suite
tests/test_*.py
e.g. by executing thetests/testsuite.py
module or using your IDE's native Python unittest integration facilities. Please describe any test cases you have amended or added to this suite to maintain >= 99% code coverage.Checklist:
CONTRIBUTING.MD
).tests/test_*.py
unittest suite to maintain >= 99% code coverage.tests/test_*.py
unittest suite.