Difference between revisions of "Manual:System/GPS"

From MikroTik Wiki
Jump to: navigation, search
(added info for init-string)
Line 19: Line 19:
 
}}
 
}}
  
 +
{{Mr-arg-table
 +
|arg=enabled
 +
|type=yes {{!}} no
 +
|default=no
 +
|desc=Whether GPS is enabled
 +
 +
}}
 +
 +
 +
{{Mr-arg-table
 +
|arg=port
 +
|type=string
 +
|default=
 +
|desc=Name of the USB/Serial port where GPS receiver is connected
 +
 +
}}
 +
 +
}}
 
{{Mr-arg-table
 
{{Mr-arg-table
 
|arg=channel
 
|arg=channel
Line 26: Line 44:
  
 
}}
 
}}
 +
  
 
{{Mr-arg-table
 
{{Mr-arg-table
|arg=enabled
+
|arg=init-channel
|type=yes {{!}} no
+
|type=integer [0..4294967295]
|default=no
+
|default=
|desc=Whether GPS is enabled
+
|desc=Channel for init-string execution
  
 
}}
 
}}
 
  
 
{{Mr-arg-table
 
{{Mr-arg-table
|arg=port
+
|arg=init-string
 
|type=string
 
|type=string
 
|default=
 
|default=
|desc=Name of the USB/Serial port where GPS receiver is connected
+
|desc=AT init string for GPS initialization
  
 
}}
 
}}
Line 125: Line 143:
 
             port: usb1
 
             port: usb1
 
           channel: 0
 
           channel: 0
 +
    init-channel: 0
 +
      init-string:
 
   set-system-time: no
 
   set-system-time: no
  
Line 132: Line 152:
 
<pre>
 
<pre>
 
[admin@MikroTik] /system gps> monitor   
 
[admin@MikroTik] /system gps> monitor   
   date-and-time: sep/05/2011 07:28:54
+
   date-and-time: jul/02/2015 14:36:08
      latitude: N 56 57' 32.568''
+
            latitude: N 56 57' 32.262''
      longitude: E 24 9' 11.568''
+
            longitude: E 24 9' 7.262''
      altitude: -23.600000m
+
            altitude: 36.700001m
          speed: 0.000000 km/h
+
                speed: 0.000000 km/h
        bearing: none
+
  destination-bearing: none
          valid: yes
+
        true-bearing: 0.000000 deg. True
    satellites: 3
+
    magnetic-bearing: 0.000000 deg. Mag
 +
                valid: yes
 +
          satellites: 7
 
</pre>
 
</pre>
  
Line 149: Line 171:
 
Note that sometimes in order to make GPS module recognize under RouteOS you need to change the baud-rate setting in the '/port' menu.
 
Note that sometimes in order to make GPS module recognize under RouteOS you need to change the baud-rate setting in the '/port' menu.
  
 +
On some modems with GPS support you need to send multiple inits commands for the continues GPS monitoring, for example, for huawei card you need to send such init strin to get continuous monitoring "AT^WPDST=1,AT^WPDGP"
 
[[Category:Manual|G]]
 
[[Category:Manual|G]]
 
[[Category:System|G]]
 
[[Category:System|G]]

Revision as of 10:44, 21 July 2015

Version.png

Applies to RouterOS: v3, v4, v5 +


Summary

Sub-menu: /system gps
Standards: GPS, NMEA 0183, Simple Text Output Protocol

Global Positioning System (GPS) is used for determining precise location of a GPS receiver.

Configuration Properties

}}
Property Description
enabled (yes | no; Default: no) Whether GPS is enabled
port (string; Default: ) Name of the USB/Serial port where GPS receiver is connected
channel (integer [0..4294967295]; Default: 0) Port channel used by device
init-channel (integer [0..4294967295]; Default: ) Channel for init-string execution
init-string (string; Default: ) AT init string for GPS initialization
set-system-time (yes | no; Default: no) Whether to set router's date and time to one received from GPS.

Monitoring Status

Command: /system gps monitor


This command is used for monitoring the data received from a GPS receiver

Parameters:

Property Description
date-and-time (date) Date and time received from GPS
latitude (none | string) Latitude in DM (Degrees Minute decimal) format
longitude (none | string) Longitude in DM (Degrees Minute decimal) format
speed (none | string) Current moving speed of the GPS unit
bearing (none | string) The compass direction toward which a GPS is moving
valid (yes | no)
satellites (integer) Number of satellites seen by the device.

Note: The time is not stratum 1 as RouterBOARD devices do not have PPS implemented

Basic examples

Adjust port settings specific for your device

[admin@MikroTik] /port> set 0 baud-rate=4800 parity=odd
[admin@MikroTik] /port> print detail 
Flags: I - inactive 
 0   name="usb1" used-by="GPS" channels=1 baud-rate=4800 data-bits=8 parity=odd stop-bits=1 flow-control=none

Enable GPS

[admin@MikroTik] /system gps> set enable=yes port=usb1
[admin@MikroTik] /system gps> print 
          enabled: yes
             port: usb1
          channel: 0
     init-channel: 0
      init-string:
  set-system-time: no

Monitor status

[admin@MikroTik] /system gps> monitor  
  date-and-time: jul/02/2015 14:36:08
             latitude: N 56 57' 32.262''
            longitude: E 24 9' 7.262''
             altitude: 36.700001m
                speed: 0.000000 km/h
  destination-bearing: none
         true-bearing: 0.000000 deg. True
     magnetic-bearing: 0.000000 deg. Mag
                valid: yes
           satellites: 7


[ Top | Back to Content ]

Troubleshooting

Note that sometimes in order to make GPS module recognize under RouteOS you need to change the baud-rate setting in the '/port' menu.

On some modems with GPS support you need to send multiple inits commands for the continues GPS monitoring, for example, for huawei card you need to send such init strin to get continuous monitoring "AT^WPDST=1,AT^WPDGP"