当前位置: 首页>>代码示例>>Java>>正文


Java PositionDecoder类代码示例

本文整理汇总了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);
}
 
开发者ID:dernasherbrezon,项目名称:r2cloud,代码行数:35,代码来源:ADSBDao.java

示例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>();
}
 
开发者ID:openskynetwork,项目名称:osky-sample,代码行数:8,代码来源:Avro2Kml.java

示例3: getDecoder

import org.opensky.libadsb.PositionDecoder; //导入依赖的package包/类
public PositionDecoder getDecoder() {
	return decoder;
}
 
开发者ID:dernasherbrezon,项目名称:r2cloud,代码行数:4,代码来源:Airplane.java

示例4: setDecoder

import org.opensky.libadsb.PositionDecoder; //导入依赖的package包/类
public void setDecoder(PositionDecoder decoder) {
	this.decoder = decoder;
}
 
开发者ID:dernasherbrezon,项目名称:r2cloud,代码行数:4,代码来源:Airplane.java

示例5: Flight

import org.opensky.libadsb.PositionDecoder; //导入依赖的package包/类
public Flight () {
	dec = new PositionDecoder();
	is_in_area = false;
}
 
开发者ID:openskynetwork,项目名称:osky-sample,代码行数:5,代码来源:ExtractArea.java

示例6: Flight

import org.opensky.libadsb.PositionDecoder; //导入依赖的package包/类
public Flight (long id) {
	dec = new PositionDecoder();
}
 
开发者ID:openskynetwork,项目名称:osky-sample,代码行数:4,代码来源:Avro2ResearchSQLite.java

示例7: Flight

import org.opensky.libadsb.PositionDecoder; //导入依赖的package包/类
public Flight (long id) {
	dec = new PositionDecoder();
	this.id = id;
	this.last_position = new Position();
}
 
开发者ID:openskynetwork,项目名称:osky-sample,代码行数:6,代码来源:Avro2SQLite.java

示例8: ExampleDecoder

import org.opensky.libadsb.PositionDecoder; //导入依赖的package包/类
public ExampleDecoder() {
	decs = new HashMap<String, PositionDecoder>();
}
 
开发者ID:openskynetwork,项目名称:java-adsb,代码行数:4,代码来源:ExampleDecoder.java


注:本文中的org.opensky.libadsb.PositionDecoder类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。