概要
GPSを理解したかった。
RINEXから、衛星までの擬似距離を取ってみた。
サンプルコード
from ObsParser import *
from NavParser import *
from Utils import Utils
from Geometrias.Punto3D import Punto3D
from Proyecciones.Cargeo2Geo import Cargeo2Geo
def main():
navParser = NavigationParser('brdc0590-1.11n')
obsParser = ObservationParser('89090590-2.11o')
for obs in obsParser.getObservations():
tobs = obs['EPOCA']
epocObj = {
'EPOCA': tobs,
'OBSERVACIONES': {}
}
for sat in obs['OBSERVACIONES'].keys():
if 'G' in sat:
observation = obs['OBSERVACIONES'][sat]
efem = navParser.getParams(tobs, sat)
if not efem or not 'P2' in observation:
continue
epocObj['OBSERVACIONES'].update({
sat: {
'OBSERVACION': obs['OBSERVACIONES'][sat]
}
})
print (epocObj)
pass
if __name__=="__main__":
main()
print ("ok")
結果
'G02': {
'C1': {
'VALUE': 22402645.008,
'LLI': None,
'SSI': 6.0
}
},
'G04': {
'C1': {
'VALUE': 20565303.43,
'LLI': None,
'SSI': 7.0
}
},
'G07': {
'C1': {
'VALUE': 22181773.156,
'LLI': None,
'SSI': 5.0
}
},
'G08': {
'C1': {
'VALUE': 24495107.648,
'LLI': None,
'SSI': 4.0
}
},
'G10': {
'C1': {
'VALUE': 21478321.484,
'LLI': None,
'SSI': 6.0
}
},
'G13': {
'C1': {
'VALUE': 20168944.047,
'LLI': None,
'SSI': 7.0
}
},
'G20': {
'C1': {
'VALUE': 23186783.133,
'LLI': None,
'SSI': 5.0
}
},
'G23': {
'C1': {
'VALUE': 21860039.258,
'LLI': None,
'SSI': 7.0
}
}
以上。