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
176 177 178 |
# File 'lib/gps_pvt/ntrip.rb', line 176 def buffer_open(buf, proxy, ) OpenURI.open_ntrip(buf, self, proxy, ) end |
#mount_point ⇒ Object
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( = {}) 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
180 181 182 |
# File 'lib/gps_pvt/ntrip.rb', line 180 def read_source_table( = {}) GPS_PVT::Ntrip::parse_source_table(self.root.read()) end |
#root ⇒ Object
166 167 168 169 170 |
# File 'lib/gps_pvt/ntrip.rb', line 166 def root res = self.clone res.path = '/' res end |
#root? ⇒ Boolean
171 |
# File 'lib/gps_pvt/ntrip.rb', line 171 def root?; self.path == '/'; end |