{"id":2481,"date":"2016-11-07T18:10:16","date_gmt":"2016-11-07T18:10:16","guid":{"rendered":"\/?post_type=ht_kb&#038;p=2481"},"modified":"2020-08-29T21:59:43","modified_gmt":"2020-08-29T21:59:43","slug":"subtle-issues-with-using-ntrip-client-nmea-183-strings","status":"publish","type":"ht_kb","link":"https:\/\/www.use-snip.com\/kb\/knowledge-base\/subtle-issues-with-using-ntrip-client-nmea-183-strings\/","title":{"rendered":"Subtle issues with using NTRIP Client NMEA-183 strings"},"content":{"rendered":"<p>Recently a few <span style=\"color: #0000ff;\"><strong>SNIP<\/strong> <\/span>users have asked about using the NMEA-183 $GPGGA sentence from connected rovers to track their community of users.\u00a0\u00a0 The rationale for wanting this varies. Some just want to know who is using their network, others want to provide field support, and still others want to use this data for simple GIS\/AVL tracking.\u00a0 We been adding new reporting and mapping feature to <span style=\"color: #0000ff;\"><strong>SNIP<\/strong><\/span> to further support this need.<\/p>\n<p>This article discusses some of the finer points regarding <em>how<\/em> these sentences are used (or abused) inside any NTRIP Caster system.\u00a0 You can set your copy of <span style=\"color: #0000ff;\"><strong>SNIP<\/strong> <\/span>in this regard any way you wish; none of the discussed features will affect your user&#8217;s ability (more correctly their NTRIP Client&#8217;s ability) to log in and get data.\u00a0 But, having NTRIP Clients sending extra\u00a0 <a href=\"http:\/\/www.gpsinformation.org\/dale\/nmea.htm#GGA\" target=\"_blank\" rel=\"noopener noreferrer\">NMEA-183 $GPGGA<\/a> sentences may cost end users in terms of cellular connection bandwidth.<\/p>\n<h4>Why does an NTRIP Client send an NMEA-183 $GPGGA sentence to the caster?<\/h4>\n<p>When a rover (an <a href=\"\/kb\/knowledge-base\/question-what-is-an-ntrip-client\/\">NTRIP Client<\/a>) connects to an <a href=\"\/kb\/knowledge-base\/question-what-is-an-ntrip-caster\/\">NTRIP Caster<\/a> such as <span style=\"color: #0000ff;\"><strong>SNIP<\/strong><\/span>, particularly a caster offering either a <a href=\"\/kb\/knowledge-base\/nearest-mountpt-use\/\">NEAR<\/a> or a <span style=\"text-decoration: underline;\">V<\/span>irtual <span style=\"text-decoration: underline;\">R<\/span>eference <span style=\"text-decoration: underline;\">S<\/span>tation (VRS) connections, the rover device provides a basic NMEA-183 $GPGGA sentence to the NTRIP Caster <span style=\"text-decoration: underline;\">so it can decide what would be the best data stream (typically the closest) to send back to it<\/span>.\u00a0\u00a0 That is really all there is to it.\u00a0 Any NTRIP Caster offering single baseline connections (such as <span style=\"color: #0000ff;\"><strong>SNIP<\/strong><\/span>) does not typically need this information; the NTRIP Client is simply connected to the stream asked for (if it exists).<\/p>\n<p>Some (in fact many) &#8220;VRS&#8221; systems are not &#8220;Virtual&#8221; at all, they simply connect to the closest operational Reference Station in their network.\u00a0 Mount Points with terms like &#8220;iMax&#8221; or &#8220;near&#8221; in them are typical of this type.\u00a0 You can use <span style=\"color: #0000ff;\"><strong>SNIPS<\/strong><\/span>s <a href=\"\/kb\/knowledge-base\/nearest-streams-tab\/\">NEAR tab<\/a> to create this sort of network.\u00a0 Here is a quick <a href=\"\/kb\/knowledge-base\/virtual-reference-station-vrs-connection-examples\/\" target=\"_blank\" rel=\"noopener noreferrer\">comparison article<\/a> of some VRS mountPt differences taken from a typical Leica system operating in Lombardy.<\/p>\n<p style=\"padding-left: 30px;\"><span style=\"color: #008000;\"><strong>A note to RTKLIB users:<\/strong><\/span>\u00a0 <em>Rovers<\/em> send NMEA-183 $GPGGA sentences to <em>Casters<\/em>, while Base stations do not.\u00a0 You can manually enter in a fake LLH data for your testing needs with tools like RTKNAVI.\u00a0 But many\u00a0 NTRIP Casters will look at the provided data and, if it is out of their overall service area, will not reply with any data.\u00a0 If you will be doing that routinely, then consider setting up a <span style=\"color: #0000ff;\"><strong>SNIP<\/strong><\/span> node with your favorite connection points renamed using the <strong>vanity name<\/strong> feature in such as way that makes sense for your needs.\u00a0 And you can rename you NEAR streams in the same ways, <em>NEAR3<\/em> might be better named <em>NEAR3-MyOffice<\/em>, as an example.<\/p>\n<h4>How does the Caster use this information<\/h4>\n<p>As mentioned above, the NTRIP Caster uses this data to decide what data stream the user will receive.\u00a0 In the case of a system offering &#8220;real&#8221; virtual connections, a process unique to that user connection must be started to systematically create the requested data products from the network sources.\u00a0 This is why some VRS mountPt connections can take many tens of seconds to reply with the initial data.\u00a0\u00a0 In casters which do not create unique data products, the process is simply to select which existing data feed to connect the user to.<\/p>\n<p style=\"padding-left: 30px;\"><span style=\"color: #008000;\"><strong>Aside<\/strong><\/span>: Many US statewide network deployments have moved to no longer providing a large list of mount points, preferring to use various means like this to allow users to connect to the nearest physical site.\u00a0 When in doubt, look on their web pages and then verify what you see using the <a href=\"\/kb\/knowledge-base\/support-for-basic-mapping\/\">MAP display<\/a> dialog in <span style=\"color: #0000ff;\"><strong>SNIP<\/strong><\/span>.\u00a0 <span style=\"color: #0000ff;\"><strong>SNIP<\/strong> <\/span>will show the actual ECEF data recovered from the stream, so you can determine if it is a physical site or not.<\/p>\n<p>Both of these variations will also monitor the subsequent stream of NMEA-183 $GPGGA sentences from each rover to periodically re-evaluate the data that the end user is being sent.\u00a0 This is why the $GPGGA sentence is re-sent periodically (and why the client may be suddenly disconnected by the Caster if it does not send a new sentence every few seconds).\u00a0 As the rover moves, it can transparently be switched to a new (closer) base station. This data is also used for recovery when a GNSS base station suddenly goes offline, typically switching each connected user to the next closest station.<\/p>\n<p>Note that <span style=\"color: #0000ff;\"><strong>SNIP<\/strong> <\/span>does not in fact need any NTRIP Client data for single baselines (except for those clients connected to a <a href=\"\/kb\/knowledge-base\/nearest-mountpt-use\/\">NEAR<\/a> mountPt).\u00a0 When you set up the single baseline streams you will offer on <span style=\"color: #0000ff;\"><strong>SNIP<\/strong><\/span>, you have already &#8220;localized&#8221; any VRS data stream to the LLH location when the connection was established.<\/p>\n<h4>How does SNIP report this information<\/h4>\n<p>When <span style=\"color: #0000ff;\"><strong>SNIP<\/strong><\/span> is not using the client\/rover&#8217;s GGA data to control the corrections which the user receives, it simply reports it to the operator on the console log (the first few times) and then updates a record which is then used in connected user reports.\u00a0 [From release 1.5.0 onwards, the moving positions of rovers are plotted on the map.]<\/p>\n<p>When <span style=\"color: #0000ff;\"><strong>SNIP<\/strong><\/span> has a client\/rover connecting to a <a href=\"\/kb\/knowledge-base\/nearest-mountpt-use\/\">NEAR<\/a> stream, then the rover&#8217;s GGA data is also used to evaluate which base station in the NEAR pool to connect the rover to.\u00a0 When the connection is made to a new, different, base station, this is noted in the console log.<\/p>\n<p style=\"padding-left: 30px;\"><span style=\"color: #008000;\"><strong>Hint<\/strong><\/span>:\u00a0 Current details about any connect client (what base station it is connected to, the distance to that base station, and the number of NMEA-183 $GPGGA sentences received (and the last sentence) can be shown for all current users with the\u00a0 <strong>List Current Users&#8230;<\/strong> button found on the <a href=\"\/kb\/knowledge-base\/the-caster-and-clients-tab\/\">Caster and Clients tab<\/a>.<\/p>\n<p><span style=\"color: #0000ff;\"><strong>SNIP<\/strong> <\/span>also creates and uses its own $GPGGA sentences when connecting to remote Casters using the remote-relay method.\u00a0 This is provided to support sending that Caster coordinates it can use.\u00a0 See <a href=\"\/kb\/knowledge-base\/adding-remote-relayed-data-streams\/\">this article<\/a> for further details on use.<\/p>\n<h4>Different NTRIP Clients behave in various\u00a0 ways<\/h4>\n<p>The behavior seen in different NTRIP Clients can vary considerably.\u00a0 Most clients are fairly simple and the least featured do not offer the ability to send the $GPGGA sentence at all.\u00a0 Some clients never even look at the Caster table details where the sending of NMEA is defined.\u00a0 NTRIP Clients can be broadly classified as follows.<\/p>\n<p>There are NTRIP Clients that:<\/p>\n<ul>\n<li>Do not support sending NMEA sentences at all<\/li>\n<li>Send one NMEA-183 $GPGGA sentence once at initial connection,<br \/>\nbut one that is ill-formed or has incorrect time<\/li>\n<li>Send NMEA-183 $GPGGA sentences all the time (even when not wanted)<\/li>\n<li>Send other forms of unwanted NMEA-183 sentences (bandwidth pigs)<\/li>\n<li>Send NMEA-183 $GPGGA sentences <span style=\"text-decoration: underline;\">once<\/span> and only once at connection start<\/li>\n<li>Send NMEA-183 $GPGGA periodically and according to the end user settings<br \/>\n(this is the most common type)<\/li>\n<li>Send NMEA-183 $GPGGA according the Caster Table flags<br \/>\n(and the user settings to be periodic if allowed)<\/li>\n<li>Send NMEA-183 $GPGGA according the Caster Table flags, but incorrectly<br \/>\n(and the user settings to be periodic if allowed)<\/li>\n<\/ul>\n<p>In broad protocol terms, the NTRIP client must first connect (get an HTTP &#8220;OK&#8221; reply) and only then should it send the sentence.\u00a0 NTRIP protocol revision 2 (which does not have very broad industry acceptance at this time) does allow sending the sentence in the original header.\u00a0 <span style=\"color: #0000ff;\"><strong>SNIP<\/strong><\/span> supports both protocol formats.\u00a0 And <span style=\"color: #0000ff;\"><strong>SNIP<\/strong><\/span> correctly copes with all of the above real world examples.<\/p>\n<p>After the initial sending event, most NTRIP Clients will then send a sentence every X seconds thereafter; where X is the number of seconds set by the end user (and is typically 5, 10, 15, 30, 60 seconds or so). \u00a0 A few NTRIP Clients will align the sending time with the rover&#8217;s GNSS clock (Hemisphere is one).\u00a0 The precise delay between sending times is not overly critical to either party.<\/p>\n<p>Some NTRIP Clients will time out and reconnect if no data stream is forthcoming (this can be a common issue with any initial VRS setup that takes time).\u00a0 Others will reconnect, or even resend the setup data on the same connection very quickly.\u00a0 Most of these details are transparent to the <span style=\"color: #0000ff;\"><strong>SNIP<\/strong><\/span> owner\/operator, but can be helpful to understand what is occurring when a user cannot connect. The knowledge base has some <a href=\"\/kb\/knowledge-base\/debugging-client-connections\/\">articles<\/a> on debugging client connections in this regard.<\/p>\n<h4>What does the official RTCM SC-104 standard say?<\/h4>\n<p>Well, you will need to buy it (<a href=\"http:\/\/www.rtcm.org\">see here<\/a>) to read it in context but the key concern is the &lt;nmea&gt; flag, the use of which is described in a table as follows.\u00a0 From RTCM STANDARD 10410.1 NETWORKED TRANSPORT OF RTCM via INTERNET PROTOCOL (Ntrip) &#8211; Version 2.0:<\/p>\n<blockquote>\n<h6>Capability of Caster to receive NMEA message with approximate position from Client<br \/>\n0 = Caster is not able to handle incoming NMEA message with approximate position from Client<br \/>\n1 = Caster is able to handle incoming NMEA GGA message with approximate position from Client<\/h6>\n<\/blockquote>\n<p>Terms such as &#8220;is able to handle&#8221; are not defined and elsewhere in the document it points out that a caster must be ready to consume other NMEA messages coming from clients.<\/p>\n<p>A widely available unofficial pre-standard draft states provides some slightly outdated text:<\/p>\n<blockquote>\n<h6 style=\"padding-left: 30px;\" data-canvas-width=\"33.9986\">5.4 <strong>NMEA REQUEST MESSAGES<\/strong><br \/>\nFor some network-dependent applications it is necessary to send the position of the NtripClient to the NtripCaster. That position could be used by the NtripCaster to provide a data stream for a Virtual Reference Station (VRS) or to determine the best data stream to broadcast. Ntrip allows clients to send NMEA strings after the HTTP request for a data stream. If the &lt;<span class=\"highlight selected\">nmea<\/span>&gt; parameter is set to \u201c1\u201d (see Source-table section), the NtripCaster must receive at least one NMEA GGA string to prepare the data and start sending. The NtripClient is allowed to send more than one NMEA GGA string or NMEA strings of other type than GGA at any time. The following is an example of a request to a source-table named \u201cvrs_bayern\u201d to get a data stream generated for a virtual reference station with the coordinates of the NMEA string:<\/h6>\n<h6 style=\"padding-left: 30px;\" data-canvas-width=\"33.9986\">&#8230;.. [no example is given]<\/h6>\n<h6 style=\"padding-left: 30px;\" data-canvas-width=\"66.906055\">(See official RTCM documentation available from http:\/\/www.rtcm.org\/orderinfo.php for further details.)<\/h6>\n<\/blockquote>\n<p>You can see here the original design intent was more to keep an NTRIP Client from sending the NMEA-183 $GPGGA sentences to the Caster. Today it more often is taken to mean: &#8220;if you do not send it, then I (the Caster) will not send you any data in return&#8221; or &#8220;I can handle that sort of data&#8221; which has become the more common meaning today.<\/p>\n<h4>What does all this mean for SNIP<\/h4>\n<p><strong>It means that if you want those few NTRIP Client user devices who <span style=\"text-decoration: underline;\">DO<\/span> pay close attention to the key caster &lt;nmea&gt; flag in the caster table to send you any periodic $GPGGA data &#8211; you will need to <span style=\"text-decoration: underline;\">tell them<\/span> to do so. <\/strong>[Otherwise you will probably get one and only one sentence.] <strong><br \/>\n<\/strong><\/p>\n<p>Other than keeping tabs on the NTRIP Clients, there is no technical reason to do this.\u00a0 <span style=\"color: #0000ff;\"><strong>SNIP<\/strong> <\/span>is generally a single baseline NTRIP Caster, in that you can connect to many VRS devices, but your users get the single point which you connected to.\u00a0 That is true <span style=\"text-decoration: underline;\">UNLESS<\/span>, you are running a <a href=\"\/kb\/knowledge-base\/nearest-mountpt-use-case-examples\/\">NEAR<\/a> stream.\u00a0 If you attach a serial port to a GNSS device with <span style=\"color: #0000ff;\"><strong>SNIP<\/strong><\/span>, or use PUSH-In data, these are also single baseline connections.\u00a0 Within <span style=\"color: #0000ff;\"><strong>SNIP<\/strong> <\/span>the only time you as an operator need to send $GPGGA data is for a Remote-Relay connection to a VRS, and this is easily\u00a0 handled with the <a href=\"\/kb\/knowledge-base\/adding-remote-relayed-data-streams\/\">relay stream<\/a> connection dialog.<\/p>\n<p>In order to expressly instruct your NTRIP Client users to send you periodic\u00a0$GPGGA data, you need to change it in the caster table entries.\u00a0 To support the need to be able to have\u00a0NTRIP Clients send $GPGGA sentence a global preference has been added to the <span style=\"color: #0000ff;\"><strong>SNIP<\/strong><\/span> code base and is called &#8220;Request User Positions&#8221;\u00a0 (it is found in the\u00a0 <strong>Preferences&#8230;<\/strong> dialog, available under the <em>Edit<\/em> menu).<\/p>\n<p>When set to be active, <span style=\"color: #0000ff;\"><strong>SNIP<\/strong> <\/span>will modify all caster table entries to ensure it tells other parties connecting to that stream that a periodic\u00a0$GPGGA data is desired and can be handled.\u00a0\u00a0 It is up to the NTRIP Client how often this data is sent, but values from 5~60 seconds are common.\u00a0 Many NTRIP Clients also allow setting the data rate.\u00a0\u00a0 If a client device sends this data, <span style=\"color: #0000ff;\"><strong>SNIP<\/strong> <\/span>will report it.\u00a0 If a client does not, <span style=\"color: #0000ff;\"><strong>SNIP<\/strong> <\/span>will not record or report anything.\u00a0 Unlike most VRS connections, the client will never be disconnected if they do not send the $GPGGA sentence. (again except in the case of NEAR connections where the location is needed to select which base station is to be used).<\/p>\n<p style=\"padding-left: 30px;\"><span style=\"color: #008000;\"><strong>Aside<\/strong><\/span>: Please keep in mind that many NTRIP Clients are going to send your <span style=\"color: #0000ff;\"><strong>SNIP<\/strong><\/span> node periodic\u00a0$GPGGA data regardless of whether you ask for it or not.\u00a0 <span style=\"color: #0000ff;\"><strong>SNIP<\/strong> <\/span>has a normal filter method that will alert you to this sort of content the first five times it occurs for each user connection and then filter it from the log to prevent clutter.\u00a0 If you wish to see the last $GPGGA sentence for a user (as well as a count of the number received), it is shown when you press <strong>List Current Users<\/strong> on the <a href=\"\/kb\/knowledge-base\/the-caster-and-clients-tab\/\"><em>Caster and Clients<\/em> tab<\/a>.<\/p>\n<h4>How to do it, explained more tersely<\/h4>\n<p>If you want to instruct <span style=\"text-decoration: underline;\">every<\/span> NTRIP Client user to to send <span style=\"color: #0000ff;\"><strong>SNIP<\/strong><\/span> periodic $GPGGA data do this:\u00a0 Select the menu item <span style=\"text-decoration: underline;\"><em>Edit<\/em><\/span>, submenu <span style=\"text-decoration: underline;\"><em>Preferences<\/em><\/span>.\u00a0 The <strong>Preferences&#8230;<\/strong> dialog will appear; select the check box marked <strong>Always Accept NMEA-183 $GPGGA data<\/strong> and click okay.\u00a0\u00a0 The &lt;nema&gt; value in each new Caster table entry will now be set to &#8220;1&#8221; indicating to those rovers which follow this flag that periodic\u00a0$GPGGA data should be sent.<\/p>\n<p><a href=\"\/kb\/wp-content\/uploads\/2016\/10\/SertingFForNMEAreplies.com_.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2441 size-full\" src=\"\/kb\/wp-content\/uploads\/2016\/10\/SertingFForNMEAreplies.com_.png\" alt=\"sertingffornmeareplies-com\" width=\"320\" height=\"346\" srcset=\"https:\/\/www.use-snip.com\/kb\/wp-content\/uploads\/2016\/10\/SertingFForNMEAreplies.com_.png 320w, https:\/\/www.use-snip.com\/kb\/wp-content\/uploads\/2016\/10\/SertingFForNMEAreplies.com_-277x300.png 277w, https:\/\/www.use-snip.com\/kb\/wp-content\/uploads\/2016\/10\/SertingFForNMEAreplies.com_-46x50.png 46w\" sizes=\"auto, (max-width: 320px) 100vw, 320px\" \/><\/a><\/p>\n<p>There are a few NTRIP Clients that also need to see the Caster Table\u00a0 &#8220;Solution&#8221; flag set to &#8220;network&#8221;\u00a0 (not &#8220;single&#8221;) in order to send periodic $GPGGA data.\u00a0 Some devices appear to send the data more often if this is set as a network solution.\u00a0 Sending the rover position every second or so can be of value with rapidly moving vehicles. It also produces nice AVL (<span style=\"text-decoration: underline;\">a<\/span>utomatic <span style=\"text-decoration: underline;\">v<\/span>ehicle <span style=\"text-decoration: underline;\">l<\/span>ocation) plots of your connected rovers, but <span style=\"color: #0000ff;\"><strong>SNIP<\/strong><\/span> does need prior locations in order to operate.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently a few SNIP users have asked about using the NMEA-183 $GPGGA sentence from connected rovers to track their community of users.\u00a0\u00a0 The rationale for wanting this varies. Some just want to know who is using their network, others want to provide field support, and still others want to use [&hellip;]<\/p>\n","protected":false},"author":13,"comment_status":"open","ping_status":"open","template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"ht-kb-category":[112,283],"ht-kb-tag":[],"class_list":["post-2481","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-general","ht_kb_category-managing-user-accounts"],"_links":{"self":[{"href":"https:\/\/www.use-snip.com\/kb\/wp-json\/wp\/v2\/ht-kb\/2481","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.use-snip.com\/kb\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.use-snip.com\/kb\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.use-snip.com\/kb\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.use-snip.com\/kb\/wp-json\/wp\/v2\/comments?post=2481"}],"version-history":[{"count":14,"href":"https:\/\/www.use-snip.com\/kb\/wp-json\/wp\/v2\/ht-kb\/2481\/revisions"}],"predecessor-version":[{"id":7238,"href":"https:\/\/www.use-snip.com\/kb\/wp-json\/wp\/v2\/ht-kb\/2481\/revisions\/7238"}],"wp:attachment":[{"href":"https:\/\/www.use-snip.com\/kb\/wp-json\/wp\/v2\/media?parent=2481"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.use-snip.com\/kb\/wp-json\/wp\/v2\/ht-kb-category?post=2481"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.use-snip.com\/kb\/wp-json\/wp\/v2\/ht-kb-tag?post=2481"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}