本文整理汇总了C++中TrafficState::getVelocity方法的典型用法代码示例。如果您正苦于以下问题:C++ TrafficState::getVelocity方法的具体用法?C++ TrafficState::getVelocity怎么用?C++ TrafficState::getVelocity使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TrafficState
的用法示例。
在下文中一共展示了TrafficState::getVelocity方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
std::pair<Vect3, Velocity> KinematicTrkBands::trajectory(const TrafficState& ownship, double time, bool dir) const {
std::pair<Position,Velocity> posvel;
if (instantaneous_bands()) {
double trk = ownship.getVelocity().trk()+(dir?1:-1)*j_step_*get_step();
posvel = std::pair<Position,Velocity>(ownship.getPosition(),ownship.getVelocity().mkTrk(trk));
} else {
double gso = ownship.groundSpeed();
double bank = turn_rate_ == 0 ? bank_angle_ : std::abs(Kinematics::bankAngle(gso,turn_rate_));
double R = Kinematics::turnRadius(ownship.get_v().gs(), bank);
posvel = ProjectedKinematics::turn(ownship.getPosition(),ownship.getVelocity(),time,R,dir);
}
return std::pair<Vect3, Velocity>(ownship.pos_to_s(posvel.first),ownship.vel_to_v(posvel.first,posvel.second));
}
示例2: epsilonH
int KinematicBandsCore::epsilonH(const OwnshipState& ownship, const TrafficState& ac) {
Position pi = ac.getPosition();
Velocity vi = ac.getVelocity();
Vect2 s = ownship.get_s().Sub(ownship.pos_to_s(pi)).vect2();
Vect2 v = ownship.get_v().Sub(ownship.vel_to_v(pi,vi)).vect2();
return CriteriaCore::horizontalCoordination(s,v);
}
示例3: epsilonV
int KinematicBandsCore::epsilonV(const OwnshipState& ownship, const TrafficState& ac) {
Position pi = ac.getPosition();
Velocity vi = ac.getVelocity();
Vect3 si = ownship.pos_to_s(pi);
Vect3 s = ownship.get_s().Sub(si);
return CriteriaCore::verticalCoordinationLoS(s,ownship.get_v(),ownship.vel_to_v(pi,vi),
ownship.getId(), ac.getId());
}
示例4: traffic_v
Velocity KinematicBandsCore::traffic_v(const TrafficState& ac) const {
return vel_to_v(ac.getPosition(),ac.getVelocity());
}