Esempio n. 1
0
 public function updateGroup($groupFilename)
 {
     $id = str_replace('.txt', '', $groupFilename);
     $tle = $this->getTLE($groupFilename);
     if (strlen($tle) > 0) {
         Kep::delete_all(array('conditions' => array('kepsgroup' => $id)));
         $sat = new Kep();
         $sat->kepsgroup = $id;
         $sat->elements = $tle;
         $sat->date = time();
         $sat->save();
         return true;
     }
     return false;
 }
Esempio n. 2
0
 public function getElements()
 {
     $this->checkQS(array('group' => array('qsvar' => 'group', 'default' => '', 'fatal' => true)));
     $group = $_GET['group'];
     $keps = Kep::find('first', array('conditions' => array('kepsgroup = ?', $group)));
     $ageData = $this->AGSATTRACK_ELEMENTSET->getAverageAge($keps->elements);
     $this->output = array('id' => $group, 'averageage' => $ageData, 'updateat' => 5, 'keps' => $keps->elements);
 }