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



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

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

#mount_pointObject



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(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



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

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

#rootObject



163
164
165
166
167
# File 'lib/gps_pvt/ntrip.rb', line 163

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

#root?Boolean

Returns:

  • (Boolean)


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

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