{"id":6333,"date":"2019-06-11T17:32:51","date_gmt":"2019-06-11T17:32:51","guid":{"rendered":"https:\/\/www.use-snip.com\/kb\/?post_type=ht_kb&#038;p=6333"},"modified":"2020-06-13T21:32:42","modified_gmt":"2020-06-13T21:32:42","slug":"the-avl-server","status":"publish","type":"ht_kb","link":"https:\/\/www.use-snip.com\/kb\/knowledge-base\/the-avl-server\/","title":{"rendered":"The AVL Server"},"content":{"rendered":"<p>The <strong>AVL Server<\/strong> controls are located in the <a href=\"https:\/\/www.use-snip.com\/kb\/knowledge-base\/the-avl-tab\/\">AVL Tab<\/a> and provide the means to control the server functions, including various access methods and the formats used to send data to subscribed clients.\u00a0 The use of these controls is discussed further in this article. The AVL Server is independent of the NTRIP Server and operates on its own port, although they share a common IP address.<\/p>\n<h2>Background<\/h2>\n<p>An important primary consideration to keep in mind is that <span style=\"color: #0000ff;\"><strong>SNIP<\/strong><\/span> is a powerful real time GNSS corrections server, where data <em>latency<\/em> to the end user community is always a concern.\u00a0 By contrast, <strong>A<\/strong>utomatic <strong>V<\/strong>ehicle <strong>L<\/strong>ocation (AVL) applications have few real time constraints and periodic updates every 10~60 seconds are the norm.\u00a0 The design of <span style=\"color: #0000ff;\"><strong>SNIP<\/strong><\/span> gives processing preference to the delivery of corrections to the subscribed rovers (<a href=\"https:\/\/www.use-snip.com\/kb\/knowledge-base\/question-what-is-an-ntrip-client\/\">NTRIP Clients<\/a>), with the graphic update process dealt with as a secondary task which is slowed and delayed when conditions warrant.\u00a0 In a similar way, AVL updates are processed when they arrive and sent to subscribed clients, while the the related graphic updates are only processed every ~30 seconds or so.<\/p>\n<p><span style=\"color: #0000ff;\"><strong>SNIP<\/strong><\/span> is agnostic as to what type or brand of AVL display is used.\u00a0 There are many display systems for various vertical dispatch and tracking application markets.\u00a0 But it is assumed this data is displayed on another system connecting to <span style=\"color: #0000ff;\"><strong>SNIP<\/strong><\/span> by means of a dedicated TCP\/IP connection.\u00a0\u00a0 The AVL Server allows multiple such connections to occur at the same time.<\/p>\n<h2>The Controls<\/h2>\n<p>Are divided into two primary sections.\u00a0 The right side of the tab deals with the AVL Server itself. The left side shows a display of recent rover reported locations.\u00a0 Each is discussed in turn.<\/p>\n<h3>The Server Controls<\/h3>\n<p>Each of the AVL Server controls is described in the image below.<\/p>\n<p><a href=\"https:\/\/www.use-snip.com\/kb\/wp-content\/uploads\/2019\/06\/AVLserver-Right.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-6336 size-full\" src=\"https:\/\/www.use-snip.com\/kb\/wp-content\/uploads\/2019\/06\/AVLserver-Right.png?_t=1560213480\" alt=\"\" width=\"580\" height=\"270\" srcset=\"https:\/\/www.use-snip.com\/kb\/wp-content\/uploads\/2019\/06\/AVLserver-Right.png 580w, https:\/\/www.use-snip.com\/kb\/wp-content\/uploads\/2019\/06\/AVLserver-Right-300x140.png 300w, https:\/\/www.use-snip.com\/kb\/wp-content\/uploads\/2019\/06\/AVLserver-Right-50x23.png 50w, https:\/\/www.use-snip.com\/kb\/wp-content\/uploads\/2019\/06\/AVLserver-Right-320x149.png 320w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><\/p>\n<h4>Active Label<\/h4>\n<p>This label shows the state of the AVL Server, switching between\u00a0 &#8220;AVL <span style=\"color: #008000;\"><strong>ACTIVE<\/strong><\/span>&#8221; and &#8220;AVL<span style=\"color: #ff0000;\"><strong> OFF_LINE<\/strong><\/span>&#8221; when the Connect\/Disconnect button is pressed.\u00a0\u00a0 The AVL Server listens for client connections at the port (default 5012) indicated and at the same IP as the NTRIP Caster.\u00a0 The AVL Server requires that the NTRIP Caster also be active and on-line in order to be enabled.<\/p>\n<h4>Connections Count<\/h4>\n<p>The number of current and past AVL client connections is shown in this label.\u00a0 In other words, this shows the number of open TCP\/IP sockets at any time.\u00a0 As client connections come and go, they are also denoted in the console log.<\/p>\n<h4>Port Number<\/h4>\n<p>The port number selects the port at which the AVL Server will listen for connections.\u00a0 The IP used is the same as that used by the NTRIP Caster, which is set in the <a href=\"https:\/\/www.use-snip.com\/kb\/knowledge-base\/the-caster-and-clients-tab\/\"><em>Caster and Clients<\/em><\/a> tab.<\/p>\n<p>The port number selected must not conflict with others used by the machine and any local firewall or port forwarding considerations must allow the external client devices to reach this port.\u00a0 In this respect the setup steps are similar to the same process used for installing the <span style=\"color: #0000ff;\"><strong>SNIP<\/strong><\/span> Caster itself.<\/p>\n<h4>Disconnect \/ Connect Button<\/h4>\n<p>The <strong><em>Connect\/Disconnect<\/em><\/strong> button toggles the state of the AVL Server when pressed.\u00a0 When the AVL Server is made active a console log entry is also added similar to the below.<\/p>\n<p style=\"text-align: center;\">[<span style=\"color: #0000ff;\"><strong>AVL<\/strong><\/span>]: \u00a0\u00a0AVL Server socket at: 1<strong>92.168.xxx.xxx:5012<\/strong> is <span style=\"color: #008000;\"><strong>ACTIVE<\/strong><\/span>.<\/p>\n<p>Whenever a new client initially connects to the AVL Server, some header information is sent to it describing the format being used. Thereafter, every $GGA sentence from the connected rovers is also sent to it.<\/p>\n<p>In the absence of any new $GGA sentence to be sent, periodic comment statements are sent to prevent connection time-out events.\u00a0 All comment statements start with &#8220;##&#8221; to allow easy filtering.<\/p>\n<p>When an active AVL Server is disconnected, all current client connections are also disconnected after sending a final comment line.<\/p>\n<p style=\"text-align: center;\">[Other controls such as the &#8220;Open Access&#8221; combo will be used to select the<br \/>\nformat and access used by the AVL Server as additional features are added]<\/p>\n<h4>The Enabled Check Box<\/h4>\n<p>When checked, the Enabled check box allows NMEA $GGA sentences to be processed by the AVL Server.\u00a0 When not checked, no such data from any Rover device is collected, logged, or sent to subscribers.\u00a0\u00a0 This control can be considered the <strong>master on\/off<\/strong> control.<\/p>\n<h4>The Auto Start Check Box<\/h4>\n<p>When checked, the Auto Start check box allows the AVL Server to automatically start when the <span style=\"color: #0000ff;\"><strong>SNIP<\/strong><\/span> application starts.\u00a0 If you routinely use the AVL Server feature, enable this check box.<\/p>\n<h4>The Log Data Check Box<\/h4>\n<p>When checked, the Log Data check box causes a log file containing each $GGA entry to be created for post processing uses.\u00a0 You can also use &#8220;tail&#8221; utilities to read this file in real time.<\/p>\n<p>The data is stored in a simple comma separated format.\u00a0 The files are stored in the \/SNIPlogs folder, which is set based on the user&#8217;s <a href=\"https:\/\/www.use-snip.com\/kb\/knowledge-base\/saving-data-into-log-files\/\">Data File settings<\/a>.\u00a0 These files are automatically named and a new file is aligned with the local time zone and created every 12 hours.\u00a0 A typical file name would be:\u00a0 <em>AVL_log_190227_12.csv<\/em> \u00a0 The file naming pattern follows\u00a0 YYMMDD_HH, so this example indicates an AVL log created on February 27th 2019 for the second 12-hour period of that day.<\/p>\n<p>&nbsp;<\/p>\n<h3>The Recent Rover Locations<\/h3>\n<p>The left side of the tab is used to display recent NMEA $GGA sentences and other details about the NTRIP Client devices that sent them.\u00a0\u00a0 This display is updated as new entries occur, or every 30 seconds.\u00a0 Various items can be enabled\/disabled to control the information shown. Each control is discussed in turn.<\/p>\n<p><a href=\"https:\/\/www.use-snip.com\/kb\/wp-content\/uploads\/2019\/06\/AVLserver-Left.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-6339 size-full\" src=\"https:\/\/www.use-snip.com\/kb\/wp-content\/uploads\/2019\/06\/AVLserver-Left.png?_t=1560213492\" alt=\"\" width=\"880\" height=\"270\" srcset=\"https:\/\/www.use-snip.com\/kb\/wp-content\/uploads\/2019\/06\/AVLserver-Left.png 880w, https:\/\/www.use-snip.com\/kb\/wp-content\/uploads\/2019\/06\/AVLserver-Left-300x92.png 300w, https:\/\/www.use-snip.com\/kb\/wp-content\/uploads\/2019\/06\/AVLserver-Left-768x236.png 768w, https:\/\/www.use-snip.com\/kb\/wp-content\/uploads\/2019\/06\/AVLserver-Left-50x15.png 50w, https:\/\/www.use-snip.com\/kb\/wp-content\/uploads\/2019\/06\/AVLserver-Left-600x184.png 600w, https:\/\/www.use-snip.com\/kb\/wp-content\/uploads\/2019\/06\/AVLserver-Left-320x98.png 320w\" sizes=\"auto, (max-width: 880px) 100vw, 880px\" \/><\/a><\/p>\n<h4># Check Box<\/h4>\n<p>This control, when enabled, displays a sequence number (a unique value ) for every NMEA $GGA sentence.<\/p>\n<h4>User Name Check Box<\/h4>\n<p>This control, when enabled, displays the NTRIP Client user name and C### (unique client Connection number) for the sender of the NMEA $GGA sentence.<\/p>\n<p>By providing both the user account name and the C###, user accounts that can connect multiple times at once can be disambiguated.\u00a0 When a <span style=\"color: #0000ff;\"><strong>SNIP<\/strong><\/span> NTRIP Caster is run in &#8220;open&#8221; mode, the C### value provides a unique identity for NTRIP Client tracking.<\/p>\n<h4>Remote IP Check Box<\/h4>\n<p>This control, when enabled, displays the remote IP and port used by the NTRIP Client (the sender of the NMEA $GGA sentence). In the above image, details are obscured for privacy.<\/p>\n<h4>MountPt Check Box<\/h4>\n<p>This control, when enabled, displays the Base Station (mountPt stream) the NTRIP Client is connected to.<\/p>\n<h4>As LLH Check Box<\/h4>\n<p>The default format of the display shows each NMEA $GGA sentence as sent (minus the final &lt;CR&gt;&lt;LF&gt;).\u00a0 This control, when enabled, displays just the time and location values converted into a more readable LLH format in the format: XX.xxxx (degrees and decimal fractions of a degree).<\/p>\n<p>FYI: The &#8220;Altitude&#8221; data element used in the NMEA $GGA sentence is not the height with respect to the WGS reference ellipsoid, but is in <em>meters above sea level<\/em>.\u00a0 A value for the &#8220;Height of the Geoid&#8221; is also given.\u00a0 The translation process used for the geoid is defined by the Rover device (typically with an interpolated grid) and this is a common a source of confusion and error.<\/p>\n<h4>The count of NMEA Sentences<\/h4>\n<p>To the right of the buttons <strong><em>Refresh<\/em><\/strong>, <strong><em>Clear<\/em><\/strong>, and <strong><em>Map<\/em> <\/strong>is a small textual label that provides a count of the NMEA $GGA sentences which have been received.\u00a0 The first value is the overall count since the AVL process was started. The second value is the number of recent entries waiting to be added to the table widget.\u00a0 This number grows until periodic processing updates the table (roughly once every 30 seconds) or the refresh button is pressed.<\/p>\n<h4>Refresh Button<\/h4>\n<p>Pressing the <strong><em>Refresh<\/em> <\/strong>button causes any pending NMEA $GGA sentence to be immediately updated into the table display.\u00a0 [<em>Aside<\/em>: This has no effect on the connected AVL Server clients, who received the NMEA $GGA sentence when it arrived.]<\/p>\n<h4>Clear Button<\/h4>\n<p>Pressing the <strong><em>Clear<\/em> <\/strong>button causes the table display to be cleared of entries.<\/p>\n<h4>Map Button<\/h4>\n<p>Pressing the <strong><em>Map<\/em> <\/strong>button causes a general map display to be started in the document viewer window.\u00a0 The <span style=\"color: #0000ff;\"><strong>SNIP<\/strong><\/span> operators can then scroll to the location of any NTRIP Client using the drop down combo boxes.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The AVL Server controls are located in the AVL Tab and provide the means to control the server functions, including various access methods and the formats used to send data to subscribed clients.\u00a0 The use of these controls is discussed further in this article. The AVL Server is independent of [&hellip;]<\/p>\n","protected":false},"author":13,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"ht-kb-category":[284],"ht-kb-tag":[442,242,241],"class_list":["post-6333","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-snip-tabs-and-controls","ht_kb_tag-avl","ht_kb_tag-gga","ht_kb_tag-nmea"],"_links":{"self":[{"href":"https:\/\/www.use-snip.com\/kb\/wp-json\/wp\/v2\/ht-kb\/6333","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=6333"}],"version-history":[{"count":22,"href":"https:\/\/www.use-snip.com\/kb\/wp-json\/wp\/v2\/ht-kb\/6333\/revisions"}],"predecessor-version":[{"id":6386,"href":"https:\/\/www.use-snip.com\/kb\/wp-json\/wp\/v2\/ht-kb\/6333\/revisions\/6386"}],"wp:attachment":[{"href":"https:\/\/www.use-snip.com\/kb\/wp-json\/wp\/v2\/media?parent=6333"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.use-snip.com\/kb\/wp-json\/wp\/v2\/ht-kb-category?post=6333"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.use-snip.com\/kb\/wp-json\/wp\/v2\/ht-kb-tag?post=6333"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}