⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 positionwithmotionparticle.java

📁 一个基于PlaceLab的室内和室外的智能导航系统
💻 JAVA
字号:
/* * Created on Jun 18, 2004 * */package org.placelab.particlefilter.beacon;import org.placelab.core.TwoDCoordinate;import org.placelab.particlefilter.Particle;public class PositionWithMotionParticle extends PositionParticle {	private double theta;	private double velocity;	private double lastWeight;//	private double acceleration = 0.0;//	private double turnRate = 0.0;	public int state = -1; // generic variable to models to tinker with	public double dstate = 10.0; // generic variable to models to tinker with	public double dstate2 = 0;	public double dstate3 = 0.0;		public double chanceOfTransition = 1.0;	public long timeSinceLastTransition = 0;	public PositionWithMotionParticle(TwoDCoordinate c, double th, double vel) {		super(c);		theta = th;		velocity = vel;		lastWeight = -1.0;	}		public PositionWithMotionParticle(PositionWithMotionParticle p) {		super(p);				theta = p.theta;		velocity = p.velocity;		state = p.state;		dstate = p.dstate;		dstate2 = p.dstate2;		dstate3 = p.dstate3;//		dstate =  p.dstate + NumUtil.rand.nextGaussian()*p.dstate/50;//		if (dstate < 0) {//			dstate = 0;//		}	//	System.out.println(p.dstate + " -> " + dstate);		chanceOfTransition = p.chanceOfTransition;		timeSinceLastTransition = p.timeSinceLastTransition;		lastWeight = p.getWeight();	}			public Particle createClone() {		return new PositionWithMotionParticle(this);	}		public double getLastWeight() {		return lastWeight;	}		/**	 * @return Returns the theta.	 */	public double getDirection() {		return theta;	}	/**	 * @param theta The angle to set.	 */	public void setDirection(double theta) {		this.theta = theta;	}	/**	 * @param acceleration The acceleration for the rest of the time period.	 *///	public void setAcceleration(double acceleration) {//		this.acceleration = acceleration;//	}//	//	public double getAcceleration() {//		return acceleration;//	}//	public void setTurnRate(double turnRate) {//		this.turnRate = turnRate;//	}//	//	public double getTurnRate() {//		return turnRate;//	}	/**	 * @return Returns the velocity.	 */	public double getVelocity() {		return velocity;	}	/**	 * @param velocity The velocity to set.	 */	public void setVelocity(double velocity) {		this.velocity = velocity;	}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -