本文整理汇总了Java中org.ogn.commons.igc.IgcLogger类的典型用法代码示例。如果您正苦于以下问题:Java IgcLogger类的具体用法?Java IgcLogger怎么用?Java IgcLogger使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IgcLogger类属于org.ogn.commons.igc包,在下文中一共展示了IgcLogger类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: processAprsLogFile
import org.ogn.commons.igc.IgcLogger; //导入依赖的package包/类
static void processAprsLogFile(String aprsLogFileName, LocalDate flightDate, IgcLogger igcLogger,
AircraftDescriptorProvider provider) {
try (Stream<String> stream = Files.lines(Paths.get(aprsLogFileName))) {
stream.forEach(
l -> {
try {
OgnBeacon ognBeacon = AprsLineParser.get().parse(l);
// just take aircraft beacons (a must, if the log file contains mix)
if (ognBeacon instanceof AircraftBeacon) {
AircraftBeacon aircraftBeacon = (AircraftBeacon) ognBeacon;
igcLogger.log(aircraftBeacon,
flightDate == null ? Optional.empty() : Optional.of(flightDate),
provider == null ? Optional.empty()
: provider.findDescriptor(aircraftBeacon.getAddress()));
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
);
} catch (IOException e) {
e.printStackTrace();
}
}
示例2: main
import org.ogn.commons.igc.IgcLogger; //导入依赖的package包/类
public static void main(String[] args) {
String aprsLogfileName = getAprsLogFileName(args);
IgcLogger igcLogger = createIgcLogger(args);
LocalDate date = getDateOfFlight(args);
processAprsLogFile(aprsLogfileName, date, igcLogger, null);
System.exit(0);
}
示例3: main
import org.ogn.commons.igc.IgcLogger; //导入依赖的package包/类
public static void main(String[] args) throws Exception {
String aprsLogfileName = ConvertAprsLogToIgc.getAprsLogFileName(args);
IgcLogger igcLogger = ConvertAprsLogToIgc.createIgcLogger(args);
LocalDate dateOfFlight = ConvertAprsLogToIgc.getDateOfFlight(args);
ConvertAprsLogToIgc.processAprsLogFile(aprsLogfileName, dateOfFlight, igcLogger, provider);
System.exit(0);
}