##################################
# NtripCaster configuration file #
################################################################################
############### Server Location and Resposible Person ##########################
# Server meta info with no fuctionality.
### 下記3行を変更したがローカル使用なので多分あまり影響しない。
location BKG →HOIHOIDOに変更
rp_email casteradmin@ifag.de →自分のメールアドレスに変更
server_url http://caster.ifag.de →http://192.168.1.212に変更
########################### Server Limits ######################################
# Maximum number of simultaneous connections.
### 下記3行も気分的に変更した。
max_clients 100 → 20
max_clients_per_source 100 → 20
max_sources 40 → 8
######################### Server passwords #####################################
# The "encoder_password" is used from the sources to log in.
### パスワードを変更しておく。
encoder_password sesam01 → XXXXXXXX
#################### Server IP/port configuration ##############################
# The server_name specifies the hostname of the server and must not be set to
# an IP-adress. It is very important that server_name resolves to the IP-adress
# the server is running at.
# For every port, the server should listen to, a new port line can be added.
### 下記1行も変更したが、これもローカルだと意味なさそう。
server_name igs.ifag.de →rtk.hoihoido.com
#port 80
port 2101
######################## Main Server Logfile ##################################
# logfile contains information about connections, warnings, errors etc.
logdir /usr/local/ntripcaster/logs
logfile ntripcaster.log
############################ Access Control ###################################
# Here you specify which users have access to which mountpoints,
# one line per mount.
#
# Syntax: /<MOUNTPOINT>:<USER1>:<PASSWORD1>,<USER2>:<PASSWORD2>,...,<USERn>:<PASSWORDn>
#
# /<MOUNTPOINT>: name of the mountpoint. Must start with a slash.
# <USERi>: name of the user that has access to <MOUNTPOINT>.
# <PASSWORDi>: password of <USERi>.
#
### たぶん、ここが一番大事
# example:
#/mount0:user0:pass0,user1:pass1,user2:pass2
#/BUCU0:user1:password1,user2:password2 → コメントアウト
#/PADO0 → コメントアウト
/HOIHOIDO → 追加
options = {} opt = OptionParser.new opt.on("-c", "--CSV", "CSV output") { |v| options[:CSV] = v } opt.on("-q VAL", "--Q", Integer, "Q num (1=FIX:default)") { |v| options[:Q] = v }
opt.parse!(ARGV)
if ( options[:Q]) then qval=options[:Q].to_s else qval="1" end
n=0 while (l=gets()) do if (options[:CSV] and l =~ /^% +GPST +/) then title=l.split print "DATA," print title[1..-1].join(','),"\n" end
if l =~ /^\d{4}\/\d{2}\/\d{2} +\S+ +\S+ +\S+ +\S+ +(\d) / then if $1 == qval then if ( options[:CSV]) then l.gsub!(/ +/,",") end puts l n+=1 end else if (! options[:CSV]) then puts l end end