• 大小: 42KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-06-16
  • 语言: Python
  • 标签: python  rtcm  

资源简介

基于python的rtcm解码算法源码,有详细框架和完整算法,用于GNSS差分数据处理学习

资源截图

代码片段和文件信息

#!/usr/bin/python -u
“““
This is heavily based on the NtripPerlClient program written by BKG.
Then heavily based on a unavco original.
“““

import socket
import sys
import datetime
import base64
import time
#import ssl
from optparse import OptionParser


version=0.2
useragent=“NTRIP JCMBsoftPythonClient/%.1f“ % version

# reconnect parameter (fixed values):
factor=2 # How much the sleep time increases with each failed attempt
maxReconnect=1
maxReconnectTime=1200
sleepTime=1 # So the first one is 1 second
maxConnectTime=0


class NtripClient(object):
    def __init__(self
                 buffer=50
                 user=““
                 out=sys.stdout
                 port=2101
                 caster=““
                 mountpoint=““
                 host=False
                 lat=46
                 lon=122
                 height=1212
                 ssl=False
                 verbose=False
                 UDP_Port=None
                 V2=False
                 headerFile=sys.stderr
                 headerOutput=False
                 ):
        self.buffer=buffer
        self.user=base64.b64encode(user)
        self.out=out
        self.port=port
        self.caster=caster
        self.mountpoint=mountpoint
        self.setPosition(lat lon)
        self.height=height
        self.verbose=verbose
        self.ssl=ssl
        self.host=host
        self.UDP_Port=UDP_Port
        self.V2=V2
        self.headerFile=headerFile
        self.headerOutput=headerOutput
        self.maxConnectTime=maxConnectTime

        self.socket=None

        if UDP_Port:
            self.UDP_socket = socket.socket(socket.AF_INET socket.SOCK_DGRAM)
            self.UDP_socket.bind((‘‘ 0))
            self.UDP_socket.setsockopt(socket.SOL_SOCKET socket.SO_BROADCAST 1)
        else:
            self.UDP_socket=None


    def setPosition(self lat lon):
        self.flagN=“N“
        self.flagE=“E“
        if lon>180:
            lon=(lon-360)*-1
            self.flagE=“W“
        elif (lon<0 and lon>= -180):
            lon=lon*-1
            self.flagE=“W“
        elif lon<-180:
            lon=lon+360
            self.flagE=“E“
        else:
            self.lon=lon
        if lat<0:
            lat=lat*-1
            self.flagN=“S“
        self.lonDeg=int(lon)
        self.latDeg=int(lat)
        self.lonMin=(lon-self.lonDeg)*60
        self.latMin=(lat-self.latDeg)*60

    def getMountPointString(self):
        mountPointString = “GET %s HTTP/1.1\r\nUser-Agent: %s\r\nAuthorization: Basic %s\r\n“ % (self.mountpoint useragent self.user)
#        mountPointString = “GET %s HTTP/1.1\r\nUser-Agent: %s\r\n“ % (self.mountpoint useragent)
        if self.host or self.V2:
           hostString = “Host: %s:%i\r\n“ % (self.casterself.port)
           mountPointString+=hostString
        if self.V2:
           mountPointString+=“Ntrip-Version: Ntrip/2.0\r\n“
        mountPointString+=“\r\n“
        if self.verbose:
           print mountPoint

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      14153  2015-01-06 05:51  python rtcm 解码\NTRIP\NTRIP Client\NtripClient.py

     文件        206  2015-01-06 05:51  python rtcm 解码\NTRIP\NTRIP Client\NTRIP_Client.sh

     文件        342  2015-01-06 05:51  python rtcm 解码\NTRIP\NTRIP_Client_Load\configuration

     文件       1381  2015-01-06 05:51  python rtcm 解码\NTRIP\NTRIP_Client_Load\do_ntrip_single_with_retry.sh

     文件        582  2015-01-06 05:51  python rtcm 解码\NTRIP\NTRIP_Client_Load\NTRIP_Client_Load.sh

     文件        349  2015-01-06 05:51  python rtcm 解码\NTRIP\NTRIP_Server_Load\Break_Pipe.pl

     文件        364  2015-01-06 05:51  python rtcm 解码\NTRIP\NTRIP_Server_Load\configuration

     文件       2632  2015-01-06 05:51  python rtcm 解码\NTRIP\NTRIP_Server_Load\do_ntrip_server_single.sh

     文件         96  2015-01-06 05:51  python rtcm 解码\NTRIP\NTRIP_Server_Load\Make_Chunks.pl

     文件        882  2015-01-06 05:51  python rtcm 解码\NTRIP\NTRIP_Server_Load\NTRIP_Server_Load.sh

     文件        459  2015-01-06 05:51  python rtcm 解码\NTRIP\NTRIP_Server_Load\Time_Length.pl

     文件      16161  2014-07-18 07:13  python rtcm 解码\RTCM2\RTCM2.py

     文件       3682  2014-07-18 07:13  python rtcm 解码\RTCM2\RTCM2_Decls.py

     文件       4847  2014-07-18 07:13  python rtcm 解码\RTCM2\RTCM2_Decode.py

     文件       3122  2014-07-18 07:13  python rtcm 解码\RTCM2\RTCM2_Definition.py

     文件       2042  2014-07-18 07:13  python rtcm 解码\RTCM2\RTCM2_Type1.py

     文件       2226  2014-07-18 07:13  python rtcm 解码\RTCM2\RTCM2_Type18.py

     文件       2624  2014-07-18 07:13  python rtcm 解码\RTCM2\RTCM2_Type19.py

     文件       1746  2014-07-18 07:13  python rtcm 解码\RTCM2\RTCM2_Type2.py

     文件       2841  2014-07-18 07:13  python rtcm 解码\RTCM2\RTCM2_Type22.py

     文件       2531  2014-07-18 07:13  python rtcm 解码\RTCM2\RTCM2_Type23.py

     文件       1851  2014-07-18 07:13  python rtcm 解码\RTCM2\RTCM2_Type24.py

     文件       2936  2014-07-18 07:13  python rtcm 解码\RTCM2\RTCM2_Type27.py

     文件       1083  2014-07-18 07:13  python rtcm 解码\RTCM2\RTCM2_Type3.py

     文件       2199  2014-07-18 07:13  python rtcm 解码\RTCM2\RTCM2_Type31.py

     文件       7025  2014-07-18 07:13  python rtcm 解码\RTCM2\RTCM2_Type41.py

     文件       2764  2014-07-18 07:13  python rtcm 解码\RTCM2\RTCM2_Type7.py

     文件       4179  2014-07-18 07:13  python rtcm 解码\RTCM2\Test_word_bit.py

     文件        240  2015-01-05 21:45  python rtcm 解码\RTCM3\DEFS\1001.RTCM3

     文件        253  2015-01-05 21:45  python rtcm 解码\RTCM3\DEFS\1002.RTCM3

............此处省略26个文件信息

评论

共有 条评论