use of net.sf.marineapi.provider.event.SatelliteInfoEvent in project marine-api by ktuukkan.
the class SatelliteInfoProvider method createProviderEvent.
/*
* (non-Javadoc)
* @see net.sf.marineapi.provider.AbstractProvider#createProviderEvent()
*/
@Override
protected SatelliteInfoEvent createProviderEvent() {
GSASentence gsa = null;
List<SatelliteInfo> info = new ArrayList<SatelliteInfo>();
for (Sentence sentence : getSentences()) {
if ("GSA".equals(sentence.getSentenceId())) {
gsa = (GSASentence) sentence;
} else if ("GSV".equals(sentence.getSentenceId())) {
GSVSentence gsv = (GSVSentence) sentence;
info.addAll(gsv.getSatelliteInfo());
}
}
return new SatelliteInfoEvent(this, gsa, info);
}
Aggregations