0% found this document useful (0 votes)
59 views

Android-Based GNSS Measurements Assignment

The document describes an assignment to collect GPS location data using an Android app called GNSSLogger at three different locations: outdoors with clear sky visibility, near a building entrance with partial sky visibility, and indoors with limited sky visibility. Students are asked to analyze the GPS fix accuracy and satellite signal strengths at each location, and examine how factors like number of satellites, signal to noise ratio (SNR), and satellite positions affect the fix accuracy. Plots and tables are to be used to summarize the results.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views

Android-Based GNSS Measurements Assignment

The document describes an assignment to collect GPS location data using an Android app called GNSSLogger at three different locations: outdoors with clear sky visibility, near a building entrance with partial sky visibility, and indoors with limited sky visibility. Students are asked to analyze the GPS fix accuracy and satellite signal strengths at each location, and examine how factors like number of satellites, signal to noise ratio (SNR), and satellite positions affect the fix accuracy. Plots and tables are to be used to summarize the results.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Workshop on Location Tracking for Internet of Things

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,

• ConstellationType: Only use GPS (for now, please ignore


data from GLONASS, BeiDou etc., even if your phone supports it).
Flag for GPS = 1, (see this)
• Svid: Satellite ID
• Cn0DbHz: Signal Strength or SNR of the signal received from the
particular satellite.
• AzimuthDegrees (0 - 360) & ElevationDegrees (0 - 90) of
the satellite (Wiki)
• UsedInFix: Indicates whether the particular satellite was used for
the latest fix for multilateration.

Instructor: Ayon Chakraborty, SENSE Lab, IIT Madras


Tasks
Collect such measurement logs at three distinct
locations as indicated in the picture on the left. (i) The
smartphone is under the open sky a few meters from
the entrance/door of your building, (ii) The
smartphone is at the entrance (or some window) of
your building, the sky is partially visible, and (iii) The
smartphone is completely inside the building, very
limited portion of the sky is visible maybe through the
door/window. At each of these locations, collect
GNSSLogger data for about 5 - 10 minutes. (Perform
the experiments on a sunny day with a clear sky)

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.

2. Check the “status” entries prior to receiving a “fix”.


• How many satellites were used for the fix (check the UsedInFix entry for the satellites) for the
three locations? (State the median # of satellites)
• How does the distance error for a fix correlate to the number of satellites used for that fix?
Show scatter plots for the three locations. Summarize your observations.
• How does the distance error for a fix correlate to the average SNR (Cn0DbHz entry) of the
satellites that were used in the fix? Show scatter plots for the three locations. Summarize
your observations.
3. Only consider the “status” instances where a particular satellite was used for a location fix.
• Show a table for the “Svid”, “Average Azimuth”, “Average Elevation”, “Average SNR” (each row
for a specific satellite).
• Plot “Average Azimuth” (0 – 360 degrees) with “Average SNR”
• Plot “Average Elevation” (0, 90 degrees) with “Average SNR”

4. See the second plot of the


previous question. Two example
plots are also shown on the right for
your reference. Either you can plot
in the cartesian space or in the
angular (R, theta) space. Magnitude
of R can signify your SNR. To make
it more interesting, you can
superimpose the angular plot on a
satellite image, say from Google
maps (of course, you need to rotate
the image to align the azimuths). This should show the effect of buildings, trees, obstacles on the
SNR. Does your plot (particularly, for location 2, where the phone is kept on the windowsill or door)
peak for a certain azimuth? This azimuth should roughly match with the direction of the clear sky
from that location.

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.

Instructor: Ayon Chakraborty, SENSE Lab, IIT Madras

You might also like