How to frame request header for NTRIP server

51 Views Asked by At

I am trying to get corrections over NTRIP server. I am using polaris authorization key and device id to connect a Polaris Pointone GPS. When I use pointone's repo I am able to connect and get corrections.

Any help or pointers appreciated. Thanks!

I wanted to just get corrections data and apply it separately. I am using following to frame the request header:

        socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

        ntrip_user = '{}:{}'.format(login_details.username, login_details.password)

        mountPointString = f"GET {login_details.mount_point} HTTP/1.1\r\nUser-Agent: {useragent}\r\n"
        authotization_string = f"Authorization: Basic {ntrip_user}\r\n"
        mountPointString+=authotization_string
        hostString = f"Host: {login_details.ntrip_url}:{login_details.ntrip_port}\r\n" 
        mountPointString+=hostString
        mountPointString+="Ntrip-Version: Ntrip/2.0\r\n"
        mountPointString+="\r\n"

        request_header = bytes(mountPointString,'ascii')
        socket.sendall(request_header)

username = my username, password = polaris authorization key, mount_point = 'POLARIS', useragent= NTRIP Python, ntrip_url= 'polaris.pointonenav.com', ntrip_port = 2102. I am getting error - broken pipe.

0

There are 0 best solutions below