gps in wpf
DESCRIPTION
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. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: GPS in WPF](https://reader035.vdocuments.us/reader035/viewer/2022062501/568164cb550346895dd6e90c/html5/thumbnails/1.jpg)
GPS in WPFStudents: Ziv Dayan & Viki Kravchenko
Instructor: Viktor Kulikov
![Page 2: GPS in WPF](https://reader035.vdocuments.us/reader035/viewer/2022062501/568164cb550346895dd6e90c/html5/thumbnails/2.jpg)
GPS• Global Positioning System• At least 24 satellites
• Other systems: Galileo, GLONASS, Beidou-2
![Page 3: GPS in WPF](https://reader035.vdocuments.us/reader035/viewer/2022062501/568164cb550346895dd6e90c/html5/thumbnails/3.jpg)
Server
Project Overview
![Page 4: GPS in WPF](https://reader035.vdocuments.us/reader035/viewer/2022062501/568164cb550346895dd6e90c/html5/thumbnails/4.jpg)
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.
![Page 5: GPS in WPF](https://reader035.vdocuments.us/reader035/viewer/2022062501/568164cb550346895dd6e90c/html5/thumbnails/5.jpg)
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
![Page 6: GPS in WPF](https://reader035.vdocuments.us/reader035/viewer/2022062501/568164cb550346895dd6e90c/html5/thumbnails/6.jpg)
NMEA GGA Message Example• $GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,,*47Where:
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 *
![Page 7: GPS in WPF](https://reader035.vdocuments.us/reader035/viewer/2022062501/568164cb550346895dd6e90c/html5/thumbnails/7.jpg)
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)
![Page 8: GPS in WPF](https://reader035.vdocuments.us/reader035/viewer/2022062501/568164cb550346895dd6e90c/html5/thumbnails/8.jpg)
WPF• XAML:
- Extensible Application Markup Language- Example:
<Button> <Button.Background> <SolidColorBrush Color="Blue"/> </Button.Background> <Button.Foreground> <SolidColorBrush Color="Red"/> </Button.Foreground> <Button.Content> This is a button </Button.Content></Button>
![Page 9: GPS in WPF](https://reader035.vdocuments.us/reader035/viewer/2022062501/568164cb550346895dd6e90c/html5/thumbnails/9.jpg)
WPF vs. WinForms• WPF:
- More features and possibilities- Non-standard Applications
• Windows Forms:- Simpler- Easier to find Experts
![Page 10: GPS in WPF](https://reader035.vdocuments.us/reader035/viewer/2022062501/568164cb550346895dd6e90c/html5/thumbnails/10.jpg)
Expression Blend
![Page 11: GPS in WPF](https://reader035.vdocuments.us/reader035/viewer/2022062501/568164cb550346895dd6e90c/html5/thumbnails/11.jpg)
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>
![Page 12: GPS in WPF](https://reader035.vdocuments.us/reader035/viewer/2022062501/568164cb550346895dd6e90c/html5/thumbnails/12.jpg)
Handling XML Document
+getMarkerNames() : ArrayList+getMarkerDetails() : ArrayList+getGroupDetails() : ArrayList+getGroupNames() : ArrayList+writeMarker() : bool
+iconList-cwd : string
MarkerHandler
+clsValidator() : clsValidator+ValidateXMLFile() : bool+ValidationFailed() : void
-m_sXMLFileName : string-m_sSchemaFileName : string-m_objXmlSchemaCollection-m_bIsFailure : bool
clsValidator
Markers.xml: Markers.xsd:
![Page 13: GPS in WPF](https://reader035.vdocuments.us/reader035/viewer/2022062501/568164cb550346895dd6e90c/html5/thumbnails/13.jpg)
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
![Page 14: GPS in WPF](https://reader035.vdocuments.us/reader035/viewer/2022062501/568164cb550346895dd6e90c/html5/thumbnails/14.jpg)
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
![Page 15: GPS in WPF](https://reader035.vdocuments.us/reader035/viewer/2022062501/568164cb550346895dd6e90c/html5/thumbnails/15.jpg)
Put It All Together
clsValidator
binary.pth
Path Select Window
Show Map Window
Record Window
PresentationTier
getPath
Logic Tier PolylineCreator Class
MakeHandlerClass
Validate
Data Tier
read from GPS
reco
rd p
ath writeMarker
getData
createPolyline
MarkersXML
MarkersXSD
save
path Validateread/write
read file
![Page 16: GPS in WPF](https://reader035.vdocuments.us/reader035/viewer/2022062501/568164cb550346895dd6e90c/html5/thumbnails/16.jpg)
The GUI• Let’s run the program and see for
ourselves!
![Page 17: GPS in WPF](https://reader035.vdocuments.us/reader035/viewer/2022062501/568164cb550346895dd6e90c/html5/thumbnails/17.jpg)
Thank you for your attention!