Пример #1
0
 /**
  * Get NMEA Satellite. The satellite list is retrieved from the almanac data. Satellites are
  * ordered by their elevation: highest elevation (index 0) -> lowest elevation.
  *
  * @param index the satellite index
  * @return the NMEASaltellite object for the selected satellite
  */
 public Satellite getSatellite(int index) {
   Satellite s = gsvSentence.getSatellite(index);
   // Compare getPRN() with this satellite, fill in setTracked():
   // TODO: This fails because most satellites are set to 0 when this is called. Not synced yet.
   boolean tracked = false;
   int[] prns = getPRN();
   for (int i = 0; i < prns.length; i++) {
     if (prns[i] == s.getPRN()) tracked = true;
     break;
   }
   s.setTracked(tracked);
   return s;
 }