Presentation is loading. Please wait.

Presentation is loading. Please wait.

How to Implement Real Time Vehicle/Asset Tracking within the Smallworld GIS Application Presented By: Mark Field Field Consulting and Services, Inc.

Similar presentations


Presentation on theme: "How to Implement Real Time Vehicle/Asset Tracking within the Smallworld GIS Application Presented By: Mark Field Field Consulting and Services, Inc."— Presentation transcript:

1 How to Implement Real Time Vehicle/Asset Tracking within the Smallworld GIS Application Presented By: Mark Field Field Consulting and Services, Inc.

2 How to Implement Real Time Vehicle/Asset Tracking within the Smallworld GIS Application 2 Requirements Need to quickly update graphics system. Need to quickly update graphics system. – In the order of less then 1 second. Our requirement was to show 1000+ updatable entities, Our requirement was to show 1000+ updatable entities, Support selection of entities. Support selection of entities. Support multiple symbols depending on type of entity. Support multiple symbols depending on type of entity.

3 How to Implement Real Time Vehicle/Asset Tracking within the Smallworld GIS Application 3 Limitations with Smallworld Core Spatial Technology Slow refresh. Slow refresh. – Approximately 5 seconds to draw basic geometry – Approximately 10 seconds to draw with rasters. Even refreshing just bounds of 1000+ entities would be slow. Even refreshing just bounds of 1000+ entities would be slow. – As well as distracting. Add-on geometry drawing is limited. Add-on geometry drawing is limited. – Must provide data to databus in Smallworld Core Spatial Technology (CST) 4 with :geometry_to_draw or :post_render_sets

4 How to Implement Real Time Vehicle/Asset Tracking within the Smallworld GIS Application 4 FCSI Solution Overview Basic idea: DOUBLE BUFFERING Basic idea: DOUBLE BUFFERING – Real time technique to draw data in memory, and pop the frame to the view. – Prevents the noticeable drawing of individual features, which contribute to flickering. Double Buffering Example Double Buffering Example Double Buffering Example Double Buffering Example

5 How to Implement Real Time Vehicle/Asset Tracking within the Smallworld GIS Application 5 FCSI Solution Overview Use a memory canvas to record what has been drawn by the GIS. Use a memory canvas to record what has been drawn by the GIS. Store the base memory canvas. Store the base memory canvas. Draw the vehicle positions on a copy of the memory canvas. Draw the vehicle positions on a copy of the memory canvas. Display the modified memory canvas to the user Display the modified memory canvas to the user Exemplar: fcsi_fast_display Exemplar: fcsi_fast_display

6 How to Implement Real Time Vehicle/Asset Tracking within the Smallworld GIS Application 6 Canvas Copying SWAF canvas after refresh is complete Copy canvas to memory_canvas Draw Geometries on memory_canvas Replace modified memory_canvas to SWAF canvas Update loop

7 How to Implement Real Time Vehicle/Asset Tracking within the Smallworld GIS Application 7 Memory Canvas Details Need to know when refresh is started. Need to know when refresh is started. – For pre-CST 4: dependency of graphics system, (:start_refresh) – For CST 4: databus, (:fcsi_start_refresh) Need to know when the drawing is complete. Need to know when the drawing is complete. – For pre-CST 4: dependency of graphics system, (refreshed) – For CST 4: databus, (: fcsi_end_refresh) post_render_sets doesnt truly work post_render_sets doesnt truly work Store the window to a memory canvas using fcsi_reset_memory_canvas() Store the window to a memory canvas using fcsi_reset_memory_canvas() – Uses memory_canvas.copy_area() Draw vehicle geometry on the memory canvas with fcsi_draw_geoms() Draw vehicle geometry on the memory canvas with fcsi_draw_geoms() – Uses memory_canvas.draw() Copy the memory canvas data to the graphics view canvas. Copy the memory canvas data to the graphics view canvas. – Uses memory_canvas.copy_area()

8 How to Implement Real Time Vehicle/Asset Tracking within the Smallworld GIS Application 8 Geometry Details Dynamic Geometry is stored in.fcsi_geoms Dynamic Geometry is stored in.fcsi_geoms Styles for dynamic geometry stored in.fcsi_styles. Styles for dynamic geometry stored in.fcsi_styles. –.fcsi_geoms[n] uses.fcsi_styles[n] style Need to get handles to symbology. Need to get handles to symbology. – Get handle to a symbol from the style system, or – Create symbol, or – For point symbols, can be basic sector data with line style that can be used as a point symbol. Loop over the geometry you want to draw and use memory_canvas.draw() with style. Loop over the geometry you want to draw and use memory_canvas.draw() with style. Any geometry and style can be drawn, points, lines, areas, etc. Any geometry and style can be drawn, points, lines, areas, etc.

9 How to Implement Real Time Vehicle/Asset Tracking within the Smallworld GIS Application 9 Example Display Details fcsi_pvd_menu exemplar fcsi_pvd_menu exemplar – Simple example of fcsi_fast_display. – Creates/stores routes from node to node – Allows you to select a dynamic geometry Open GUI: Open GUI: – fcsi_pvd_menu.open(grs) or – fcsi_pvd_menu.open(appl) Set Manifold Set Manifold – Select geometry – Set Manifold Interactively create routes using trail. Interactively create routes using trail. – Create 2 point trail identifying start and end nodes for route. – Or randomly create routes using trail bounds Use fcsi_get_test_paths(num) Use fcsi_get_test_paths(num)

10 How to Implement Real Time Vehicle/Asset Tracking within the Smallworld GIS Application 10 Example Display Details (cont.) Set Delay (milliseconds) Set Delay (milliseconds) Run. Run. – The engine loop calculates new coordinate along route by 5m. – Updates the.fcsi_geoms slot with new coordinates. – Calls fast_display.fcsi_update_view(). – Sleeps for the given delay. Select dynamic geometry. Select dynamic geometry. – Pauses engine loop. – Selects closest coordinate in.fcsi_geoms list.

11 How to Implement Real Time Vehicle/Asset Tracking within the Smallworld GIS Application 11 Extending Implementation Can realistically be any process, internal or external (ACP). Can realistically be any process, internal or external (ACP). Example code moves the current location 5m down trace result, but can be any type of data. Example code moves the current location 5m down trace result, but can be any type of data. Future Updates Future Updates – Pause when panning/zooming Would need dependency of current_state of the application. Would need dependency of current_state of the application. – After new selection – recreate base memory canvas Contact FCSI Contact FCSI – info@field-csi.com info@field-csi.com – 407-275-9351

12 How to Implement Real Time Vehicle/Asset Tracking within the Smallworld GIS Application 12 Demonstration This demonstration will show 1000 entities. This demonstration will show 1000 entities. There are 1000 paths that have been randomly generated. There are 1000 paths that have been randomly generated. – 1 path for 1 entity Each iteration of the main loop: Each iteration of the main loop: – Updates the position of each entity by 10 meters along each path. – Stores updated coordinate and distance in ropes – At end of all updates, display results The road works symbol is a basic X from the style system. The road works symbol is a basic X from the style system. Simple selection of entity will report its ID (position in rope). Simple selection of entity will report its ID (position in rope).


Download ppt "How to Implement Real Time Vehicle/Asset Tracking within the Smallworld GIS Application Presented By: Mark Field Field Consulting and Services, Inc."

Similar presentations


Ads by Google