本文整理汇总了Java中org.opensky.libadsb.PositionDecoder类的典型用法代码示例。如果您正苦于以下问题:Java PositionDecoder类的具体用法?Java PositionDecoder怎么用?Java PositionDecoder使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PositionDecoder类属于org.opensky.libadsb包,在下文中一共展示了PositionDecoder类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: save
import org.opensky.libadsb.PositionDecoder; //导入依赖的package包/类
public void save(ModeSReply reply) {
if (!reply.getType().equals(subtype.ADSB_AIRBORN_POSITION)) {
return;
}
AirbornePositionMsg airpos = (AirbornePositionMsg) reply;
Position position = null;
Airplane plane = null;
String icao24 = tools.toHexString(reply.getIcao24());
synchronized (latestMessages) {
plane = latestMessages.get(icao24);
if (plane == null) {
PositionDecoder dec = new PositionDecoder();
position = dec.decodePosition(System.currentTimeMillis() / 1000, airpos);
plane = new Airplane();
plane.setPositions(new CopyOnWriteArrayList<Position>());
plane.setDecoder(dec);
plane.setIcao24(icao24);
latestMessages.put(icao24, plane);
} else {
airpos.setNICSupplementA(plane.getDecoder().getNICSupplementA());
position = plane.getDecoder().decodePosition(System.currentTimeMillis() / 1000, airpos);
}
}
if (position == null) {
return;
}
plane.setLastUpdatedAt(System.currentTimeMillis());
plane.getPositions().add(position);
}
示例2: Flight
import org.opensky.libadsb.PositionDecoder; //导入依赖的package包/类
public Flight () {
coords = new ArrayList<Coordinate>();
dec = new PositionDecoder();
callsign = new char[0];
contains_unreasonable = false;
serials = new ArrayList<Integer>();
}
示例3: getDecoder
import org.opensky.libadsb.PositionDecoder; //导入依赖的package包/类
public PositionDecoder getDecoder() {
return decoder;
}
示例4: setDecoder
import org.opensky.libadsb.PositionDecoder; //导入依赖的package包/类
public void setDecoder(PositionDecoder decoder) {
this.decoder = decoder;
}
示例5: Flight
import org.opensky.libadsb.PositionDecoder; //导入依赖的package包/类
public Flight () {
dec = new PositionDecoder();
is_in_area = false;
}
示例6: Flight
import org.opensky.libadsb.PositionDecoder; //导入依赖的package包/类
public Flight (long id) {
dec = new PositionDecoder();
}
示例7: Flight
import org.opensky.libadsb.PositionDecoder; //导入依赖的package包/类
public Flight (long id) {
dec = new PositionDecoder();
this.id = id;
this.last_position = new Position();
}
示例8: ExampleDecoder
import org.opensky.libadsb.PositionDecoder; //导入依赖的package包/类
public ExampleDecoder() {
decs = new HashMap<String, PositionDecoder>();
}