Giter VIP home page Giter VIP logo

map's People

Contributors

baemull avatar

Watchers

 avatar  avatar

Forkers

lezabour

map's Issues

GPS-Abfrage über UDP

Die Abfrage der GPS werte nicht über Telnet sondern UDP

http://www.catb.org/gpsd/gps2udp.html

gps2udp [-h] [-n] [-j] [-a] [-u hostname:udpport] [-c count] [-d 1|2] [-v] [server [:port [:device]]]
DESCRIPTION

gps2udp is a tool to connect to gpsd and output the received sentences to one or many UDP host:port destinations. This makes the program useful for feeding AIS information from gpsd to aishub, marinetraffic, shipfinder,...

gps2udp does not require root privileges, and can be run concurrently with other tools connecting to the local gpsd without causing problems.

The output will consist of one or both of NMEA (-n option) or JSON (-j option) gpsd sentences. The output is sent to one or many destinations host through a UDP network socket (-u host:port options) .

Optionally a server, TCP/IP port number and remote device can be given. If omitted, gps2udp connects to localhost on the default port (2947) and watches all devices opened by gpsd.

gps2udp may be run as a daemon (-b option).

gps2udp is designed to run smoothly in background; it reconnects automatically to gpsd whenever it is restarted. For debugging purporses, there is an option to exit gracefully after a given count of packets (-c option).
OPTIONS

-h makes gps2udp print a usage message and exit.
-n causes NMEA sentences to be output.
-j causes JSON sentences to be output.
-u host:port UDP destination for output sentenses (up to five destinations).
-a output only AIS messages.
-b causes gps2udp to run as a daemon.
-c [count] causes [count] sentences to be output. gps2udp will then exit gracefully.
-d 1 prints sent packet on stdout.
-v prints the version, then exits.
EXAMPLE

With a running gpsd accessible on the network

gps2udp -d 1 -n -u data.aishub.net:2222 will collect data from localhost:gpsd display them on stdout and send a copy to test aishub in NMEA format.

gps2udp -a -n -b -u data.aishub.net:2222 -u 5.9.207.224:5321 -u 109.200.19.151:4001 fridu.net:2947 will collect data from a remote gpsd located on fridu.net host, will filter AIS messages and send them to 3 destination (aishub, marinetraffic, shipfinder) in NMEA format, command is running in background mode

detectRetina true setzen

If true and user is on a retina display, it will request four tiles of half the specified size and a bigger zoom level in place of one to utilize the high resolution

Javascript auslagern

Initialisierungen für Leaflet in eigene Datei
Code für GPS-Empfang in andere Datei

PHP UDP Receive

http://php.net/manual/de/function.socket-recvfrom.php

Dieses Beispiel erzeugt einen UDP-Socket über Port 1223 des Hosts 127.0.0.1 und gibt höchstens 12 Zeichen aus, die von einem entfernten Host empfangen wurden.

<?php
error_reporting(E_ALL | E_STRICT);

$socket = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
socket_bind($socket, '127.0.0.1', 1223);

$from = '';
$port = 0;
socket_recvfrom($socket, $buf, 12, 0, $from, $port);

echo "$buf von entfernter Adresse $from über den entfernten Port $port empfangen." . PHP_EOL;
?>

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.