Home

Einer von Vielen

  • Find your friends on a map

    ...share your geo-location with friends. How?

    1. Open http://jfellow.net/geo5/
    2. Press "You", then enter your username, password and group. Use the same group name as your friends!

    That's it.
    Now your friends see you and you see your friends.

    http://jfellow.net/geo5/ is a test server. You can download and run this service on your own server. It's open source.

    It was never easier to share your position with friends.
    - Build groups, all group members see each other automatically.
    - No registration, no installation, no spyware.
    - Advanced: Tracks, routing (planned).

    Off topic: I would like to recommend the Red Matrix, a new revolutionary decentralised network.


    Content

    A Software for Rockers?

    ...or why to use this software?

    It's about privacy. Reclaim the internet from authorities and companies!

    A quite drastic scenario: Imagine you are a rocker gang. Where are the other members? Still on their mission? Did they take the right route?

    Why not using Google+ to share your position?
    It's centralized and all is recorded for good in big databases.

    Be a (digital) rocker!
    Mushrooms runs on your own server. You are in control of the service and your data.

    There are no backdoors. You can check the code.
    And its free.

    How...to install?

    1. Make sure you have a php enabled webserver, let's name it http://example.com/
    2. Copy geo5.zip on your server and unzip to http://example.com/geo5/.
    3. Test it! Open http://example.com/geo5/ in a browser (not IE).
    4. Expected Result: You should see a map with a marker.

    How...to use?

    Make sure the server is running somewhere as described above.
    Alternatively you can use this test server: http://jfellow.net/geo5/

    You just want to see each other on a map

    This is the default way to share positions and tracks.
    1. Open http://jfellow.net/geo5/
    + Press "You" (blue button)
    + Enter
    * user name
    * password
    * group (optional to see each other)

    Alternatives to send positions

    You can separate sending and viewing. Please:

    • use different user names for sending (app) and viewing (browser), or
    • in the browser: Press "You" > "Position" > Choose "Build-in browser position"
      ...if you use other programs (apps) to send positions.

    Geo5 as Sender

    1. Download and install geo5.apk on your Android device.
    2. Enter
      • user name
      • password (optional)
      • group (optional)
      • server url: http://jfellow.net/geo5/geo5.php
      • interval gps position (change if needed)
      • interval server upload (change if needed)
    3. Press Start button.
    4. Expected result: The device will search for GPS and starts to send its geo location to the server.
    5. View the position and track in the browser.

    Geo5 app is specialized for sending:
    * Send GPS positions
    * user / password (optional) / group (optional)
    * Use a server of your choice
    * Seperate values for GPS update and send intervall
    * Cache positions in case internet connection is lost
    * Save positions to SD card if no internet connection when the program closes

    OSMand as Sender

    1. Download and install OSMand on your Android device.
    2. As online tracking URL use http://jfellow.net/geo5/geo5.php?lat={0}&lon={1}&time={2}&speed={5}&altitude={4}&user=you&pass=secret&group=yourgroup&storeTrack=true
    3. Start the tracking.
    4. Don't forget to activate: online tracking and sleep mode
    5. Expected result: OSMand will start to send its geo location to the server.
    6. View the position and track in the browser.

    Another (second) Browser as Sender

    You can even use the address bar of a browser to send your position:
    http://jfellow.net/geo5/geo5.php?user=you&pass=secret&group=yourgroup&lat=48.1375&lon=11.5755&speed=50&altitude=530.75&accuracy=18&time=1378655632757&storeTrack=false
    Of course you can draw a track if you use "storeTrack=true".

    How...to get involved?

    Please help by contributing ideas, bug fixes and modifications. Fun is guaranteed.

    At the moment the version control (git) is open for changes. You must be logged on at sourceforge to modify (update) files.

    Features

    Available

    Browser (Sender and Viewer)

    Can be a mobile as well.
    * Login with user/password/group
    * Show your position and that of your friends
    * Send your position (and track)
    * Show tracks
    * Live tracking (refresh position and track)
    * Show all members of a group (names, positions, tracks)
    * Show/hide users of a group
    * Choose a user to follow
    * Show details of selected user: last update time, speed, altitude,..
    * Change map type (OSM and Cycle map at the moment)
    * Builds upon other open-source libraries from openlayers
    * Configure browser and server settings (select marker icon, marker size, timezone offset, decay time)

    Android-App (Sender)

    Generally you are free to use other apps (as OSMand) to send the GPS positions. You can even use the address bar of your browser to send your position:
    http://jfellow.net/geo5/geo5.php?user=you&pass=secret&group=yourgroup&lat=48.1375&lon=11.5755&speed=50&altitude=530.75&accuracy=18&time=1378655632757

    Server

    The server is the glue between sender and viewer, your "cloud".
    * Store positions from the sender (mobile device)
    * Create tracks
    * Deliver positions and tracks to the viewer (browser)
    * Deliver parts of tracks (only what is new when the user is moving)
    * Deliver all tracks of a user, one track per day
    * Create users (name, password, group)
    * Change password and group of a user
    * Delete a user including all data: positions, tracks, login,..
    * Delete old tracks and users that are not active. The decay time is configurable.
    * Configuration via config file. (The user can set them via Browser)
    * PHP 5.x
    * File based storage (no database needed)
    * A seperate directory for each user

    Planned

    Keep in mind that this programm follows the KISS principle... Keep It Simple, Stupid:
    ...The KISS principle states that most systems work best if they are kept simple rather than made complex...

    Optimization for mobile devices
    * Store maps for offline usage (localStorage).

    Routing
    Might work like this
    * Select one or more users (this will be the starting points)
    * Give a destination (click on map or address search)
    * Start calculating the routes (calls a webservice)
    * Draw all routes, starting from every (seleted) user
    * Show and center the shortest route (move/zoom)
    * Configurate: decay time, distance (air line)
    Routing might use pgrouting (browser client).

    Deploy as app for MozillaOS
    Why? The browser stops measuring the positions as soon as you leave the webpage. We have to wait until the browsers integrate this "service" like feature or use an app for MozillaOS.

    Support more Senders
    ...At the moment the Android apps Geo5 and OSMand are supported/tested. Add more!

    Stopped

    Separate page for settings and administration, see http://jfellow.net/geo5/admin.html (do not use IE)
    * Change groups and passwords
    * Configure web frontend (browser)
    * Serve as documentation of the interfaces (communication) between sender-server as well as viewer-server by logging requests and responses

    FAQ

    How to create a group?

    Use the same group name for all group members. They will see each other automatically in the browser.

    Technical Documentation

    Send Positions to the Server

    Single Position

    The server script 'geo5.php' expects the following parameters

    • user... mandatory as GET/POST
    • pass... mandatory as GET/POST
    • group... optional as GET/POST
    • lat... mandatory latitude as GET/POST
    • lon... mandatory longitude as GET/POST
    • altitude... optional as GET/POST
    • accuracy... optional as GET/POST
    • storeTrack... optional as GET/POST, "true" or "false" allowed
    • time... optional as GET/POST. If ommited the server will generate a date/time. Expected values are in UTC time either 1) as seconds/milliseconds (since 01.01.1970), or 2) something like 2013-03-25T21:17:33.123 or 2013-03-25_14:43:01 (the server tries to guess it).

    Example
    http://jfellow.net/geo5/geo5.php?user=you&pass=secret&group=yourgroup&lat=48.1375&lon=11.5755&speed=50&altitude=530.75&accuracy=18&time=1378655632757

    All parameter can be sent as GET or POST parameters or a mixture of GET and POST.

    More than one Position at once

    Parameters:

    • user... mandatory as GET/POST
    • pass... mandatory as GET/POST
    • group... optional as GET/POST
    • storeTrack... optional as GET/POST, "true" or "false" allowed
    • positions... mandatory as POST only. Contains lat, lon, time, accuracy, speed

    The value of 'positions' is a multiline CSV, each line containing one position.

    Example value for the parameter 'positions':

    lat=43.50457163540115;lon=11.071390274487026;bearing=171.61432;speed=0.7065948;altitude=1067.652498529502;accuracy=6.0;time=2012-03-03T15:48:47.484
    lat=44.50457163540115;lon=11.071390274487026;bearing=171.61432;speed=0.7065948;altitude=1067.652498529502;accuracy=6.0;time=2012-03-03T15:48:47.484

    Timezones

    Sender (usually an App) - UTC

    The sender has to send UTC time to the server.The date/time can be seconds or milliseconds (1970) or in the format 2013-03-26T17:08:48.

    Server - UTC

    The PHP script on the server expects the date/time as UTC time.
    The server will allways convert and store the date/time in the format 'Y-m-d\TH:i:s'.
    You can configure the server to use a timezone offset. It will use this timezone offset to split tracks into days if tracks stretching over midnight.

    Viewer (Browser) - UTC to Local Time

    The browser shows the last position as local time. How?
    The JavaScript in the browser gets the UTC time in the format 'Y-m-d\TH:i:s' from the server. It will use the timezone offset of the browser and converts the UTC time to local time.

    Principles

    Tracks and Browser

    The browser can:

    • write a track itself (using the build-in geolocation)
    • receive track by the server

    What if the user switches between build-in and server?
    The solution: The browser remembers the timestamp of the last drawn track point.

    • Browser writes the track: It sends only new track points to the server.
    • Browser receives the track: The browser requests track updates. The request contains the timestamp of the last received/drawn track point. The server sends only track points after this timestamp.

    Handling of errors
    The browser fails to send the track.

    • The browser buffers all track points (error or no error)
    • The browser remembers the timestamp of the last successfull post (send) to the server. The browser allways tries to send all track points after this timestamp.

    Handling of errors
    The browser fails to send the track. The track stretches over serveral days.

    • Same as described above and...
    • The browser knows the start date of the track in the buffer, lets say 2013-10-10.
    • The browser successfully sends the whole track containing track points 2013-10-10, 2013-10-11, 2013-10-12 (= today).
    • The browser removes all track points 2013-10-10, 2013-10-11 in its buffer.
    • The browser draws all track points of today (2013-10-12) or nothing if 2013-10-12 is not today.

    Automated Tests

    PHP Server

    http://jfellow.net/geo5/test_util.php

    The test are quite extensive. Almost every line of code is covered (hopefully).

    Browser

    http://jfellow.net/geo5/index.html?test=true

    You have to be patient and wait for the results. Why? The tests wait quite often for the server response. The wait times are fixed.

    The tests cover the main functionality under the hood and helper functions. The GUI is not tested.

    Implementation under Linux

    A word on Windows
    Netbeans along with a WAMP-Server to debug the PHP-Server works seemlessly.

    Prerequisits

    The following combination should make no trouble.

    • Linux Mint, recent Version
    • Eclipse
    • Apache with PHP and XDebug (not Zend)

    Debug PHP on Debian/Mint and Eclipse

    Preparation
    http://docs.joomla.org/Configuring_Xdebug_for_PHP_development/Linux

    First Project (Mushrooms)

    • Install the Git Repostitory locally under /var/www/geo5/

      git clone ssh://tomwie@git.code.sf.net/p/geo5/code geo5-code

    • Create Eclipse Workspace under /var/www/
    • New PHP-project
    • debug as xdebug

    Next Projects (beside Mushrooms)

    • git clone
    • New PHP project with existing sources Eclipse workstpace under /var/www/
    • "debug as", xdebug with new debug configuration
    • mount local git

    History

    All changes are tracked by the git https://sourceforge.net/p/geo5/code/ci/master/tree/

    Errors and feature request are tracked by tickets https://sourceforge.net/p/geo5/tickets/

    27.03.2014

    09.01.2014

    26.12.2013

    25.12.2013

    23.12.2013

    21.12.2013

    15.12.2013

    03.12.2013

    02.12.2013

    23.11.2013

    20.11.2013

    17.11.2013

    16.11.2013

    13.11.2013

    11.11.2013

    10.10.2013

    • "Relaunch" of the browser version. New for the user: Just open the webpage if you want to share your position with friends. There is no need for an "external" app (on a mobile device) any more.
    • Started the blog

    older

    • Automated tests for the browser that can be run by http://jfellow.net/geo5/index.html?test=true They will run about half a minute. Tip: You can open the developer tool by pressing F12 (Firefox and Chrome) and watch the network traffic (requests and responses) during the tests.
    • New design of the browser (buttons to set user, pass,...)
     
    Last edit: Einer von Vielen 2014-04-11