Giter Site home page Giter Site logo

ntrip's Introduction

Ntrip

Simple NTRIP caster/client/server example programs, support the NTRIP 1.0/2.0 protocol;

Quick Start

This assumes you are running Ubuntu 16.04

Clone and run the build:

$ git clone https://github.com/hanoi404/ntrip && cd ntrip
$ make all

First step, run the ntrip_caster_exam:

$ ./ntrip_caster_exam

Second step, run the ntrip_server_exam:

$ ./ntrip_server_exam

Third step, run the ntrip_client_exam:

$ ./ntrip_client_exam

After the above steps are completed, you can see that the example data sent by NtripServer flows to NtripClient through NtripCaster.

CMake

Linux

Configure and compile:

$ mkdir build && cd build
$ cmake .. -DNTRIP_BUILD_EXAMPLES=ON
$ make

Output executable file:

build/examples/ntrip_caster_exam
build/examples/ntrip_client_exam
build/examples/ntrip_client_to_ntrip_server_exam
build/examples/ntrip_server_exam

Windows

VS2019

Configure and compile:

$ mkdir build && cd build
$ cmake .. -G "Visual Studio 16" -DNTRIP_BUILD_EXAMPLES=ON
$ cmake --build . --config Release

Or open build/ntrip.sln with VS2019 after the configuration is complete.

Output executable file:

build/examples/Release/ntrip_caster_exam.exe
build/examples/Release/ntrip_client_exam.exe
build/examples/Release/ntrip_client_to_ntrip_server_exam.exe
build/examples/Release/ntrip_server_exam.exe

MinGW

Configure and compile:

$ mkdir build && cd build
$ cmake -G "Unix Makefiles" .. -DNTRIP_BUILD_EXAMPLES=ON
$ make

Output executable file:

build/examples/ntrip_caster_exam
build/examples/ntrip_client_exam
build/examples/ntrip_client_to_ntrip_server_exam
build/examples/ntrip_server_exam

for using NtripCaster, Add configuration option -DNTRIP_BUILD_CASTER=ON.

ntrip's People

Contributors

sevensx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ntrip's Issues

make all报错

make all 之后报错 :
cmake_definition.h: No such file or directory

User List

Nice Caster you wrote!

Is ist possible to add a Userlist to this caster? It would be nice if you could add a list of users who are allowed to subscribe to different mountpoints

Maybe something like a ini or yaml file to configure users?

Kind regards

potentially wrong respone after mountpoit registration

I tried to use the ntrip_caster together with this ntripserver.

I started the server similar to the following call to forward RTCM data from local serial interface to the caster:
./ntripserver -M 1 -i /dev/ttyACM0 -O 1 -a <server-ip> -p <port> -m RTCM32 -n <user> -c <password> -N 'STR;RTCM32;RTCM32;RTCM 3.2;1004(1),1005/1007(5),PBS(10);2;GPS;SGNET;CHN;31;121;1;1;SGCAN;None;B;N;0;;'

The ntripserver complains about:
ERROR: Destination caster's reply is not OK: ICY 200 OK
Ntrip Version 2.0 not implemented at Destination caster

After changing ntrip_caster.cc line 481 from
SendData(sock, "ICY 200 OK\r\n", 12);
to
SendData(sock, "HTTP/1.1 200 OK\r\n", 17);
it worked.

I can not judge if my proposed change is according to Ntrip Version 2.0 correct, but the ntrip_caster works with it for my use case. Even using the casted Ntrip data with gpsd on a different machine with a call similar to the following works:
gpsd -N -G -D3 -n ntrip://<user>:<password>@<server-ip>:<port>/RTCM32 /dev/ttyACM1

Anyhow, thank you for providing the nice code!

possibly incorrect implementation of chunks

It seems to me that in the server chunks there is no hexadecimal length of the chunk before the chunk data and CRLF after the data
as described in rfc2616:

3.6.1 Chunked Transfer Coding
The chunked encoding modifies the body of a message in order to
transfer it as a series of chunks, each with its own size indicator,
followed by an OPTIONAL trailer containing entity-header fields. This
allows dynamically produced content to be transferred along with the
information necessary for the recipient to verify that it has
received the full message.
Chunked-Body = chunk
last-chunk
trailer
CRLF
chunk = chunk-size [ chunk-extension ] CRLF
chunk-data CRLF
chunk-size = 1
HEX
last-chunk = 1*("0") [ chunk-extension ] CRLF
chunk-extension= *( ";" chunk-ext-name [ "=" chunk-ext-val ] )
chunk-ext-name = token
chunk-ext-val = token | quoted-string
chunk-data = chunk-size(OCTET)
trailer = *(entity-header CRLF

Sourcetable can't be queried

The Method SendSourceTable was defined but never used. Your caster looks pretty nice to me but it is not fully implemented.
kind regards

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.