1 / 12

How to Implement Real Time Vehicle/Asset Tracking within the Smallworld GIS Application

How to Implement Real Time Vehicle/Asset Tracking within the Smallworld GIS Application. Presented By: Mark Field Field Consulting and Services, Inc. Requirements. Need to quickly update graphics system. In the order of less then 1 second.

ferris
Download Presentation

How to Implement Real Time Vehicle/Asset Tracking within the Smallworld GIS Application

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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

  3. Limitations with Smallworld Core Spatial Technology™ • 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. • As well as distracting. • 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 How to Implement Real Time Vehicle/Asset Tracking within the Smallworld GIS Application

  4. FCSI Solution Overview • 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 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. • Store the base memory canvas. • Draw the vehicle positions on a copy of the memory canvas. • Display the modified memory canvas to the user • Exemplar: fcsi_fast_display 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 How to Implement Real Time Vehicle/Asset Tracking within the Smallworld GIS Application

  7. Memory Canvas Details • 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. • For pre-CST 4: dependency of graphics system, (refreshed) • For CST 4: databus, (: fcsi_end_refresh) • post_render_sets doesn’t truly work • 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() • Uses memory_canvas.draw() • Copy the memory canvas data to the graphics view canvas. • Uses memory_canvas.copy_area() How to Implement Real Time Vehicle/Asset Tracking within the Smallworld GIS Application

  8. Geometry Details • Dynamic Geometry is stored in .fcsi_geoms • Styles for dynamic geometry stored in .fcsi_styles. • .fcsi_geoms[n] uses .fcsi_styles[n] style • 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. • Any geometry and style can be drawn, points, lines, areas, etc. How to Implement Real Time Vehicle/Asset Tracking within the Smallworld GIS Application

  9. Example Display Details • 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: • fcsi_pvd_menu.open(grs) or • fcsi_pvd_menu.open(appl) • Set Manifold • Select geometry • Set Manifold • 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) How to Implement Real Time Vehicle/Asset Tracking within the Smallworld GIS Application

  10. Example Display Details (cont.) • Set Delay (milliseconds) • 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. • Pauses engine loop. • Selects closest coordinate in .fcsi_geoms list. 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). • Example code moves the current location 5m down trace result, but can be any type of data. • Future Updates • Pause when panning/zooming • Would need dependency of “current_state” of the application. • After new selection – recreate base memory canvas • Contact FCSI • info@field-csi.com • 407-275-9351 How to Implement Real Time Vehicle/Asset Tracking within the Smallworld GIS Application

  12. Demonstration • This demonstration will show 1000 entities. • There are 1000 paths that have been randomly generated. • 1 path for 1 entity • 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. • Simple selection of entity will report it’s ID (position in rope). How to Implement Real Time Vehicle/Asset Tracking within the Smallworld GIS Application

More Related