好久没更新了~看了点就顺手写了吧
跳过其它的直接进入ConfDataReader 这个文件
gpstk 支持自己编写读数据的配置文件而不用自己去接触底层代码,作者的初衷啊~下面就说下配置文件的格式
* - Anything after a '#' or a ';' is a comment
'#' 或者 ';' 号后面的是注释,养成良好习惯吧! '#' 放在开头表明是注释语句, ';' 放在句中表示后面是注释语句
* - Blank lines are ignored.
空白行忽略
* - No line may have more than 255 characters.
单行不得超过255个字符
* - Variable and section names are ALWAYS converted to uppercase.
变量和节的名称 通常会被转换为大写, 请不要以大小写区分
* - Variable and section names MUST start with a letter, and must only
* contain a mix of letters, numbers, dashes (-) and underscores (_).
变量和节的开头必须是字母并且只能有字母和数字,短横线或者下划线组成
* - Section names must be enclosed in brackets ([]).
节的名称必须用 [] 括起来
* - The Variable/Value pairs are separated by either '=' or ':'.
变量和对应的值用 =' or ':' 分开,其书写格式见下面的示例。注意可以对变量和值进行注释,等下具体说~
* - You may add comments to variables and values. Use a comma to* separate such comments.
这个等下结合上面一起说吧
* - If you use the same variable name within a given section, only the* last value will be used. Remember that names are ALWAYS converted to
* uppercase.
出现同名变量名取最后一个,包括大小写区分的变量
示例:
# Declare a section // 注释语句
[ONSA] // 节
name, 4-char station name = ONSA // 4-char station name 是对变量 name 的 注释 ONSA是其值, ONSA的注释忽略,4-char station name 这部分也可以忽略 如果想要在对 name 进行注释 可以在句尾 加一个 ";" 后面写注释
staX, X station coordinate = 3370658.5419, meters // 标准格式 变量名,注释 = 值, 注释
staY, Y station coordinate = 711877.1496, meters
staZ, Z station coordinate = 5349786.9542, meters