/** * Called by {@link MainActivity} when a sensor's reading changes. Rotates sky plot according to * bearing. */ public void onSensorChanged(SensorEvent event) { switch (event.sensor.getType()) { case Sensor.TYPE_ORIENTATION: gpsStatusView.setOrientation(event.values[0], event.values[1], event.values[2]); break; } }
/** Called by {@link MainActivity} when the status of the GPS changes. Updates GPS display. */ public void onGpsStatusChanged( GpsStatus status, int satsInView, int satsUsed, Iterable<GpsSatellite> sats) { gpsSats.setText(String.valueOf(satsUsed) + "/" + String.valueOf(satsInView)); gpsTtff.setText(String.valueOf(status.getTimeToFirstFix() / 1000)); gpsStatusView.showSats(sats); gpsSnrView.showSats(sats); }