[Olsr-dev] Including GPS information
Sven-Ola Tücke
(spam-protected)
Sat Aug 2 10:34:47 CEST 2008
As an addendum: The file format of the output socket file is not well
documented. It's optimized for browser javascript inclusion. Just write a new
function for every line, the latlon.js socket spits out. Examples:
# This is a link between two nodes (IPa and IPb) with
# LQ, NLQ and ETX
Link('104.0.0.17','104.129.11.0',0.757,0.098,13.477);
# This is an alias (the .6 node also has iface with .74)
Mid('104.13.50.6','104.13.1.74');
# This is a node with IP, Lat, Lon, HNA0/0(bool), current defroute and name
Node('104.198.65.97',52.495373,13.454180,0,'104.130.77.80','sven-ola-wap');
# Here we have a link between two nodes, both geopos is known
# Same as link + 2 times Lat/Lon. The PLink makes is more easy to
# write shell scripts with this output, because of slow associative arrays
PLink('104.12.0.43','104.12.1.2',0.776,0.843,1.527,52.548382,13.445141,0,52.548439,13.447248,0);
# And there is the "localhost" information for use in typical map
Self('104.198.65.65',52.495350,13.454140,0,'104.130.77.80','sven-ola-gs');
I also attach a sample how to convert the JS output to KML (google earth)
using a plain shell with sed. Not too fast (on a PC you may want perl or
python)
HTH
// Sven-Ola
Am Samstag 02 August 2008 10:09:11 schrieb Sven-Ola Tücke:
> Hey,
>
> that is an easy task, since it's all build in the nameservice plugin and
> only needs to be configured. Here are two example snippets from olsrd.conf
> with comments:
>
> <static positon example>
> LoadPlugin "olsrd_nameservice.so.0.3"
> {
> # the name to be flooded for my pc (note: no dots)
> PlParam "name" "sven-ola-pcacer"
> # the file name for the hosts file (is written regulary and
> # I don't want olsrd to overwrite /etc/hosts because I have
> # a lot of customized ip addrs written down there
> PlParam "hosts-file" "/var/run/hosts"
> # as a security measure, each name in the hosts file
> # has a suffic - hence no "DNS spoofing" possible
> PlParam "suffix" ".olsr"
> # elongate the interval for nameservice flooding msgs
> PlParam "interval" "180"
> # elongate the time the flooded msgs are valid in the mesh
> PlParam "timeout" "3600"
> # location of the socket file where received geopos can be grabbed
> # e.g. "cat /var/run/latlon.sh |
> /usr/local/bin/anyscriptyoulike.sh" PlParam "latlon-file"
> "/var/run/latlon.js"
> # the gps position to flood into the mesh
> PlParam "lat" "52.495332"
> PlParam "lon" "13.454122"
> }
> </static position example>
>
> <dynamic posistion example>
> LoadPlugin "olsrd_nameservice.so.0.3"
> {
> PlParam "name" "sven-ola-gs"
> PlParam "hosts-file" "/var/etc/hosts"
> PlParam "suffix" ".olsr"
> PlParam "interval" "180"
> PlParam "timeout" "3600"
> # Instead of using a static position in olsrd.conf (which
> # requires restarting olsrd if you want to change that
> # this config param allows you to (regulary) write the
> # position in the configured text file - e.g. convince your
> # gps receiver softs to write current pos into that file
> PlParam "latlon-infile" "/var/run/latlon.txt"
> PlParam "latlon-file" "/var/run/latlon.js"
> }
> </dynamic position example>
>
> The only drawback with the nameservice plugin: it uses flooding by default
> with relatively slow information spreading. Suitable for standard
> pedestrian mounted nodes I presume. For car/plane-based nodes you may need
> unicast (grab GPS via http or so)
>
> While writing this, I investigated doppler shifts with wifi channels. Is
> wlan ok to handle 100km/h delta-V? Well, the speed diff between
> (spam-protected) and (spam-protected) should be *calccalccalc*:
>
> 2.412 GHz / 2.417 GHz * 1.08 Tmh - 1.08 Tmh == 0.0022 Tmh
>
> OK - should be fine. 0.002 Terameters/hours is fast enough. To make sure
> I've googled a bit and found this:
>
> http://energiaycomputacion.univalle.edu.co/edicion25/25art5.pdf
>
> But there should be protocol probs because a 150 Kmh car is very fast out
> of reach <ggg>
>
> HTH,
> // Sven-Ola
>
> Am Freitag 01 August 2008 23:39:55 schrieb Resul Cetin:
> > Hello People,
> >
> > I want to include GPS Information to OLSR. Im thinking to check the GPS
> > Koordinates before Flooding and send the Flooding maybe to nodes, which
> > is closer to the sending node. Im planning to read the GPS Koordinates
> > serial with a GPS receiver.
> >
> > I read in a previous messages, that sven ola already programed a file
> > "/var/run/latlon.txt." where you can type the Koordinates.
> >
> > But I couldnt find it. Could somebody tell me where I can find this file.
> >
> > greetings,
> > elturco
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cgi-bin-map.kml
Type: application/vnd.google-earth.kml+xml
Size: 2494 bytes
Desc: not available
URL: <http://lists.olsr.org/pipermail/olsr-dev/attachments/20080802/50a57303/attachment.kml>
More information about the Olsr-dev
mailing list