Class: URI::Ntrip

Inherits:
HTTP
  • Object
show all
Includes:
OpenURI::OpenRead
Defined in:
lib/gps_pvt/util.rb,
lib/gps_pvt/ntrip.rb

Instance Method Summary collapse

Instance Method Details

#buffer_open(buf, proxy, options) ⇒ Object



176
177
178
# File 'lib/gps_pvt/ntrip.rb', line 176

def buffer_open(buf, proxy, options)
  OpenURI.open_ntrip(buf, self, proxy, options)
end

#mount_pointObject



172
173
174
# File 'lib/gps_pvt/ntrip.rb', line 172

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(options = {})
  pnt_list = self.read_source_table(options).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



180
181
182
# File 'lib/gps_pvt/ntrip.rb', line 180

def read_source_table(options = {})
  GPS_PVT::Ntrip::parse_source_table(self.root.read(options))
end

#rootObject



166
167
168
169
170
# File 'lib/gps_pvt/ntrip.rb', line 166

def root
  res = self.clone
  res.path = '/'
  res
end

#root?Boolean

Returns:

  • (Boolean)


171
# File 'lib/gps_pvt/ntrip.rb', line 171

def root?; self.path == '/'; end