1 / 17

GPS in WPF

GPS in WPF. Students: Ziv Dayan & Viki Kravchenko Instructor: Viktor Kulikov. GPS. Global Positioning System At least 24 satellites Other systems: Galileo, GLONASS, Beidou-2. Project Overview. Uses.

marius
Télécharger la présentation

GPS in WPF

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. GPS in WPF Students: Ziv Dayan & VikiKravchenko Instructor: Viktor Kulikov

  2. GPS • Global Positioning System • At least 24 satellites • Other systems: Galileo, GLONASS, Beidou-2

  3. Project Overview

  4. Uses • Sitting in a train, recording the route and saving a marker on each train station. Thus getting a view of the train system in Israel. • Recording a walking path in one’s neighborhood, marking all favorite café shops, parks and bus stations.

  5. NMEA 0183 • The National Marine Electronics Association • A combined electrical and data specification for communication between marine electronic devices such as echo sounder, sonars, anemometer (wind speed and direction), autopilot, GPS receivers and many other types of instruments

  6. NMEA GGA Message Example • $GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,,*47 Where: GGA Global Positioning System Fix Data 123519 Fix taken at 12:35:19 UTC 4807.038,N Latitude 48 deg 07.038' N 01131.000,E Longitude 11 deg 31.000' E 1 Fix quality: 0 = invalid 1 = GPS fix (SPS) 2 = DGPS fix 3 = PPS fix 4 = Real Time Kinematic 5 = Float RTK 6 = estimated (dead reckoning) (2.3 feature) 7 = Manual input mode 8 = Simulation mode 08 Number of satellites being tracked 0.9 Horizontal dilution of position 545.4,M Altitude, Meters, above mean sea level 46.9,M Height of geoid (mean sea level) above WGS84 ellipsoid (empty field) time in seconds since last DGPS update (empty field) DGPS station ID number *47 the checksum data, always begins with *

  7. WPF • Windows Presentation Foundation (Avalon) • Separation of Appearance and Behavior • Appearance – XAML • Behavior – programming language (C#, Visual Basic, etc.) • Highly customizable • Resolution independence (logical units)

  8. WPF • XAML: • - Extensible Application Markup Language • - Example: <Button> <Button.Background> <SolidColorBrushColor="Blue"/> </Button.Background> <Button.Foreground> <SolidColorBrushColor="Red"/> </Button.Foreground> <Button.Content> This is a button </Button.Content> </Button>

  9. WPF vs. WinForms • WPF: - More features and possibilities - Non-standard Applications • Windows Forms: - Simpler - Easier to find Experts

  10. Expression Blend

  11. Databases • Paths are saved in binary files (*.pth), such that the path’s name is the file’s name. • Markers are saved in a XML document. <?xml version=”1.0” encoding=”utf-8” ?> <Markers> <Marker> <Name>Café Greg</Name> <Latitude>32.7763</Latitude> <Longitude>35.0249</Longitude> <Type>cafe</Type> </Marker> <Marker> <Name>Fishbach Computer Farm</Name> <Latitude>32.777</Latitude> <Longitude>35.0245</Longitude> <Type>computer</Type> </Marker> </Markers>

  12. Handling XML Document

  13. Google Static Map API • Sending a query with location, map and feature parameters. http://maps.google.com/maps/api/staticmap?center=Brooklyn+Bridge,New+York,NY&zoom=14&size=512x512&maptype=roadmap&markers=color:blue|label:S|40.702147,-74.015794&markers=color:green|label:G|40.711614,-74.012318&markers=color:red|color:red|label:C|40.718217,-73.998284&sensor=false • Receiving a response containing a static picture of the requested map. • Limitation of 2048 characters. • Use Polylines to overcome this limitation – PolylineCreator Class

  14. Polyline Example • Original list of points: 37.44601,-122.14934|37.44591,-122.14945|37.44582,-122.14956|37.44571,-122.14964|37.44563,-122.14974|37.44555,-122.14984 • After converting to Polyline: qtpcFjhphVRTPTTNNRNR

  15. Put It All Together Path Select Window Show Map Window Record Window getPath Presentation Tier writeMarker createPolyline getData record path clsValidator Validate MakeHandler Class PolylineCreator Class Logic Tier read from GPS save path read/write Validate binary .pth Markers XSD Markers XML Data Tier read file

  16. The GUI • Let’s run the program and see for ourselves!

  17. Thank you for your attention!

More Related