Advanced GPS Information

This sample demonstrates how to use the FileGpsCoordinateWatcher to playback NMEA sentences from a log file to show a location on a map and to display additional information like fix type, satellite counts and PDOP. While this sample uses the FileGpsCoordinateWatcher, it can be replaced with the SerialPortGpsCoordinateWatcher to consume information from a GPS receiver.

Download Sample Application
XAML C# VB.NET
<UserControl x:Class="ArcGISWPFSDK.AdvancedInformation"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:esri="http://schemas.esri.com/arcgis/client/2009">
    <UserControl.Resources>
        <esri:FileGpsCoordinateWatcher x:Key="fileGpsWatcher" Path = "..\Data\GPS\campus.txt" LoopPlayback="true" />
    </UserControl.Resources>
    <Grid>
        <esri:Map Extent="-13046586.9363318,4036013.64823107,-13045676.4100906,4036832.85611">
            <esri:ArcGISLocalTiledLayer ID="localTiledLayer" Path="..\Data\TPKs\Campus.tpk"/>
            <esri:GpsLayer GeoPositionWatcher="{StaticResource fileGpsWatcher}" />
        </esri:Map>
        <Border Background="#995C90B2" BorderThickness="1" CornerRadius="5"
            HorizontalAlignment="Right"  VerticalAlignment="Top"
            Margin="20" Padding="5" BorderBrush="Black" >
            <StackPanel Grid.Row="1" DataContext="{StaticResource fileGpsWatcher}">
                <TextBlock Text="{Binding Position.Timestamp, StringFormat=Timestamp: {0}}"/>
                <TextBlock Text="{Binding Position.Location.Altitude, StringFormat=Altitude: {0}}"/>
                <TextBlock Text="{Binding Position.Location.Course, StringFormat=Course: {0}}"/>
                <TextBlock Text="{Binding Position.Location.Latitude, StringFormat=Latitude: {0}}"/>
                <TextBlock Text="{Binding Position.Location.Longitude, StringFormat=Longitude: {0}}"/>
                <TextBlock Text="{Binding Position.Location.Speed, StringFormat=Speed: {0}}"/>
                <TextBlock Text="{Binding Position.Location.FixStatus, StringFormat=FixStatus: {0}}"/>
                <TextBlock Text="{Binding Position.Location.FixSatelliteCount, StringFormat=FixSatelliteCount: {0}}"/>
                <TextBlock Text="{Binding Position.Location.CourseMagnetic, StringFormat=CourseMagnetic: {0}}"/>
                <TextBlock Text="{Binding Position.Location.GeoidHeight, StringFormat=GeoidHeight: {0}}"/>
                <TextBlock Text="{Binding Position.Location.PositionDilutionOfPrecision, StringFormat=PositionDilutionOfPrecision: {0}}"/>
                <TextBlock Text="{Binding Position.Location.HorizontalDilutionOfPrecision, StringFormat=HorizontalDilutionOfPrecision: {0}}"/>
                <TextBlock Text="{Binding Position.Location.VerticalDilutionOfPrecision, StringFormat=VerticalDilutionOfPrecision: {0}}"/>
                <TextBlock Text="{Binding Position.Location.ChangeType, StringFormat=ChangeType: {0}}"/>
                <TextBlock Text="Satelites Used in Fix:"/>
                <ListBox  Background="Transparent" MinHeight="100" ItemsSource="{Binding Position.Location.SatellitesUsedInFix}"/>
                <TextBlock Text="Satelites in View:"/>
                <ListBox Background="Transparent" MinHeight="100" ItemsSource="{Binding SatellitesInView.Values}">
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <StackPanel>
                                <TextBlock Text="{Binding Id, StringFormat=Id: {0}}"/>
                                <TextBlock Text="{Binding Elevation, StringFormat=Elevation: {0}}"/>
                                <TextBlock Text="{Binding Azimuth, StringFormat=Azimuth: {0}}"/>
                                <TextBlock Text="{Binding SignalStrength, StringFormat=SignalStrength: {0}}"/>
                                <TextBlock Text="{Binding Constellation, StringFormat=Constellation: {0}}"/>
                            </StackPanel>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>
            </StackPanel>
        </Border>
    </Grid>
</UserControl>

Sample code usage restrictions
5/16/2014