Android-Based GNSS Measurements Assignment
Android-Based GNSS Measurements Assignment
IIT Madras
Android-based GNSS Measurements
Self-Assessment Assignment
GNSS (Global Navigation Satellite System) today includes a variety of satellite constellations,
including the GPS (American, global), GLONASS (Russian, global), BeiDou (Chinese, global), Galileo
(European, global), NavIC (Indian, regional) and QZSS (Japanese, regional). Depending on your
smartphone’s hardware capabilities, you can tap into signals from such constellations and update
your location. Google provides an array of open-source tools for performing GNSS-related
measurements on commodity Android smartphones and analyzing such datasets.
Download and install this app ( GnssLogger App – Apps on Google Play
) to get started. Ensure the location permissions are provided to this
app, and you have turned on your phone’s location service (e.g., GPS).
Turn on the “location” switch in the GNSSLogger app, as shown in the
figure. Go to the next tab, “Log”, and check whether you receive the
GNSS specific diagnostic messages that include your location
coordinates (latitude and longitude fix). Make sure "Fused location" and
"Network location" in the GNSS logger app are turned off before you
start logging. You can save the log data to a file and export this to the
SD card or share it to your drive/email for offline use. Try playing with
this app and make sure you are receiving the logs correctly. Cross-check
the location coordinates reported by the app in Google maps.
Concentrate on the lines starting with keywords with “Fix” and “Status”
(see GNSS Status API). “Fix” related lines will provide you with the
location coordinates of your phone. Only consider lines with “Fix, GPS”
(raw GPS) and not “Fix, FLP” (fused location, uses IMU for correction).
• Sample fix line (we are interested only in the red highlighted part):
Fix,Provider,LatitudeDegrees,LongitudeDegrees,AltitudeMeters,SpeedMps
,AccuracyMeters,BearingDegrees,UnixTimeMillis,SpeedAccuracyMps,Bearin
gAccuracyDegrees,elapsedRealtimeNanos
Example: Fix,GPS,12.997769,80.240794,-
100.513824,0.000000,5.360000,0.000000,1616658843000,0.49396357,0.0,17
42433115036168
• Sample status line (we are interested only in the red highlighted part):
Status,UnixTimeMillis,SignalCount,SignalIndex,ConstellationType,Svid,
CarrierFrequencyHz,Cn0DbHz,AzimuthDegrees,ElevationDegrees,UsedInFix,
HasAlmanacData,HasEphemerisData,BasebandCn0DbHz
Example:
Status,1616658843000,40,38,6,1,1575420032,15.00,355.00,37.00,1,1,0,
1. Calculate the mean location coordinates for all three locations. Assume those three locations as
the “groundtruth”. Compute the error for each location fix sample, which is the distance between the
location sample and the groundtruth location. You must use haversine distance (Wiki). Plot the CDF
(cumulative distribution function) of these errors for the three locations. Comment on the variance of
the three distributions.
How to calculate the azimuth corresponding to the direction of the window or door? Take the two
points (Lat1, Lon1) and (Lat2, Lon2) and use this website, https://www.fcc.gov/media/radio/distance-
and-azimuths or any other online azimuth calculator. Basically, the azimuth gives you the angle the
black line makes with 0 degrees north.