Location Data Logger: A location-aware sample app for the Windows 8 UI

Location Data Logger: A location-aware sample app for the Windows 8 UI

I have created a location-aware Windows Store App that is available as sample source code here. Location Data Logger turns your Windows 8 tablet or ultrabook into a data logger, creating track logs of your position and movement and writing them to your choice of CSV, GPX, and KML files.

In addition to making the source code available, I have started a multi-part blog series that discusses the design and implementation of Location Data Logger, covering everything from high level app and UI design, integration of the geolocation sensor, and a number of Windows 8 runtime features such as suspend and resume, saving applications state, and UI animations.

If you have an interest in developing location-based Windows Store apps, particularly those that use precision location sensors such as GNSS receivers, this is a series you will want to watch. Part 1 came out this morning, and parts 2 and 3 will be out early next week.

12 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.

Hi John,

Great stuff.

Looking forward to the other parts.

 

David

Part 2 is out, and discusses the UI design.

Hi John,

Nice sample app.

Peter

Thank you, Peter!

Part 3 of my blog series on the app was posted last week, covering the classes that manage geolocation. The rest of the series will resume as soon as I return from vacation.

Parts 4 and 5, which discuss the Bing* Maps integration and the data grid view respectively, are out. The latter includes a discussion on data bindings and data templating.

>>...GNSS receivers...

Does the GNSS receiver work with GLONASS satellites?

They are supposed to, yes. If the hardware specs indicate GPS support, then that specifically means only support for GPS. But if the specs say GNSS, then the receiver is supposed to work with any satellite nav system, including GLONASS.

Unfortunately, the Windows 8 Runtime abstracts the details of the position source from the application so there is no way to determine this definitively from within a Windows Store app.

>>...Unfortunately, the Windows 8 Runtime abstracts the details of the position source from the application so
>>there is no way to determine this definitively...

If you know a satellite's Sky Position ( AZ & EL ) then it is not a difficult task to identify if it is from GPS or GLONASS "constellations".

Did you try to look at Raw Data in a Terminal application? I'm simply interested to know if NMEA 0183 ( v2.0, or so ) is used?

Thanks in advance.

PS: I could give you a set of Raw Data from GPS satellites if you need.

Questions about how the geolocator sensor extracts position data from the underlying hardware should be directed to your hardware manufacturer. My guess is that, yes, the GNSS drivers do parse the NMEA data from the radio receiver. The context of this discussion, however, is the Windows 8 Runtime behind Windows Store apps, and that API does not expose this information to the developer.

>>...that API does not expose this information to the developer...

I regret about this because it was exposed in GPS_POSITION structure:

[ gpsapi.h ]

...
//
// GPS_POSITION contains our latest physical coordinates, the time,
// and satellites used in determining these coordinates.
//
typedef struct _GPS_POSITION {
DWORD dwVersion; // Current version of GPSID client is using.
DWORD dwSize; // sizeof(_GPS_POSITION)

// Not all fields in the structure below are guaranteed to be valid.
// Which fields are valid depend on GPS device being used, how stale the API allows
// the data to be, and current signal.
// Valid fields are specified in dwValidFields, based on GPS_VALID_XXX flags.
DWORD dwValidFields;

// Additional information about this location structure (GPS_DATA_FLAGS_XXX)
DWORD dwFlags;

//** Time related
SYSTEMTIME stUTCTime; // UTC according to GPS clock.

//** Position + heading related
double dblLatitude; // Degrees latitude. North is positive
double dblLongitude; // Degrees longitude. East is positive
float flSpeed; // Speed in knots
float flHeading; // Degrees heading (course made good). True North=0
double dblMagneticVariation; // Magnetic variation. East is positive
float flAltitudeWRTSeaLevel; // Altitute with regards to sea level, in meters
float flAltitudeWRTEllipsoid; // Altitude with regards to ellipsoid, in meters

//** Quality of this fix
GPS_FIX_QUALITY FixQuality; // Where did we get fix from?
GPS_FIX_TYPE FixType; // Is this 2d or 3d fix?
GPS_FIX_SELECTION SelectionType; // Auto or manual selection between 2d or 3d mode
float flPositionDilutionOfPrecision; // Position Dilution Of Precision
float flHorizontalDilutionOfPrecision; // Horizontal Dilution Of Precision
float flVerticalDilutionOfPrecision; // Vertical Dilution Of Precision

//** Satellite information
DWORD dwSatelliteCount; // Number of satellites used in solution
DWORD rgdwSatellitesUsedPRNs[GPS_MAX_SATELLITES]; // PRN numbers of satellites used in the solution

DWORD dwSatellitesInView; // Number of satellites in view. From 0-GPS_MAX_SATELLITES
DWORD rgdwSatellitesInViewPRNs[GPS_MAX_SATELLITES]; // PRN numbers of satellites in view
DWORD rgdwSatellitesInViewElevation[GPS_MAX_SATELLITES]; // Elevation of each satellite in view
DWORD rgdwSatellitesInViewAzimuth[GPS_MAX_SATELLITES]; // Azimuth of each satellite in view
DWORD rgdwSatellitesInViewSignalToNoiseRatio[GPS_MAX_SATELLITES]; // Signal to noise ratio of each satellite in view
} GPS_POSITION, *PGPS_POSITION;
...

Part 6, covering the Export class, was posted late last week. There will be at least one more blog in this series, though it may be several days before it is ready.

Melden Sie sich an, um einen Kommentar zu hinterlassen.