Class: URI::Ntrip
- Inherits:
-
HTTP
- Object
- HTTP
- URI::Ntrip
- Includes:
- OpenURI::OpenRead
- Defined in:
- lib/gps_pvt/util.rb,
lib/gps_pvt/ntrip.rb
Instance Method Summary collapse
- #buffer_open(buf, proxy, options) ⇒ Object
- #mount_point ⇒ Object
- #read_format(options = {}) ⇒ Object
- #read_source_table(options = {}) ⇒ Object
- #root ⇒ Object
- #root? ⇒ Boolean
Instance Method Details
#buffer_open(buf, proxy, options) ⇒ Object
173 174 175 |
# File 'lib/gps_pvt/ntrip.rb', line 173 def buffer_open(buf, proxy, ) OpenURI.open_ntrip(buf, self, proxy, ) end |
#mount_point ⇒ Object
169 170 171 |
# File 'lib/gps_pvt/ntrip.rb', line 169 def mount_point self.path.sub(%r|^/|, '') end |
#read_format(options = {}) ⇒ Object
33 34 35 36 37 38 39 40 |
# File 'lib/gps_pvt/util.rb', line 33 def read_format( = {}) pnt_list = self.read_source_table().mount_points case pnt_list[self.mount_point][:format] when /u-?b(?:lo)?x/i; :ubx when /RTCM ?3/i; :rtcm3 else; nil end end |
#read_source_table(options = {}) ⇒ Object
177 178 179 |
# File 'lib/gps_pvt/ntrip.rb', line 177 def read_source_table( = {}) GPS_PVT::Ntrip::parse_source_table(self.root.read()) end |
#root ⇒ Object
163 164 165 166 167 |
# File 'lib/gps_pvt/ntrip.rb', line 163 def root res = self.clone res.path = '/' res end |
#root? ⇒ Boolean
168 |
# File 'lib/gps_pvt/ntrip.rb', line 168 def root?; self.path == '/'; end |