live monitoring
play

Live monitoring of ski tracks in Norway Cross-country skiing The - PowerPoint PPT Presentation

Live monitoring of ski tracks in Norway Cross-country skiing The problem Snow grooming Where does it occur and when? A spatiotemporal problem alreaday solved? Google, Runkeeper, Nike etc. Ski-specific solutions:


  1. Live monitoring of ski tracks in Norway

  2. Cross-country skiing

  3. The problem • Snow grooming • Where does it occur and when? • A spatiotemporal problem

  4. … alreaday solved? • Google, Runkeeper, Nike etc. • Ski-specific solutions: Skisporet.no ++ • … why do it?

  5. Solution overview Server Web Application Snow groomer + Tracking unit

  6. The solution • GNSS unit + network connection • A server • One developer • A bunch of open source projects

  7. 1. Tracking unit • Arduino • GPS/3G shield • Serial communication between the two • Wrote “C” application for Arduino • HTTP request to server

  8. • 3D-printed case • Only (half-)useful thing I’ve done with it

  9. 2. Tracking server • Consume, store, analyze position updates => serve ski track info • PostGIS • Apache2 • Libpq • Php Apache PostGIS

  10. Presenting tracks and time

  11. Presenting tracks and time • One track can consist of many Segments segments • Two tracks can share segments • Segments can be split up into an arbitrary number of sub-segments TempSegments /w sub-segment • Based on “temporal segmentation” order info Track

  12. 4D-data in PostGIS • Each position in the network has X, Y, Z and M • Spatial + Temporal dimension • But not so easy to selectively update M-dimension of MultPoint and MultiLinestring..

  13. PostgreSQL Extension • Quite easy if you keep to PL/PgSQL “programming” • Put SQL file + Control file in: /usr/share/postgresql/9.3/extension/ • CREATE EXTENSION langeland • Voila – new functions

  14. Skitrack Extension • LS_BuildTimeline • LS_UpdateTimelineAtPoint • LS_NForMostRecentPoint • LS_SegmentMeanTime • +++ • LS_SplitTimeline • Splits up LINESTRINGZM based on temporal aggregation

  15. Triggers Raw positions Segment TempSegment X – Y – Z - Time X – Y – Z - Time X – Y – Z - Time On insert Trigger: On update trigger: LS_BuildTempSegment LS_UpdateTimeline on Where SID = Segment.ID Segment table

  16. Getting the data • Simple REST API with PHP • /langeland/spatiotemporal => Returns all temporary segments as geojson • /langeland/tracks => Returns the track metadata

  17. 3. Web client • Needs to visualize • Ski tracks themselves • Their temporal status • Leaflet – easy it use

  18. Displaying 4D segments 1. Leaflet wont let us draw linestring with varying colours 2. This is why the temporary segment table is needed 3. Tiny, old server => would rather preprocess than generate on the fly

  19. Deployment • November 2014 • Installed and test OK! • Wait for snow

  20. Choices… • Call back tracker • Get new part on Ebay • (possibly?) fix and reinstall • $20 • Install

  21. TK110 • Manual makes no sense • Setup using SMS commands • Is working, but sends wierd data • Server coding again..

  22. • Written by Anton Tananaev from New Zealand • Supports pretty much every low-cost GPS tracker out there • Connects to MySQL, H2 and PostGIS • Now also allows you to use your cellphone • http://www.traccar.org/

  23. Server structure New tracker “H02” Port 5003 Traccar PostGIS + Old tracker Custom Extension Apache2 HTTP POST + libpq

  24. Web application

  25. Tracks • Segments simply dumped to map • For track objects: • Iterate over it’s temporary segments • Append track colour to time bar • Add time + name

  26. System overview Server PostGIS Web application Apache2 Traccar Track layer + Tracking unit

  27. To summarize • Managed to create fully automated tracking system • Also learned: Cheap, optimized hardware from China can be better than my hobby Arduino projects

  28. All thanks to really awesome FOSS(4G) • Traccar • PostGIS • Apache2 • Leaflet • Arduino

  29. Thank you! Kjartan Bjørset kjabjo@norkart.no @kjartanb

Recommend


More recommend