示例#1
0
void TCASTable::setParameters(const ParameterData& p) {
  if (p.contains("TCAS_HMDilter")) {
    HMDFilter = p.getBool("TCAS_HMDilter");
  }
  for (int i = 0; i < 7; i++) {
    if (p.contains("TCAS_TAU_"+Fmi(i+2))) {
      TAU[i] = p.getValue("TCAS_TAU_"+Fmi(i+2));
    }
  }
  for (int i = 0; i < 7; i++) {
    if (p.contains("TCAS_TCOA_"+Fmi(i+2))) {
      TCOA[i] = p.getValue("TCAS_TCOA_"+Fmi(i+2));
    }
  }
  for (int i = 0; i < 7; i++) {
    if (p.contains("TCAS_DMOD_"+Fmi(i+2))) {
      DMOD[i] = p.getValue("TCAS_DMOD_"+Fmi(i+2));
    }
  }
  for (int i = 0; i < 7; i++) {
    if (p.contains("TCAS_ZTHR_"+Fmi(i+2))) {
      ZTHR[i] = p.getValue("TCAS_ZTHR_"+Fmi(i+2));
    }
  }
  for (int i = 0; i < 7; i++) {
    if (p.contains("TCAS_HMD_"+Fmi(i+2))) {
      HMD[i] = p.getValue("TCAS_HMD_"+Fmi(i+2));
    }
  }
}
示例#2
0
std::string KinematicBandsCore::toString() const {
  int precision = Constants::get_output_precision();
  std::string s="";
  s+="## KinematicBandsCore Parameters\n";
  s+=parameters.toString();
  s+="## KinematicBandsCore Internals\n";
  s+="outdated_ = "+Fmb(outdated_)+"\n";
  s+="most_urgent_ac_ = "+most_urgent_ac.getId()+"\n";
  s+="epsh_ = "+Fmi(epsh_)+"\n";
  s+="epsv_ = "+Fmi(epsv_)+"\n";
  for (TrafficState::nat i=0; i < conflict_acs_.size(); ++i) {
    s+="conflict_acs_["+Fmi(i)+"]: "+
        TrafficState::listToString(conflict_acs_[i])+"\n";
  }
  for (Interval::nat i=0; i < tiov_.size(); ++i) {
    s+="tiov_["+Fmi(i)+"]: "+
        tiov_[i].toString(precision)+"\n";
  }
  s+="## Ownship and Traffic\n";
  s+="NAME sx sy sz vx vy vz time\n";
  s+="[none] [m] [m] [m] [m/s] [m/s] [m/s] [s]\n";
  s+=ownship.getId()+", "+ownship.get_s().formatXYZ(precision,"",", ","")+
      ", "+ownship.get_v().formatXYZ(precision,"",", ","")+", "+
      FmPrecision(ownship.getTime(),precision)+"\n";
  for (TrafficState::nat i = 0; i < traffic.size(); i++) {
    s+=traffic[i].getId()+", "+traffic[i].get_s().formatXYZ(precision,"",", ","")+
        ", "+traffic[i].get_v().formatXYZ(precision,"",", ","")+
        ", "+FmPrecision(traffic[i].getTime(),precision)+"\n";
  }
  s+="##\n";
  return s;

}
示例#3
0
void TCASTable::updateParameterData(ParameterData& p) const {
  p.setBool("TCAS_HMDilter", HMDFilter);
  for (int i = 0; i < 7; i++) {
    p.setInternal("TCAS_TAU_"+Fmi(i+2),TAU[i],"s",4);
  }
  for (int i = 0; i < 7; i++) {
    p.setInternal("TCAS_TCOA_"+Fmi(i+2),TCOA[i],"s",4);
  }
  for (int i = 0; i < 7; i++) {
    p.setInternal("TCAS_DMOD_"+Fmi(i+2),DMOD[i],"nmi",4);
  }
  for (int i = 0; i < 7; i++) {
    p.setInternal("TCAS_ZTHR_"+Fmi(i+2),ZTHR[i],"ft",4);
  }
  for (int i = 0; i < 7; i++) {
    p.setInternal("TCAS_HMD_"+Fmi(i+2),HMD[i],"ft",4);
  }
}
示例#4
0
std::string Integerval::toString() const {
  return "[" + Fmi(lb) + "," + Fmi(ub) + "]";
}