Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
@@ -0,0 +1,57 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
rm -v /shd/CTC/LOG/ctc_bcu_1.log*
|
||||
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
#BLDGS="1103"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
#BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
#echo " work on item: '$BLDG'"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin/BuildingControlTestVwmXml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo " failure on -> '$BLDG' ";
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
echo "grep for '$BLDG':";
|
||||
grep WARN /shd/CTC/LOG/ctc_bcu_1.log* | grep $BLDG
|
||||
|
||||
|
||||
# 1102 -> 4 Aussentreppen
|
||||
# 1107 -> Aussentreppen
|
||||
# 3280 -> Aussentreppen
|
||||
# U_Bahn -> 6 Fehler 2102 2114 2131 2202 2206 2210 (Räume ohne 'Dach'
|
||||
|
||||
done
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
|
||||
# kate /shd/CTC/TOOLS/TDS/TDS-build/bin/log4cxx_bcu.props &
|
||||
# kate /shd/CTC/LOG/ctc_bcu_1.log &
|
||||
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
rm -v /shd/CTC/LOG/ctc_bcu_1.log*
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
BLDGS="A2 A3a A3b A3c A4a A4b A4c A4d A5 A6a A6b A6c A7 B1 B2 B3 B4 B5 B6 B7 B8 B9a B9b B9c B9d B9e B9f B9g B9h B9i B9j B9k B9l B9m B9n B9o B9p B9q B9r B10a B10b B10c B10d B10e B10f B10g B10h B10i B10j B10k B10l B10m B10n B11a B11b B11c B11d"
|
||||
|
||||
#BLDGS="A2"
|
||||
|
||||
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
#echo " work on item: '$BLDG'"
|
||||
#/shd/CTC/TOOLS/TDS/TDS-build/bin/BuildingControlTestVwmXml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin/BuildingControlTestVwmXml /opt/BuildingModels/StaticMeshesAHTC/opt/BuildingModels/StaticMeshes//bldg_BN_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshesAHTC/opt/BuildingModels/StaticMeshes//bldg_BN_${BLDG}.flt.VWM_Building.xml
|
||||
|
||||
|
||||
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo "------------------------------------";
|
||||
echo " failure on -> '$BLDG' ";
|
||||
echo " kate /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml &"
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
echo "grep for '$BLDG':";
|
||||
grep -E "WARN|ERROR|FATAL" /shd/CTC/LOG/ctc_bcu_1.log* | grep $BLDG
|
||||
|
||||
|
||||
done
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
|
||||
# kate /shd/CTC/TOOLS/TDS/TDS-build/bin/log4cxx_bcu.props &
|
||||
# kate /shd/CTC/LOG/ctc_bcu_1.log &
|
||||
Executable
+62
@@ -0,0 +1,62 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
rm -v /shd/CTC/LOG/ctc_bcu_1.log*
|
||||
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# 29-10-2021: ----
|
||||
BLDGS="1111 1112 1113 1118 1119 1120 1121 1122 1123 1124 1125 1128 1130 1132 1134 1136 1138 1140 1142 1163"
|
||||
#BLDGS="1113 " # 1113 1124 1136 1142
|
||||
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
#BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
#echo " work on item: '$BLDG'"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin/BuildingControlTestVwmXml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "------------------------------------";
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo "------------------------------------";
|
||||
echo " failure on -> '$BLDG' ";
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
echo "grep for '$BLDG':";
|
||||
grep -E "WARN|ERROR|FATAL" /shd/CTC/LOG/ctc_bcu_1.log* | grep $BLDG
|
||||
|
||||
|
||||
# 1102 -> 4 Aussentreppen
|
||||
# 1107 -> Aussentreppen
|
||||
# 3280 -> Aussentreppen
|
||||
# U_Bahn -> 6 Fehler 2102 2114 2131 2202 2206 2210 (Räume ohne 'Dach'
|
||||
|
||||
done
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
|
||||
# kate /shd/CTC/TOOLS/TDS/TDS-build/bin/log4cxx_bcu.props &
|
||||
# kate /shd/CTC/LOG/ctc_bcu_1.log &
|
||||
|
||||
Executable
+66
@@ -0,0 +1,66 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
rm -v /shd/CTC/LOG/ctc_bcu_1.log*
|
||||
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# 29-10-2021: ----
|
||||
BLDGS="1111 1112 1113 1118 1119 1120 1121 1122 1123 1124 1125 1128 1130 1132 1134 1136 1138 1140 1142 1163"
|
||||
|
||||
# 03-11-2021: ----
|
||||
# zip bldgs_2021-11-03_rev5028 import_ba1_2021-11-03.csv bldg_1127* bldg_1129* bldg_1131* bldg_1133* bldg_1135* bldg_1137* bldg_1139* bldg_1141* bldg_1143* bldg_1144* bldg_1145* bldg_1146* bldg_1147* bldg_1153* bldg_1158* bldg_1167*
|
||||
BLDGS="1127 1129 1131 1133 1135 1137 1139 1141 1143 1144 1145 1146 1147 1153 1158 1167"
|
||||
#BLDGS="1131 1147 1153" # 1131 1147 1153
|
||||
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
#BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
#echo " work on item: '$BLDG'"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin/BuildingControlTestVwmXml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "------------------------------------";
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo "------------------------------------";
|
||||
echo " failure on -> '$BLDG' ";
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
echo "grep for '$BLDG':";
|
||||
grep -E "WARN|ERROR|FATAL" /shd/CTC/LOG/ctc_bcu_1.log* | grep $BLDG
|
||||
|
||||
|
||||
# 1102 -> 4 Aussentreppen
|
||||
# 1107 -> Aussentreppen
|
||||
# 3280 -> Aussentreppen
|
||||
# U_Bahn -> 6 Fehler 2102 2114 2131 2202 2206 2210 (Räume ohne 'Dach'
|
||||
|
||||
done
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
|
||||
# kate /shd/CTC/TOOLS/TDS/TDS-build/bin/log4cxx_bcu.props &
|
||||
# kate /shd/CTC/LOG/ctc_bcu_1.log &
|
||||
|
||||
Executable
+68
@@ -0,0 +1,68 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
rm -v /shd/CTC/LOG/ctc_bcu_1.log*
|
||||
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# 29-10-2021: ----
|
||||
BLDGS="1111 1112 1113 1118 1119 1120 1121 1122 1123 1124 1125 1128 1130 1132 1134 1136 1138 1140 1142 1163"
|
||||
|
||||
# 03-11-2021: ----
|
||||
# zip bldgs_2021-11-03_rev5028 import_ba1_2021-11-03.csv bldg_1127* bldg_1129* bldg_1131* bldg_1133* bldg_1135* bldg_1137* bldg_1139* bldg_1141* bldg_1143* bldg_1144* bldg_1145* bldg_1146* bldg_1147* bldg_1153* bldg_1158* bldg_1167*
|
||||
BLDGS="1127 1129 1131 1133 1135 1137 1139 1141 1143 1144 1145 1146 1147 1153 1158 1167"
|
||||
#BLDGS="1131 1147 1153" # 1131 1147 1153
|
||||
|
||||
BLDGS="1155 1159 1160 1161 1162 1164 1166 1168 1170 1172 1173"
|
||||
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
#BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
#echo " work on item: '$BLDG'"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin/BuildingControlTestVwmXml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "------------------------------------";
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo "------------------------------------";
|
||||
echo " failure on -> '$BLDG' ";
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
echo "grep for '$BLDG':";
|
||||
grep -E "WARN|ERROR|FATAL" /shd/CTC/LOG/ctc_bcu_1.log* | grep $BLDG
|
||||
|
||||
|
||||
# 1102 -> 4 Aussentreppen
|
||||
# 1107 -> Aussentreppen
|
||||
# 3280 -> Aussentreppen
|
||||
# U_Bahn -> 6 Fehler 2102 2114 2131 2202 2206 2210 (Räume ohne 'Dach'
|
||||
|
||||
done
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
|
||||
# kate /shd/CTC/TOOLS/TDS/TDS-build/bin/log4cxx_bcu.props &
|
||||
# kate /shd/CTC/LOG/ctc_bcu_1.log &
|
||||
|
||||
Executable
+72
@@ -0,0 +1,72 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
rm -v /shd/CTC/LOG/ctc_bcu_1.log*
|
||||
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# 29-10-2021: ----
|
||||
BLDGS="1111 1112 1113 1118 1119 1120 1121 1122 1123 1124 1125 1128 1130 1132 1134 1136 1138 1140 1142 1163"
|
||||
|
||||
# 03-11-2021: ----
|
||||
# zip bldgs_2021-11-03_rev5028 import_ba1_2021-11-03.csv bldg_1127* bldg_1129* bldg_1131* bldg_1133* bldg_1135* bldg_1137* bldg_1139* bldg_1141* bldg_1143* bldg_1144* bldg_1145* bldg_1146* bldg_1147* bldg_1153* bldg_1158* bldg_1167*
|
||||
BLDGS="1127 1129 1131 1133 1135 1137 1139 1141 1143 1144 1145 1146 1147 1153 1158 1167"
|
||||
|
||||
# 05-11-2021: ----
|
||||
BLDGS="1155 1159 1160 1161 1162 1164 1166 1168 1170 1172 1173"
|
||||
|
||||
# 10-11-2021
|
||||
# zip bldgs_2021-11-10_rev5135XXXX.zip import_ba1_2021-11-10.csv bldg_1174* bldg_1175* bldg_1176* bldg_1177* bldg_1178* bldg_1179* bldg_1180* bldg_1181* bldg_1182* bldg_1183* bldg_1185* bldg_1188* bldg_1191* bldg_1193* bldg_1194* bldg_1195* bldg_1196* bldg_1201* bldg_1202* bldg_1203* bldg_1204* bldg_1210* bldg_1211*
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
#BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
#echo " work on item: '$BLDG'"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin/BuildingControlTestVwmXml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "------------------------------------";
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo "------------------------------------";
|
||||
echo " failure on -> '$BLDG' ";
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
echo "grep for '$BLDG':";
|
||||
grep -E "WARN|ERROR|FATAL" /shd/CTC/LOG/ctc_bcu_1.log* | grep $BLDG
|
||||
|
||||
|
||||
# 1102 -> 4 Aussentreppen
|
||||
# 1107 -> Aussentreppen
|
||||
# 3280 -> Aussentreppen
|
||||
# U_Bahn -> 6 Fehler 2102 2114 2131 2202 2206 2210 (Räume ohne 'Dach'
|
||||
|
||||
done
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
|
||||
# kate /shd/CTC/TOOLS/TDS/TDS-build/bin/log4cxx_bcu.props &
|
||||
# kate /shd/CTC/LOG/ctc_bcu_1.log &
|
||||
|
||||
Executable
+79
@@ -0,0 +1,79 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
rm -v /shd/CTC/LOG/ctc_bcu_1.log*
|
||||
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# 29-10-2021: ----
|
||||
BLDGS="1111 1112 1113 1118 1119 1120 1121 1122 1123 1124 1125 1128 1130 1132 1134 1136 1138 1140 1142 1163"
|
||||
|
||||
# 03-11-2021: ----
|
||||
# zip bldgs_2021-11-03_rev5028 import_ba1_2021-11-03.csv bldg_1127* bldg_1129* bldg_1131* bldg_1133* bldg_1135* bldg_1137* bldg_1139* bldg_1141* bldg_1143* bldg_1144* bldg_1145* bldg_1146* bldg_1147* bldg_1153* bldg_1158* bldg_1167*
|
||||
BLDGS="1127 1129 1131 1133 1135 1137 1139 1141 1143 1144 1145 1146 1147 1153 1158 1167"
|
||||
|
||||
# 05-11-2021: ----
|
||||
BLDGS="1155 1159 1160 1161 1162 1164 1166 1168 1170 1172 1173"
|
||||
|
||||
# 10-11-2021
|
||||
# zip bldgs_2021-11-10_rev5135XXXX.zip import_ba1_2021-11-10.csv bldg_1174* bldg_1175* bldg_1176* bldg_1177* bldg_1178* bldg_1179* bldg_1180* bldg_1181* bldg_1182* bldg_1183* bldg_1185* bldg_1188* bldg_1191* bldg_1193* bldg_1194* bldg_1195* bldg_1196* bldg_1201* bldg_1202* bldg_1203* bldg_1204* bldg_1210* bldg_1211*
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
# zip bldgs_2021-11-12_rev5157.zip import_ba1_2021-11-12.csv bldg_1213* bldg_1215* bldg_1216* bldg_1217* bldg_1218* bldg_1219* bldg_1220* bldg_1221* bldg_1222* bldg_1223* bldg_1225* bldg_1226* bldg_1227*
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
#BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
#echo " work on item: '$BLDG'"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin/BuildingControlTestVwmXml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "------------------------------------";
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo "------------------------------------";
|
||||
echo " failure on -> '$BLDG' ";
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
echo "grep for '$BLDG':";
|
||||
grep -E "WARN|ERROR|FATAL" /shd/CTC/LOG/ctc_bcu_1.log* | grep $BLDG
|
||||
|
||||
|
||||
# 1102 -> 4 Aussentreppen
|
||||
# 1107 -> Aussentreppen
|
||||
# 3280 -> Aussentreppen
|
||||
# U_Bahn -> 6 Fehler 2102 2114 2131 2202 2206 2210 (Räume ohne 'Dach'
|
||||
|
||||
#bdlg_1221 ist über Eck gebaut. Center von 301 erzielt daher keinen Treffer
|
||||
|
||||
done
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
|
||||
# kate /shd/CTC/TOOLS/TDS/TDS-build/bin/log4cxx_bcu.props &
|
||||
# kate /shd/CTC/LOG/ctc_bcu_1.log &
|
||||
|
||||
Executable
+84
@@ -0,0 +1,84 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
rm -v /shd/CTC/LOG/ctc_bcu_1.log*
|
||||
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# 29-10-2021: ----
|
||||
BLDGS="1111 1112 1113 1118 1119 1120 1121 1122 1123 1124 1125 1128 1130 1132 1134 1136 1138 1140 1142 1163"
|
||||
|
||||
# 03-11-2021: ----
|
||||
# zip bldgs_2021-11-03_rev5028 import_ba1_2021-11-03.csv bldg_1127* bldg_1129* bldg_1131* bldg_1133* bldg_1135* bldg_1137* bldg_1139* bldg_1141* bldg_1143* bldg_1144* bldg_1145* bldg_1146* bldg_1147* bldg_1153* bldg_1158* bldg_1167*
|
||||
BLDGS="1127 1129 1131 1133 1135 1137 1139 1141 1143 1144 1145 1146 1147 1153 1158 1167"
|
||||
|
||||
# 05-11-2021: ----
|
||||
BLDGS="1155 1159 1160 1161 1162 1164 1166 1168 1170 1172 1173"
|
||||
|
||||
# 10-11-2021
|
||||
# zip bldgs_2021-11-10_rev5135XXXX.zip import_ba1_2021-11-10.csv bldg_1174* bldg_1175* bldg_1176* bldg_1177* bldg_1178* bldg_1179* bldg_1180* bldg_1181* bldg_1182* bldg_1183* bldg_1185* bldg_1188* bldg_1191* bldg_1193* bldg_1194* bldg_1195* bldg_1196* bldg_1201* bldg_1202* bldg_1203* bldg_1204* bldg_1210* bldg_1211*
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
# zip bldgs_2021-11-12_rev5157.zip import_ba1_2021-11-12.csv bldg_1213* bldg_1215* bldg_1216* bldg_1217* bldg_1218* bldg_1219* bldg_1220* bldg_1221* bldg_1222* bldg_1223* bldg_1225* bldg_1226* bldg_1227*
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
# zip bldgs_2021-11-17_rev5217.55642.zip import_ba1_2021-11-17.csv bldg_1224* bldg_1228* bldg_1229* bldg_1230* bldg_1231* bldg_1232* bldg_1235* bldg_1237* bldg_1239* bldg_1241* bldg_1243*
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
#BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
#echo " work on item: '$BLDG'"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin/BuildingControlTestVwmXml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "------------------------------------";
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo "------------------------------------";
|
||||
echo " failure on -> '$BLDG' ";
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
echo "grep for '$BLDG':";
|
||||
grep -E "WARN|ERROR|FATAL" /shd/CTC/LOG/ctc_bcu_1.log* | grep $BLDG
|
||||
|
||||
|
||||
# 1102 -> 4 Aussentreppen
|
||||
# 1107 -> Aussentreppen
|
||||
# 3280 -> Aussentreppen
|
||||
# U_Bahn -> 6 Fehler 2102 2114 2131 2202 2206 2210 (Räume ohne 'Dach'
|
||||
|
||||
#bdlg_1221 ist über Eck gebaut. Center von 301 erzielt daher keinen Treffer
|
||||
|
||||
#bldg_1232 ist über Eck gebaut. Center von 110, 210, 301 erzielen daher keinen Treffer
|
||||
|
||||
done
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
|
||||
# kate /shd/CTC/TOOLS/TDS/TDS-build/bin/log4cxx_bcu.props &
|
||||
# kate /shd/CTC/LOG/ctc_bcu_1.log &
|
||||
|
||||
Executable
+95
@@ -0,0 +1,95 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
rm -v /shd/CTC/LOG/ctc_bcu_1.log*
|
||||
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# 29-10-2021: ----
|
||||
BLDGS="1111 1112 1113 1118 1119 1120 1121 1122 1123 1124 1125 1128 1130 1132 1134 1136 1138 1140 1142 1163"
|
||||
|
||||
# 03-11-2021: ----
|
||||
# zip bldgs_2021-11-03_rev5028 import_ba1_2021-11-03.csv bldg_1127* bldg_1129* bldg_1131* bldg_1133* bldg_1135* bldg_1137* bldg_1139* bldg_1141* bldg_1143* bldg_1144* bldg_1145* bldg_1146* bldg_1147* bldg_1153* bldg_1158* bldg_1167*
|
||||
BLDGS="1127 1129 1131 1133 1135 1137 1139 1141 1143 1144 1145 1146 1147 1153 1158 1167"
|
||||
|
||||
# 05-11-2021: ----
|
||||
BLDGS="1155 1159 1160 1161 1162 1164 1166 1168 1170 1172 1173"
|
||||
|
||||
# 10-11-2021
|
||||
# zip bldgs_2021-11-10_rev5135XXXX.zip import_ba1_2021-11-10.csv bldg_1174* bldg_1175* bldg_1176* bldg_1177* bldg_1178* bldg_1179* bldg_1180* bldg_1181* bldg_1182* bldg_1183* bldg_1185* bldg_1188* bldg_1191* bldg_1193* bldg_1194* bldg_1195* bldg_1196* bldg_1201* bldg_1202* bldg_1203* bldg_1204* bldg_1210* bldg_1211*
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
# zip bldgs_2021-11-12_rev5157.zip import_ba1_2021-11-12.csv bldg_1213* bldg_1215* bldg_1216* bldg_1217* bldg_1218* bldg_1219* bldg_1220* bldg_1221* bldg_1222* bldg_1223* bldg_1225* bldg_1226* bldg_1227*
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
# zip bldgs_2021-11-17_rev5217.55642.zip import_ba1_2021-11-17.csv bldg_1224* bldg_1228* bldg_1229* bldg_1230* bldg_1231* bldg_1232* bldg_1235* bldg_1237* bldg_1239* bldg_1241* bldg_1243*
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
# 19-11-2021
|
||||
# 2 Nachzuegler: 1197 1207
|
||||
# zip bldgs_2021-11-19_rev5322.55687.zip import_ba1_2021-11-19.csv bldg_1197* bldg_1207* bldg_1234* bldg_1238* bldg_1240* bldg_1244* bldg_1245* bldg_1246* bldg_1248* bldg_1249* bldg_1257* bldg_1258* bldg_1259*
|
||||
BLDGS="1197 1207 1234 1238 1240 1244 1245 1246 1248 1249 1257 1258 1259"
|
||||
|
||||
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
#BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
#echo " work on item: '$BLDG'"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin/BuildingControlTestVwmXml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml
|
||||
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "------------------------------------";
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo "------------------------------------";
|
||||
echo " failure on -> '$BLDG' ";
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
echo "grep for '$BLDG':";
|
||||
grep -E "WARN|ERROR|FATAL" /shd/CTC/LOG/ctc_bcu_1.log* | grep $BLDG
|
||||
|
||||
|
||||
# 1102 -> 4 Aussentreppen
|
||||
# 1107 -> Aussentreppen
|
||||
# 3280 -> Aussentreppen
|
||||
# U_Bahn -> 6 Fehler 2102 2114 2131 2202 2206 2210 (Räume ohne 'Dach'
|
||||
|
||||
#bdlg_1221 ist über Eck gebaut. Center von 301 erzielt daher keinen Treffer
|
||||
|
||||
#bldg_1232 ist über Eck gebaut. Center von 110, 210, 301 erzielen daher keinen Treffer
|
||||
|
||||
#bldg_1234: Raum 106, 115, 206, 215 ist über Eck gebaut -> erzielen daher keinen Treffer
|
||||
#bldg 1244: Raum 108, 202 ist Aussentreppe
|
||||
|
||||
|
||||
done
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
|
||||
# kate /shd/CTC/TOOLS/TDS/TDS-build/bin/log4cxx_bcu.props &
|
||||
# kate /shd/CTC/LOG/ctc_bcu_1.log &
|
||||
|
||||
Executable
+101
@@ -0,0 +1,101 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
rm -v /shd/CTC/LOG/ctc_bcu_1.log*
|
||||
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# 29-10-2021: ----
|
||||
BLDGS="1111 1112 1113 1118 1119 1120 1121 1122 1123 1124 1125 1128 1130 1132 1134 1136 1138 1140 1142 1163"
|
||||
|
||||
# 03-11-2021: ----
|
||||
# zip bldgs_2021-11-03_rev5028 import_ba1_2021-11-03.csv bldg_1127* bldg_1129* bldg_1131* bldg_1133* bldg_1135* bldg_1137* bldg_1139* bldg_1141* bldg_1143* bldg_1144* bldg_1145* bldg_1146* bldg_1147* bldg_1153* bldg_1158* bldg_1167*
|
||||
BLDGS="1127 1129 1131 1133 1135 1137 1139 1141 1143 1144 1145 1146 1147 1153 1158 1167"
|
||||
|
||||
# 05-11-2021: ----
|
||||
BLDGS="1155 1159 1160 1161 1162 1164 1166 1168 1170 1172 1173"
|
||||
|
||||
# 10-11-2021
|
||||
# zip bldgs_2021-11-10_rev5135XXXX.zip import_ba1_2021-11-10.csv bldg_1174* bldg_1175* bldg_1176* bldg_1177* bldg_1178* bldg_1179* bldg_1180* bldg_1181* bldg_1182* bldg_1183* bldg_1185* bldg_1188* bldg_1191* bldg_1193* bldg_1194* bldg_1195* bldg_1196* bldg_1201* bldg_1202* bldg_1203* bldg_1204* bldg_1210* bldg_1211*
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
# zip bldgs_2021-11-12_rev5157.zip import_ba1_2021-11-12.csv bldg_1213* bldg_1215* bldg_1216* bldg_1217* bldg_1218* bldg_1219* bldg_1220* bldg_1221* bldg_1222* bldg_1223* bldg_1225* bldg_1226* bldg_1227*
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
# zip bldgs_2021-11-17_rev5217.55642.zip import_ba1_2021-11-17.csv bldg_1224* bldg_1228* bldg_1229* bldg_1230* bldg_1231* bldg_1232* bldg_1235* bldg_1237* bldg_1239* bldg_1241* bldg_1243*
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
# 19-11-2021
|
||||
# 2 Nachzuegler: 1197 1207
|
||||
# zip bldgs_2021-11-19_rev5219.XXX.zip import_ba1_2021-11-19.csv bldg_1197* bldg_1207* bldg_1234* bldg_1238* bldg_1240* bldg_1244* bldg_1245* bldg_1246* bldg_1248* bldg_1249* bldg_1257* bldg_1258* bldg_1259*
|
||||
BLDGS="1197 1207 1234 1238 1240 1244 1245 1246 1248 1249 1257 1258 1259"
|
||||
|
||||
# 24-11-2021
|
||||
# zip bldgs_2021-11-24_rev5373.55687.zip import_baX_2021-11-24.csv bldg_1165* bldg_1208* bldg_1209* bldg_1212* bldg_1236* bldg_1253* bldg_1260* bldg_1261* bldg_1262* bldg_1265* bldg_3103*
|
||||
BLDGS="1165 1208 1209 1212 1236 1253 1260 1261 1262 1265 3103"
|
||||
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
#BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
#echo " work on item: '$BLDG'"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin/BuildingControlTestVwmXml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml
|
||||
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "------------------------------------";
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo "------------------------------------";
|
||||
echo " failure on -> '$BLDG' ";
|
||||
echo " kate /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml &"
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
echo "grep for '$BLDG':";
|
||||
grep -E "WARN|ERROR|FATAL" /shd/CTC/LOG/ctc_bcu_1.log* | grep $BLDG
|
||||
|
||||
|
||||
# 1102 -> 4 Aussentreppen
|
||||
# 1107 -> Aussentreppen
|
||||
# 3280 -> Aussentreppen
|
||||
# U_Bahn -> 6 Fehler 2102 2114 2131 2202 2206 2210 (Räume ohne 'Dach'
|
||||
|
||||
#bdlg_1221 ist über Eck gebaut. Center von 301 erzielt daher keinen Treffer
|
||||
|
||||
#bldg_1232 ist über Eck gebaut. Center von 110, 210, 301 erzielen daher keinen Treffer
|
||||
|
||||
#bldg_1208 Raum 109 ist über Eck gebaut -> daher keinen Treffer
|
||||
|
||||
#bldg_1234: Raum 106, 115, 206, 215 ist über Eck gebaut -> erzielen daher keinen Treffer
|
||||
#bldg 1244: Raum 108, 202 ist Aussentreppe
|
||||
|
||||
|
||||
done
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
|
||||
# kate /shd/CTC/TOOLS/TDS/TDS-build/bin/log4cxx_bcu.props &
|
||||
# kate /shd/CTC/LOG/ctc_bcu_1.log &
|
||||
|
||||
Executable
+107
@@ -0,0 +1,107 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
rm -v /shd/CTC/LOG/ctc_bcu_1.log*
|
||||
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# 29-10-2021: ----
|
||||
BLDGS="1111 1112 1113 1118 1119 1120 1121 1122 1123 1124 1125 1128 1130 1132 1134 1136 1138 1140 1142 1163"
|
||||
|
||||
# 03-11-2021: ----
|
||||
# zip bldgs_2021-11-03_rev5028 import_ba1_2021-11-03.csv bldg_1127* bldg_1129* bldg_1131* bldg_1133* bldg_1135* bldg_1137* bldg_1139* bldg_1141* bldg_1143* bldg_1144* bldg_1145* bldg_1146* bldg_1147* bldg_1153* bldg_1158* bldg_1167*
|
||||
BLDGS="1127 1129 1131 1133 1135 1137 1139 1141 1143 1144 1145 1146 1147 1153 1158 1167"
|
||||
|
||||
# 05-11-2021: ----
|
||||
BLDGS="1155 1159 1160 1161 1162 1164 1166 1168 1170 1172 1173"
|
||||
|
||||
# 10-11-2021
|
||||
# zip bldgs_2021-11-10_rev5135XXXX.zip import_ba1_2021-11-10.csv bldg_1174* bldg_1175* bldg_1176* bldg_1177* bldg_1178* bldg_1179* bldg_1180* bldg_1181* bldg_1182* bldg_1183* bldg_1185* bldg_1188* bldg_1191* bldg_1193* bldg_1194* bldg_1195* bldg_1196* bldg_1201* bldg_1202* bldg_1203* bldg_1204* bldg_1210* bldg_1211*
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
# zip bldgs_2021-11-12_rev5157.zip import_ba1_2021-11-12.csv bldg_1213* bldg_1215* bldg_1216* bldg_1217* bldg_1218* bldg_1219* bldg_1220* bldg_1221* bldg_1222* bldg_1223* bldg_1225* bldg_1226* bldg_1227*
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
# zip bldgs_2021-11-17_rev5217.55642.zip import_ba1_2021-11-17.csv bldg_1224* bldg_1228* bldg_1229* bldg_1230* bldg_1231* bldg_1232* bldg_1235* bldg_1237* bldg_1239* bldg_1241* bldg_1243*
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
# 19-11-2021
|
||||
# 2 Nachzuegler: 1197 1207
|
||||
# zip bldgs_2021-11-19_rev5219.XXX.zip import_ba1_2021-11-19.csv bldg_1197* bldg_1207* bldg_1234* bldg_1238* bldg_1240* bldg_1244* bldg_1245* bldg_1246* bldg_1248* bldg_1249* bldg_1257* bldg_1258* bldg_1259*
|
||||
BLDGS="1197 1207 1234 1238 1240 1244 1245 1246 1248 1249 1257 1258 1259"
|
||||
|
||||
# 24-11-2021
|
||||
# zip bldgs_2021-11-24_rev5297.XXX.zip import_baX_2021-11-24.csv bldg_1165* bldg_1208* bldg_1209* bldg_1212* bldg_1236* bldg_1253* bldg_1260* bldg_1261* bldg_1262* bldg_1265* bldg_3103*
|
||||
BLDGS="1165 1208 1209 1212 1236 1253 1260 1261 1262 1265 3103"
|
||||
|
||||
# 26-11-2101
|
||||
# zip bldgs_2021-11-26_rev5418.55750.zip import_baX_2021-11-26.csv bldg_1253* bldg_1254* bldg_1255* bldg_1269* bldg_1270* bldg_1271* bldg_1273* bldg_1274* bldg_1276* bldg_1277* bldg_1278* bldg_1279* bldg_1280* bldg_1283* bldg_3104* bldg_3105* bldg_3106* bldg_3107*"
|
||||
BLDGS="1253 1254 1255 1269 1270 1271 1273 1274 1276 1277 1278 1279 1280 1283 3104 3105 3106 3107"
|
||||
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
#BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
#echo " work on item: '$BLDG'"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin/BuildingControlTestVwmXml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml
|
||||
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "------------------------------------";
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo "------------------------------------";
|
||||
echo " failure on -> '$BLDG' ";
|
||||
echo " kate /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml &"
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
echo "grep for '$BLDG':";
|
||||
grep -E "WARN|ERROR|FATAL" /shd/CTC/LOG/ctc_bcu_1.log* | grep $BLDG
|
||||
|
||||
|
||||
# 1102 -> 4 Aussentreppen
|
||||
# 1107 -> Aussentreppen
|
||||
# 3280 -> Aussentreppen
|
||||
# U_Bahn -> 6 Fehler 2102 2114 2131 2202 2206 2210 (Räume ohne 'Dach'
|
||||
|
||||
#bdlg_1221 ist über Eck gebaut. Center von 301 erzielt daher keinen Treffer
|
||||
|
||||
#bldg_1232 ist über Eck gebaut. Center von 110, 210, 301 erzielen daher keinen Treffer
|
||||
|
||||
#bldg_1208 Raum 109 ist über Eck gebaut -> daher keinen Treffer
|
||||
|
||||
#bldg_1234: Raum 106, 115, 206, 215 ist über Eck gebaut -> erzielen daher keinen Treffer
|
||||
#bldg 1244: Raum 108, 202 ist Aussentreppe
|
||||
|
||||
#bldg 1254: RefMode/BSM 11008 ist an einem Geländer angebracht. Trifft aber keinen Raum (auch nicht 301) Da es ein Geländer ist, stuife ich es als akzeptabel ein.
|
||||
|
||||
|
||||
done
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
|
||||
# kate /shd/CTC/TOOLS/TDS/TDS-build/bin/log4cxx_bcu.props &
|
||||
# kate /shd/CTC/LOG/ctc_bcu_1.log &
|
||||
|
||||
Executable
+120
@@ -0,0 +1,120 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
rm -v /shd/CTC/LOG/ctc_bcu_1.log*
|
||||
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# 29-10-2021: ----
|
||||
BLDGS="1111 1112 1113 1118 1119 1120 1121 1122 1123 1124 1125 1128 1130 1132 1134 1136 1138 1140 1142 1163"
|
||||
|
||||
# 03-11-2021: ----
|
||||
# zip bldgs_2021-11-03_rev5028 import_ba1_2021-11-03.csv bldg_1127* bldg_1129* bldg_1131* bldg_1133* bldg_1135* bldg_1137* bldg_1139* bldg_1141* bldg_1143* bldg_1144* bldg_1145* bldg_1146* bldg_1147* bldg_1153* bldg_1158* bldg_1167*
|
||||
BLDGS="1127 1129 1131 1133 1135 1137 1139 1141 1143 1144 1145 1146 1147 1153 1158 1167"
|
||||
|
||||
# 05-11-2021: ----
|
||||
BLDGS="1155 1159 1160 1161 1162 1164 1166 1168 1170 1172 1173"
|
||||
|
||||
# 10-11-2021
|
||||
# zip bldgs_2021-11-10_rev5135XXXX.zip import_ba1_2021-11-10.csv bldg_1174* bldg_1175* bldg_1176* bldg_1177* bldg_1178* bldg_1179* bldg_1180* bldg_1181* bldg_1182* bldg_1183* bldg_1185* bldg_1188* bldg_1191* bldg_1193* bldg_1194* bldg_1195* bldg_1196* bldg_1201* bldg_1202* bldg_1203* bldg_1204* bldg_1210* bldg_1211*
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
# zip bldgs_2021-11-12_rev5157.zip import_ba1_2021-11-12.csv bldg_1213* bldg_1215* bldg_1216* bldg_1217* bldg_1218* bldg_1219* bldg_1220* bldg_1221* bldg_1222* bldg_1223* bldg_1225* bldg_1226* bldg_1227*
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
# zip bldgs_2021-11-17_rev5217.55642.zip import_ba1_2021-11-17.csv bldg_1224* bldg_1228* bldg_1229* bldg_1230* bldg_1231* bldg_1232* bldg_1235* bldg_1237* bldg_1239* bldg_1241* bldg_1243*
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
# 19-11-2021
|
||||
# 2 Nachzuegler: 1197 1207
|
||||
# zip bldgs_2021-11-19_rev5219.XXX.zip import_ba1_2021-11-19.csv bldg_1197* bldg_1207* bldg_1234* bldg_1238* bldg_1240* bldg_1244* bldg_1245* bldg_1246* bldg_1248* bldg_1249* bldg_1257* bldg_1258* bldg_1259*
|
||||
BLDGS="1197 1207 1234 1238 1240 1244 1245 1246 1248 1249 1257 1258 1259"
|
||||
|
||||
# 24-11-2021
|
||||
# zip bldgs_2021-11-24_rev5297.XXX.zip import_baX_2021-11-24.csv bldg_1165* bldg_1208* bldg_1209* bldg_1212* bldg_1236* bldg_1253* bldg_1260* bldg_1261* bldg_1262* bldg_1265* bldg_3103*
|
||||
BLDGS="1165 1208 1209 1212 1236 1253 1260 1261 1262 1265 3103"
|
||||
|
||||
# 26-11-2101
|
||||
# zip bldgs_2021-11-16_revXXXX.zip import_baX_2021-11-26.csv bldg_1253* bldg_1254* bldg_1255* bldg_1269* bldg_1270* bldg_1271* bldg_1273* bldg_1274* bldg_1276* bldg_1277* bldg_1278* bldg_1279* bldg_1280* bldg_1283* bldg_3104* bldg_3105* bldg_3106* bldg_3107*"
|
||||
BLDGS="1253 1254 1255 1269 1270 1271 1273 1274 1276 1277 1278 1279 1280 1283 3104 3105 3106 3107"
|
||||
|
||||
# 01-12-2021
|
||||
# zip bldgs_2021-12-10_rev5421.55750.zip import_baX_2021-12-01.csv bldg_1256* bldg_1268* bldg_1275* bldg_1281* bldg_1282* bldg_3108* bldg_3109* bldg_3110* bldg_3111* bldg_3112* bldg_3113* bldg_3114* bldg_3115* bldg_3116* bldg_3117* bldg_3118* bldg_3119* bldg_3121* bldg_3122*
|
||||
BLDGS="1256 1268 1275 1281 1282 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3121 3122"
|
||||
|
||||
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
#BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
BLDG_STR="";
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
BLDG_STR="${BLDG_STR} bldg_${BLDG}*"
|
||||
done
|
||||
echo " copy and paste template: zip bldgs_2021-XX-XX_rev5000.XXXXX import_baX.csv $BLDG_STR"
|
||||
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
#echo " work on item: '$BLDG'"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin/BuildingControlTestVwmXml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml
|
||||
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo "------------------------------------";
|
||||
echo " failure on -> '$BLDG' ";
|
||||
echo " kate /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml &"
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
echo "grep for '$BLDG':";
|
||||
grep -E "WARN|ERROR|FATAL" /shd/CTC/LOG/ctc_bcu_1.log* | grep $BLDG
|
||||
|
||||
|
||||
# 1102 -> 4 Aussentreppen
|
||||
# 1107 -> Aussentreppen
|
||||
# 3280 -> Aussentreppen
|
||||
# U_Bahn -> 6 Fehler 2102 2114 2131 2202 2206 2210 (Räume ohne 'Dach'
|
||||
|
||||
#bdlg_1221 ist über Eck gebaut. Center von 301 erzielt daher keinen Treffer
|
||||
|
||||
#bldg_1232 ist über Eck gebaut. Center von 110, 210, 301 erzielen daher keinen Treffer
|
||||
|
||||
#bldg_1208 Raum 109 ist über Eck gebaut -> daher keinen Treffer
|
||||
|
||||
#bldg_1234: Raum 106, 115, 206, 215 ist über Eck gebaut -> erzielen daher keinen Treffer
|
||||
#bldg 1244: Raum 108, 202 ist Aussentreppe
|
||||
|
||||
#bldg 1254: RefMode/BSM 11008 ist an einem Geländer angebracht. Trifft aber keinen Raum (auch nicht 301) Da es ein Geländer ist, stuife ich es als akzeptabel ein.
|
||||
|
||||
|
||||
done
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
|
||||
# kate /shd/CTC/TOOLS/TDS/TDS-build/bin/log4cxx_bcu.props &
|
||||
# kate /shd/CTC/LOG/ctc_bcu_1.log &
|
||||
Executable
+125
@@ -0,0 +1,125 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
rm -v /shd/CTC/LOG/ctc_bcu_1.log*
|
||||
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# 29-10-2021: ----
|
||||
BLDGS="1111 1112 1113 1118 1119 1120 1121 1122 1123 1124 1125 1128 1130 1132 1134 1136 1138 1140 1142 1163"
|
||||
|
||||
# 03-11-2021: ----
|
||||
# zip bldgs_2021-11-03_rev5028 import_ba1_2021-11-03.csv bldg_1127* bldg_1129* bldg_1131* bldg_1133* bldg_1135* bldg_1137* bldg_1139* bldg_1141* bldg_1143* bldg_1144* bldg_1145* bldg_1146* bldg_1147* bldg_1153* bldg_1158* bldg_1167*
|
||||
BLDGS="1127 1129 1131 1133 1135 1137 1139 1141 1143 1144 1145 1146 1147 1153 1158 1167"
|
||||
|
||||
# 05-11-2021: ----
|
||||
BLDGS="1155 1159 1160 1161 1162 1164 1166 1168 1170 1172 1173"
|
||||
|
||||
# 10-11-2021
|
||||
# zip bldgs_2021-11-10_rev5135XXXX.zip import_ba1_2021-11-10.csv bldg_1174* bldg_1175* bldg_1176* bldg_1177* bldg_1178* bldg_1179* bldg_1180* bldg_1181* bldg_1182* bldg_1183* bldg_1185* bldg_1188* bldg_1191* bldg_1193* bldg_1194* bldg_1195* bldg_1196* bldg_1201* bldg_1202* bldg_1203* bldg_1204* bldg_1210* bldg_1211*
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
# zip bldgs_2021-11-12_rev5157.zip import_ba1_2021-11-12.csv bldg_1213* bldg_1215* bldg_1216* bldg_1217* bldg_1218* bldg_1219* bldg_1220* bldg_1221* bldg_1222* bldg_1223* bldg_1225* bldg_1226* bldg_1227*
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
# zip bldgs_2021-11-17_rev5217.55642.zip import_ba1_2021-11-17.csv bldg_1224* bldg_1228* bldg_1229* bldg_1230* bldg_1231* bldg_1232* bldg_1235* bldg_1237* bldg_1239* bldg_1241* bldg_1243*
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
# 19-11-2021
|
||||
# 2 Nachzuegler: 1197 1207
|
||||
# zip bldgs_2021-11-19_rev5219.XXX.zip import_ba1_2021-11-19.csv bldg_1197* bldg_1207* bldg_1234* bldg_1238* bldg_1240* bldg_1244* bldg_1245* bldg_1246* bldg_1248* bldg_1249* bldg_1257* bldg_1258* bldg_1259*
|
||||
BLDGS="1197 1207 1234 1238 1240 1244 1245 1246 1248 1249 1257 1258 1259"
|
||||
|
||||
# 24-11-2021
|
||||
# zip bldgs_2021-11-24_rev5297.XXX.zip import_baX_2021-11-24.csv bldg_1165* bldg_1208* bldg_1209* bldg_1212* bldg_1236* bldg_1253* bldg_1260* bldg_1261* bldg_1262* bldg_1265* bldg_3103*
|
||||
BLDGS="1165 1208 1209 1212 1236 1253 1260 1261 1262 1265 3103"
|
||||
|
||||
# 26-11-2101
|
||||
# zip bldgs_2021-11-16_revXXXX.zip import_baX_2021-11-26.csv bldg_1253* bldg_1254* bldg_1255* bldg_1269* bldg_1270* bldg_1271* bldg_1273* bldg_1274* bldg_1276* bldg_1277* bldg_1278* bldg_1279* bldg_1280* bldg_1283* bldg_3104* bldg_3105* bldg_3106* bldg_3107*"
|
||||
BLDGS="1253 1254 1255 1269 1270 1271 1273 1274 1276 1277 1278 1279 1280 1283 3104 3105 3106 3107"
|
||||
|
||||
# 01-12-2021
|
||||
# zip bldgs_2021-12-10_rev5421.55750.zip import_baX_2021-12-01.csv bldg_1256* bldg_1268* bldg_1275* bldg_1281* bldg_1282* bldg_3108* bldg_3109* bldg_3110* bldg_3111* bldg_3112* bldg_3113* bldg_3114* bldg_3115* bldg_3116* bldg_3117* bldg_3118* bldg_3119* bldg_3121* bldg_3122*
|
||||
BLDGS="1256 1268 1275 1281 1282 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3121 3122"
|
||||
|
||||
# 03-12-2021
|
||||
# cat import_baX_2021-12-03.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2021-12-03_rev5424.55750.zip import_baX.csv bldg_1251* bldg_1264* bldg_3220* bldg_3222* bldg_3224* bldg_3226* bldg_3228* bldg_3229* bldg_3266*
|
||||
# zip bldgs_2021-12-03_rev5693.55881.zip import_baX_2021-12-03.csv bldg_1251* bldg_1264* bldg_3220* bldg_3222* bldg_3224* bldg_3226* bldg_3228* bldg_3229* bldg_3266*
|
||||
BLDGS="1251 1264 3220 3222 3224 3226 3228 3229 3266"
|
||||
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
#BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
BLDG_STR="";
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
BLDG_STR="${BLDG_STR} bldg_${BLDG}*"
|
||||
done
|
||||
echo " copy and paste template: zip bldgs_2021-XX-XX_rev5000.XXXXX import_baX.csv $BLDG_STR"
|
||||
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
#echo " work on item: '$BLDG'"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin/BuildingControlTestVwmXml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml
|
||||
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo "------------------------------------";
|
||||
echo " failure on -> '$BLDG' ";
|
||||
echo " kate /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml &"
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
echo "grep for '$BLDG':";
|
||||
grep -E "WARN|ERROR|FATAL" /shd/CTC/LOG/ctc_bcu_1.log* | grep $BLDG
|
||||
|
||||
|
||||
# 1102 -> 4 Aussentreppen
|
||||
# 1107 -> Aussentreppen
|
||||
# 3280 -> Aussentreppen
|
||||
# U_Bahn -> 6 Fehler 2102 2114 2131 2202 2206 2210 (Räume ohne 'Dach'
|
||||
|
||||
#bdlg_1221 ist über Eck gebaut. Center von 301 erzielt daher keinen Treffer
|
||||
|
||||
#bldg_1232 ist über Eck gebaut. Center von 110, 210, 301 erzielen daher keinen Treffer
|
||||
|
||||
#bldg_1208 Raum 109 ist über Eck gebaut -> daher keinen Treffer
|
||||
|
||||
#bldg_1234: Raum 106, 115, 206, 215 ist über Eck gebaut -> erzielen daher keinen Treffer
|
||||
#bldg 1244: Raum 108, 202 ist Aussentreppe
|
||||
|
||||
#bldg 1254: RefMode/BSM 11008 ist an einem Geländer angebracht. Trifft aber keinen Raum (auch nicht 301) Da es ein Geländer ist, stuife ich es als akzeptabel ein.
|
||||
|
||||
|
||||
done
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
|
||||
# kate /shd/CTC/TOOLS/TDS/TDS-build/bin/log4cxx_bcu.props &
|
||||
# kate /shd/CTC/LOG/ctc_bcu_1.log &
|
||||
Executable
+130
@@ -0,0 +1,130 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
rm -v /shd/CTC/LOG/ctc_bcu_1.log*
|
||||
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# 29-10-2021: ----
|
||||
BLDGS="1111 1112 1113 1118 1119 1120 1121 1122 1123 1124 1125 1128 1130 1132 1134 1136 1138 1140 1142 1163"
|
||||
|
||||
# 03-11-2021: ----
|
||||
# zip bldgs_2021-11-03_rev5028 import_ba1_2021-11-03.csv bldg_1127* bldg_1129* bldg_1131* bldg_1133* bldg_1135* bldg_1137* bldg_1139* bldg_1141* bldg_1143* bldg_1144* bldg_1145* bldg_1146* bldg_1147* bldg_1153* bldg_1158* bldg_1167*
|
||||
BLDGS="1127 1129 1131 1133 1135 1137 1139 1141 1143 1144 1145 1146 1147 1153 1158 1167"
|
||||
|
||||
# 05-11-2021: ----
|
||||
BLDGS="1155 1159 1160 1161 1162 1164 1166 1168 1170 1172 1173"
|
||||
|
||||
# 10-11-2021
|
||||
# zip bldgs_2021-11-10_rev5135XXXX.zip import_ba1_2021-11-10.csv bldg_1174* bldg_1175* bldg_1176* bldg_1177* bldg_1178* bldg_1179* bldg_1180* bldg_1181* bldg_1182* bldg_1183* bldg_1185* bldg_1188* bldg_1191* bldg_1193* bldg_1194* bldg_1195* bldg_1196* bldg_1201* bldg_1202* bldg_1203* bldg_1204* bldg_1210* bldg_1211*
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
# zip bldgs_2021-11-12_rev5157.zip import_ba1_2021-11-12.csv bldg_1213* bldg_1215* bldg_1216* bldg_1217* bldg_1218* bldg_1219* bldg_1220* bldg_1221* bldg_1222* bldg_1223* bldg_1225* bldg_1226* bldg_1227*
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
# zip bldgs_2021-11-17_rev5217.55642.zip import_ba1_2021-11-17.csv bldg_1224* bldg_1228* bldg_1229* bldg_1230* bldg_1231* bldg_1232* bldg_1235* bldg_1237* bldg_1239* bldg_1241* bldg_1243*
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
# 19-11-2021
|
||||
# 2 Nachzuegler: 1197 1207
|
||||
# zip bldgs_2021-11-19_rev5219.XXX.zip import_ba1_2021-11-19.csv bldg_1197* bldg_1207* bldg_1234* bldg_1238* bldg_1240* bldg_1244* bldg_1245* bldg_1246* bldg_1248* bldg_1249* bldg_1257* bldg_1258* bldg_1259*
|
||||
BLDGS="1197 1207 1234 1238 1240 1244 1245 1246 1248 1249 1257 1258 1259"
|
||||
|
||||
# 24-11-2021
|
||||
# zip bldgs_2021-11-24_rev5297.XXX.zip import_baX_2021-11-24.csv bldg_1165* bldg_1208* bldg_1209* bldg_1212* bldg_1236* bldg_1253* bldg_1260* bldg_1261* bldg_1262* bldg_1265* bldg_3103*
|
||||
BLDGS="1165 1208 1209 1212 1236 1253 1260 1261 1262 1265 3103"
|
||||
|
||||
# 26-11-2101
|
||||
# zip bldgs_2021-11-16_revXXXX.zip import_baX_2021-11-26.csv bldg_1253* bldg_1254* bldg_1255* bldg_1269* bldg_1270* bldg_1271* bldg_1273* bldg_1274* bldg_1276* bldg_1277* bldg_1278* bldg_1279* bldg_1280* bldg_1283* bldg_3104* bldg_3105* bldg_3106* bldg_3107*"
|
||||
BLDGS="1253 1254 1255 1269 1270 1271 1273 1274 1276 1277 1278 1279 1280 1283 3104 3105 3106 3107"
|
||||
|
||||
# 01-12-2021
|
||||
# zip bldgs_2021-12-10_rev5421.55750.zip import_baX_2021-12-01.csv bldg_1256* bldg_1268* bldg_1275* bldg_1281* bldg_1282* bldg_3108* bldg_3109* bldg_3110* bldg_3111* bldg_3112* bldg_3113* bldg_3114* bldg_3115* bldg_3116* bldg_3117* bldg_3118* bldg_3119* bldg_3121* bldg_3122*
|
||||
BLDGS="1256 1268 1275 1281 1282 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3121 3122"
|
||||
|
||||
# 03-12-2021
|
||||
# cat import_baX_2021-12-03.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2021-12-03_rev5424.55750.zip import_baX.csv bldg_1251* bldg_1264* bldg_3220* bldg_3222* bldg_3224* bldg_3226* bldg_3228* bldg_3229* bldg_3266*
|
||||
BLDGS="1251 1264 3220 3222 3224 3226 3228 3229 3266"
|
||||
|
||||
# 08-12-2021
|
||||
# cat import_baX_2021-12-08.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2021-12-08_rev56xx.55750.zip import_baX.csv
|
||||
BLDGS="3120 3123 3124 3129 3130 3131 3135 3230 3231 3232 3233 3241 3243 3260 3264 4106 4107 4111 4112 4117 4126 4127 4128 4129 4131 4132 4134 4140 4143 4145"
|
||||
|
||||
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
#BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
BLDG_STR="";
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
BLDG_STR="${BLDG_STR} bldg_${BLDG}*"
|
||||
done
|
||||
echo " copy and paste template: zip bldgs_2021-XX-XX_rev5000.XXXXX.zip import_baX.csv $BLDG_STR"
|
||||
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
#echo " work on item: '$BLDG'"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin/BuildingControlTestVwmXml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml
|
||||
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo "------------------------------------";
|
||||
echo " failure on -> '$BLDG' ";
|
||||
echo " kate /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml &"
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
echo "grep for '$BLDG':";
|
||||
grep -E "WARN|ERROR|FATAL" /shd/CTC/LOG/ctc_bcu_1.log* | grep $BLDG
|
||||
|
||||
|
||||
# 1102 -> 4 Aussentreppen
|
||||
# 1107 -> Aussentreppen
|
||||
# 3280 -> Aussentreppen
|
||||
# U_Bahn -> 6 Fehler 2102 2114 2131 2202 2206 2210 (Räume ohne 'Dach'
|
||||
|
||||
#bdlg_1221 ist über Eck gebaut. Center von 301 erzielt daher keinen Treffer
|
||||
|
||||
#bldg_1232 ist über Eck gebaut. Center von 110, 210, 301 erzielen daher keinen Treffer
|
||||
|
||||
#bldg_1208 Raum 109 ist über Eck gebaut -> daher keinen Treffer
|
||||
|
||||
#bldg_1234: Raum 106, 115, 206, 215 ist über Eck gebaut -> erzielen daher keinen Treffer
|
||||
#bldg 1244: Raum 108, 202 ist Aussentreppe
|
||||
|
||||
#bldg 1254: RefMode/BSM 11008 ist an einem Geländer angebracht. Trifft aber keinen Raum (auch nicht 301) Da es ein Geländer ist, stuife ich es als akzeptabel ein.
|
||||
|
||||
|
||||
done
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
|
||||
# kate /shd/CTC/TOOLS/TDS/TDS-build/bin/log4cxx_bcu.props &
|
||||
# kate /shd/CTC/LOG/ctc_bcu_1.log &
|
||||
Executable
+133
@@ -0,0 +1,133 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
rm -v /shd/CTC/LOG/ctc_bcu_1.log*
|
||||
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# 29-10-2021: ----
|
||||
BLDGS="1111 1112 1113 1118 1119 1120 1121 1122 1123 1124 1125 1128 1130 1132 1134 1136 1138 1140 1142 1163"
|
||||
|
||||
# 03-11-2021: ----
|
||||
# zip bldgs_2021-11-03_rev5028 import_ba1_2021-11-03.csv bldg_1127* bldg_1129* bldg_1131* bldg_1133* bldg_1135* bldg_1137* bldg_1139* bldg_1141* bldg_1143* bldg_1144* bldg_1145* bldg_1146* bldg_1147* bldg_1153* bldg_1158* bldg_1167*
|
||||
BLDGS="1127 1129 1131 1133 1135 1137 1139 1141 1143 1144 1145 1146 1147 1153 1158 1167"
|
||||
|
||||
# 05-11-2021: ----
|
||||
BLDGS="1155 1159 1160 1161 1162 1164 1166 1168 1170 1172 1173"
|
||||
|
||||
# 10-11-2021
|
||||
# zip bldgs_2021-11-10_rev5135XXXX.zip import_ba1_2021-11-10.csv bldg_1174* bldg_1175* bldg_1176* bldg_1177* bldg_1178* bldg_1179* bldg_1180* bldg_1181* bldg_1182* bldg_1183* bldg_1185* bldg_1188* bldg_1191* bldg_1193* bldg_1194* bldg_1195* bldg_1196* bldg_1201* bldg_1202* bldg_1203* bldg_1204* bldg_1210* bldg_1211*
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
# zip bldgs_2021-11-12_rev5157.zip import_ba1_2021-11-12.csv bldg_1213* bldg_1215* bldg_1216* bldg_1217* bldg_1218* bldg_1219* bldg_1220* bldg_1221* bldg_1222* bldg_1223* bldg_1225* bldg_1226* bldg_1227*
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
# zip bldgs_2021-11-17_rev5217.55642.zip import_ba1_2021-11-17.csv bldg_1224* bldg_1228* bldg_1229* bldg_1230* bldg_1231* bldg_1232* bldg_1235* bldg_1237* bldg_1239* bldg_1241* bldg_1243*
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
# 19-11-2021
|
||||
# 2 Nachzuegler: 1197 1207
|
||||
# zip bldgs_2021-11-19_rev5219.XXX.zip import_ba1_2021-11-19.csv bldg_1197* bldg_1207* bldg_1234* bldg_1238* bldg_1240* bldg_1244* bldg_1245* bldg_1246* bldg_1248* bldg_1249* bldg_1257* bldg_1258* bldg_1259*
|
||||
BLDGS="1197 1207 1234 1238 1240 1244 1245 1246 1248 1249 1257 1258 1259"
|
||||
|
||||
# 24-11-2021
|
||||
# zip bldgs_2021-11-24_rev5297.XXX.zip import_baX_2021-11-24.csv bldg_1165* bldg_1208* bldg_1209* bldg_1212* bldg_1236* bldg_1253* bldg_1260* bldg_1261* bldg_1262* bldg_1265* bldg_3103*
|
||||
BLDGS="1165 1208 1209 1212 1236 1253 1260 1261 1262 1265 3103"
|
||||
|
||||
# 26-11-2101
|
||||
# zip bldgs_2021-11-16_revXXXX.zip import_baX_2021-11-26.csv bldg_1253* bldg_1254* bldg_1255* bldg_1269* bldg_1270* bldg_1271* bldg_1273* bldg_1274* bldg_1276* bldg_1277* bldg_1278* bldg_1279* bldg_1280* bldg_1283* bldg_3104* bldg_3105* bldg_3106* bldg_3107*"
|
||||
BLDGS="1253 1254 1255 1269 1270 1271 1273 1274 1276 1277 1278 1279 1280 1283 3104 3105 3106 3107"
|
||||
|
||||
# 01-12-2021
|
||||
# zip bldgs_2021-12-10_rev5421.55750.zip import_baX_2021-12-01.csv bldg_1256* bldg_1268* bldg_1275* bldg_1281* bldg_1282* bldg_3108* bldg_3109* bldg_3110* bldg_3111* bldg_3112* bldg_3113* bldg_3114* bldg_3115* bldg_3116* bldg_3117* bldg_3118* bldg_3119* bldg_3121* bldg_3122*
|
||||
BLDGS="1256 1268 1275 1281 1282 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3121 3122"
|
||||
|
||||
# 03-12-2021
|
||||
# cat import_baX_2021-12-03.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2021-12-03_rev5424.55750.zip import_baX.csv bldg_1251* bldg_1264* bldg_3220* bldg_3222* bldg_3224* bldg_3226* bldg_3228* bldg_3229* bldg_3266*
|
||||
BLDGS="1251 1264 3220 3222 3224 3226 3228 3229 3266"
|
||||
|
||||
# 08-12-2021
|
||||
# cat import_baX_2021-12-08.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2021-12-08_rev56xx.55750.zip import_baX.csv
|
||||
BLDGS="3120 3123 3124 3129 3130 3131 3135 3230 3231 3232 3233 3241 3243 3260 3264 4106 4107 4111 4112 4117 4126 4127 4128 4129 4131 4132 4134 4140 4143 4145"
|
||||
|
||||
# 10-12-2021
|
||||
# cat import_baX_2021-12-10.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
BLDGS="3259 3262 3267 3269 3270 3272 3273 3275 3276 4116 4139 4144 4148 4149"
|
||||
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
#BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
BLDG_STR="";
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
BLDG_STR="${BLDG_STR} bldg_${BLDG}*"
|
||||
done
|
||||
echo " copy and paste template: zip bldgs_2021-XX-XX_rev5000.XXXXX.zip import_baX.csv $BLDG_STR"
|
||||
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
#echo " work on item: '$BLDG'"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin/BuildingControlTestVwmXml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml
|
||||
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo "------------------------------------";
|
||||
echo " failure on -> '$BLDG' ";
|
||||
echo " kate /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml &"
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
echo "grep for '$BLDG':";
|
||||
grep -E "WARN|ERROR|FATAL" /shd/CTC/LOG/ctc_bcu_1.log* | grep $BLDG
|
||||
|
||||
|
||||
# 1102 -> 4 Aussentreppen
|
||||
# 1107 -> Aussentreppen
|
||||
# 3280 -> Aussentreppen
|
||||
# U_Bahn -> 6 Fehler 2102 2114 2131 2202 2206 2210 (Räume ohne 'Dach'
|
||||
|
||||
#bdlg_1221 ist über Eck gebaut. Center von 301 erzielt daher keinen Treffer
|
||||
|
||||
#bldg_1232 ist über Eck gebaut. Center von 110, 210, 301 erzielen daher keinen Treffer
|
||||
|
||||
#bldg_1208 Raum 109 ist über Eck gebaut -> daher keinen Treffer
|
||||
|
||||
#bldg_1234: Raum 106, 115, 206, 215 ist über Eck gebaut -> erzielen daher keinen Treffer
|
||||
#bldg 1244: Raum 108, 202 ist Aussentreppe
|
||||
|
||||
#bldg 1254: RefMode/BSM 11008 ist an einem Geländer angebracht. Trifft aber keinen Raum (auch nicht 301) Da es ein Geländer ist, stuife ich es als akzeptabel ein.
|
||||
|
||||
|
||||
done
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
|
||||
# kate /shd/CTC/TOOLS/TDS/TDS-build/bin/log4cxx_bcu.props &
|
||||
# kate /shd/CTC/LOG/ctc_bcu_1.log &
|
||||
Executable
+139
@@ -0,0 +1,139 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
rm -v /shd/CTC/LOG/ctc_bcu_1.log*
|
||||
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# 29-10-2021: ----
|
||||
BLDGS="1111 1112 1113 1118 1119 1120 1121 1122 1123 1124 1125 1128 1130 1132 1134 1136 1138 1140 1142 1163"
|
||||
|
||||
# 03-11-2021: ----
|
||||
# zip bldgs_2021-11-03_rev5028 import_ba1_2021-11-03.csv bldg_1127* bldg_1129* bldg_1131* bldg_1133* bldg_1135* bldg_1137* bldg_1139* bldg_1141* bldg_1143* bldg_1144* bldg_1145* bldg_1146* bldg_1147* bldg_1153* bldg_1158* bldg_1167*
|
||||
BLDGS="1127 1129 1131 1133 1135 1137 1139 1141 1143 1144 1145 1146 1147 1153 1158 1167"
|
||||
|
||||
# 05-11-2021: ----
|
||||
BLDGS="1155 1159 1160 1161 1162 1164 1166 1168 1170 1172 1173"
|
||||
|
||||
# 10-11-2021
|
||||
# zip bldgs_2021-11-10_rev5135XXXX.zip import_ba1_2021-11-10.csv bldg_1174* bldg_1175* bldg_1176* bldg_1177* bldg_1178* bldg_1179* bldg_1180* bldg_1181* bldg_1182* bldg_1183* bldg_1185* bldg_1188* bldg_1191* bldg_1193* bldg_1194* bldg_1195* bldg_1196* bldg_1201* bldg_1202* bldg_1203* bldg_1204* bldg_1210* bldg_1211*
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
# zip bldgs_2021-11-12_rev5157.zip import_ba1_2021-11-12.csv bldg_1213* bldg_1215* bldg_1216* bldg_1217* bldg_1218* bldg_1219* bldg_1220* bldg_1221* bldg_1222* bldg_1223* bldg_1225* bldg_1226* bldg_1227*
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
# zip bldgs_2021-11-17_rev5217.55642.zip import_ba1_2021-11-17.csv bldg_1224* bldg_1228* bldg_1229* bldg_1230* bldg_1231* bldg_1232* bldg_1235* bldg_1237* bldg_1239* bldg_1241* bldg_1243*
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
# 19-11-2021
|
||||
# 2 Nachzuegler: 1197 1207
|
||||
# zip bldgs_2021-11-19_rev5219.XXX.zip import_ba1_2021-11-19.csv bldg_1197* bldg_1207* bldg_1234* bldg_1238* bldg_1240* bldg_1244* bldg_1245* bldg_1246* bldg_1248* bldg_1249* bldg_1257* bldg_1258* bldg_1259*
|
||||
BLDGS="1197 1207 1234 1238 1240 1244 1245 1246 1248 1249 1257 1258 1259"
|
||||
|
||||
# 24-11-2021
|
||||
# zip bldgs_2021-11-24_rev5297.XXX.zip import_baX_2021-11-24.csv bldg_1165* bldg_1208* bldg_1209* bldg_1212* bldg_1236* bldg_1253* bldg_1260* bldg_1261* bldg_1262* bldg_1265* bldg_3103*
|
||||
BLDGS="1165 1208 1209 1212 1236 1253 1260 1261 1262 1265 3103"
|
||||
|
||||
# 26-11-2101
|
||||
# zip bldgs_2021-11-16_revXXXX.zip import_baX_2021-11-26.csv bldg_1253* bldg_1254* bldg_1255* bldg_1269* bldg_1270* bldg_1271* bldg_1273* bldg_1274* bldg_1276* bldg_1277* bldg_1278* bldg_1279* bldg_1280* bldg_1283* bldg_3104* bldg_3105* bldg_3106* bldg_3107*"
|
||||
BLDGS="1253 1254 1255 1269 1270 1271 1273 1274 1276 1277 1278 1279 1280 1283 3104 3105 3106 3107"
|
||||
|
||||
# 01-12-2021
|
||||
# zip bldgs_2021-12-10_rev5421.55750.zip import_baX_2021-12-01.csv bldg_1256* bldg_1268* bldg_1275* bldg_1281* bldg_1282* bldg_3108* bldg_3109* bldg_3110* bldg_3111* bldg_3112* bldg_3113* bldg_3114* bldg_3115* bldg_3116* bldg_3117* bldg_3118* bldg_3119* bldg_3121* bldg_3122*
|
||||
BLDGS="1256 1268 1275 1281 1282 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3121 3122"
|
||||
|
||||
# 03-12-2021
|
||||
# cat import_baX_2021-12-03.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2021-12-03_rev5424.55750.zip import_baX.csv bldg_1251* bldg_1264* bldg_3220* bldg_3222* bldg_3224* bldg_3226* bldg_3228* bldg_3229* bldg_3266*
|
||||
BLDGS="1251 1264 3220 3222 3224 3226 3228 3229 3266"
|
||||
|
||||
# 08-12-2021
|
||||
# cat import_baX_2021-12-08.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2021-12-08_rev56xx.55750.zip import_baX.csv
|
||||
BLDGS="3120 3123 3124 3129 3130 3131 3135 3230 3231 3232 3233 3241 3243 3260 3264 4106 4107 4111 4112 4117 4126 4127 4128 4129 4131 4132 4134 4140 4143 4145"
|
||||
|
||||
# 10-12-2021
|
||||
# cat import_baX_2021-12-10.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
BLDGS="3259 3262 3267 3269 3270 3272 3273 3275 3276 4116 4139 4144 4148 4149"
|
||||
|
||||
|
||||
# 15-12-2021
|
||||
# cat import_baX_2021-12-15.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
|
||||
#zip bldgs_2021-12-15_rev5693.55881.zip import_baX_2021-12-15.csv bldg_3120* bldg_3123* bldg_3124* bldg_3129* bldg_3132* bldg_3136* bldg_3246* bldg_3248* bldg_3249* bldg_3256* bldg_3257* bldg_3258* bldg_3259* bldg_3260* bldg_3261* bldg_3263* bldg_3268* bldg_3278* bldg_3281* bldg_3282* bldg_3283* bldg_3284* bldg_3285* bldg_3287* bldg_3288* bldg_3289* bldg_3290* bldg_3291* bldg_3292* bldg_3293* bldg_3294* bldg_3295* bldg_4108* bldg_4113* bldg_4133* bldg_4141* bldg_4145* bldg_4146* bldg_4150* bldg_4151* bldg_4152* bldg_4153* bldg_4154* bldg_4156* bldg_4157* bldg_4158* bldg_4159* bldg_4160* bldg_4161* bldg_4162* bldg_4164* bldg_4165* bldg_4166* bldg_4167* bldg_4168* bldg_4169* bldg_4170* bldg_4171* bldg_4172* bldg_4173* bldg_4174* bldg_4175* bldg_4176* bldg_4177* bldg_4178* bldg_4179* bldg_4180* bldg_4183* bldg_4184* bldg_4185* bldg_4186* bldg_4187* bldg_4188* bldg_4189* bldg_4190* bldg_4191* bldg_4192* bldg_4193*
|
||||
BLDGS="3120 3123 3124 3129 3132 3136 3246 3248 3249 3256 3257 3258 3259 3260 3261 3263 3268 3278 3281 3282 3283 3284 3285 3287 3288 3289 3290 3291 3292 3293 3294 3295 4108 4113 4133 4141 4145 4146 4150 4151 4152 4153 4154 4156 4157 4158 4159 4160 4161 4162 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
#BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
BLDG_STR="";
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
BLDG_STR="${BLDG_STR} bldg_${BLDG}*"
|
||||
done
|
||||
echo " copy and paste template: zip bldgs_2021-XX-XX_rev5000.XXXXX.zip import_baX.csv $BLDG_STR"
|
||||
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
#echo " work on item: '$BLDG'"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin/BuildingControlTestVwmXml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml
|
||||
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo "------------------------------------";
|
||||
echo " failure on -> '$BLDG' ";
|
||||
echo " kate /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml &"
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
echo "grep for '$BLDG':";
|
||||
grep -E "WARN|ERROR|FATAL" /shd/CTC/LOG/ctc_bcu_1.log* | grep $BLDG
|
||||
|
||||
|
||||
# 1102 -> 4 Aussentreppen
|
||||
# 1107 -> Aussentreppen
|
||||
# 3280 -> Aussentreppen
|
||||
# U_Bahn -> 6 Fehler 2102 2114 2131 2202 2206 2210 (Räume ohne 'Dach'
|
||||
|
||||
#bdlg_1221 ist über Eck gebaut. Center von 301 erzielt daher keinen Treffer
|
||||
|
||||
#bldg_1232 ist über Eck gebaut. Center von 110, 210, 301 erzielen daher keinen Treffer
|
||||
|
||||
#bldg_1208 Raum 109 ist über Eck gebaut -> daher keinen Treffer
|
||||
|
||||
#bldg_1234: Raum 106, 115, 206, 215 ist über Eck gebaut -> erzielen daher keinen Treffer
|
||||
#bldg 1244: Raum 108, 202 ist Aussentreppe
|
||||
|
||||
#bldg 1254: RefMode/BSM 11008 ist an einem Geländer angebracht. Trifft aber keinen Raum (auch nicht 301) Da es ein Geländer ist, stuife ich es als akzeptabel ein.
|
||||
|
||||
|
||||
done
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
|
||||
# kate /shd/CTC/TOOLS/TDS/TDS-build/bin/log4cxx_bcu.props &
|
||||
# kate /shd/CTC/LOG/ctc_bcu_1.log &
|
||||
Executable
+152
@@ -0,0 +1,152 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
rm -v /shd/CTC/LOG/ctc_bcu_1.log*
|
||||
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# 29-10-2021: ----
|
||||
BLDGS="1111 1112 1113 1118 1119 1120 1121 1122 1123 1124 1125 1128 1130 1132 1134 1136 1138 1140 1142 1163"
|
||||
|
||||
# 03-11-2021: ----
|
||||
# zip bldgs_2021-11-03_rev5028 import_ba1_2021-11-03.csv bldg_1127* bldg_1129* bldg_1131* bldg_1133* bldg_1135* bldg_1137* bldg_1139* bldg_1141* bldg_1143* bldg_1144* bldg_1145* bldg_1146* bldg_1147* bldg_1153* bldg_1158* bldg_1167*
|
||||
BLDGS="1127 1129 1131 1133 1135 1137 1139 1141 1143 1144 1145 1146 1147 1153 1158 1167"
|
||||
|
||||
# 05-11-2021: ----
|
||||
BLDGS="1155 1159 1160 1161 1162 1164 1166 1168 1170 1172 1173"
|
||||
|
||||
# 10-11-2021
|
||||
# zip bldgs_2021-11-10_rev5135XXXX.zip import_ba1_2021-11-10.csv bldg_1174* bldg_1175* bldg_1176* bldg_1177* bldg_1178* bldg_1179* bldg_1180* bldg_1181* bldg_1182* bldg_1183* bldg_1185* bldg_1188* bldg_1191* bldg_1193* bldg_1194* bldg_1195* bldg_1196* bldg_1201* bldg_1202* bldg_1203* bldg_1204* bldg_1210* bldg_1211*
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
# zip bldgs_2021-11-12_rev5157.zip import_ba1_2021-11-12.csv bldg_1213* bldg_1215* bldg_1216* bldg_1217* bldg_1218* bldg_1219* bldg_1220* bldg_1221* bldg_1222* bldg_1223* bldg_1225* bldg_1226* bldg_1227*
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
# zip bldgs_2021-11-17_rev5217.55642.zip import_ba1_2021-11-17.csv bldg_1224* bldg_1228* bldg_1229* bldg_1230* bldg_1231* bldg_1232* bldg_1235* bldg_1237* bldg_1239* bldg_1241* bldg_1243*
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
# 19-11-2021
|
||||
# 2 Nachzuegler: 1197 1207
|
||||
# zip bldgs_2021-11-19_rev5219.XXX.zip import_ba1_2021-11-19.csv bldg_1197* bldg_1207* bldg_1234* bldg_1238* bldg_1240* bldg_1244* bldg_1245* bldg_1246* bldg_1248* bldg_1249* bldg_1257* bldg_1258* bldg_1259*
|
||||
BLDGS="1197 1207 1234 1238 1240 1244 1245 1246 1248 1249 1257 1258 1259"
|
||||
|
||||
# 24-11-2021
|
||||
# zip bldgs_2021-11-24_rev5297.XXX.zip import_baX_2021-11-24.csv bldg_1165* bldg_1208* bldg_1209* bldg_1212* bldg_1236* bldg_1253* bldg_1260* bldg_1261* bldg_1262* bldg_1265* bldg_3103*
|
||||
BLDGS="1165 1208 1209 1212 1236 1253 1260 1261 1262 1265 3103"
|
||||
|
||||
# 26-11-2101
|
||||
# zip bldgs_2021-11-16_revXXXX.zip import_baX_2021-11-26.csv bldg_1253* bldg_1254* bldg_1255* bldg_1269* bldg_1270* bldg_1271* bldg_1273* bldg_1274* bldg_1276* bldg_1277* bldg_1278* bldg_1279* bldg_1280* bldg_1283* bldg_3104* bldg_3105* bldg_3106* bldg_3107*"
|
||||
BLDGS="1253 1254 1255 1269 1270 1271 1273 1274 1276 1277 1278 1279 1280 1283 3104 3105 3106 3107"
|
||||
|
||||
# 01-12-2021
|
||||
# zip bldgs_2021-12-10_rev5421.55750.zip import_baX_2021-12-01.csv bldg_1256* bldg_1268* bldg_1275* bldg_1281* bldg_1282* bldg_3108* bldg_3109* bldg_3110* bldg_3111* bldg_3112* bldg_3113* bldg_3114* bldg_3115* bldg_3116* bldg_3117* bldg_3118* bldg_3119* bldg_3121* bldg_3122*
|
||||
BLDGS="1256 1268 1275 1281 1282 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3121 3122"
|
||||
|
||||
# 03-12-2021
|
||||
# cat import_baX_2021-12-03.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2021-12-03_rev5424.55750.zip import_baX.csv bldg_1251* bldg_1264* bldg_3220* bldg_3222* bldg_3224* bldg_3226* bldg_3228* bldg_3229* bldg_3266*
|
||||
BLDGS="1251 1264 3220 3222 3224 3226 3228 3229 3266"
|
||||
|
||||
# 08-12-2021
|
||||
# cat import_baX_2021-12-08.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2021-12-08_rev56xx.55750.zip import_baX.csv
|
||||
BLDGS="3120 3123 3124 3129 3130 3131 3135 3230 3231 3232 3233 3241 3243 3260 3264 4106 4107 4111 4112 4117 4126 4127 4128 4129 4131 4132 4134 4140 4143 4145"
|
||||
|
||||
# 10-12-2021
|
||||
# cat import_baX_2021-12-10.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
BLDGS="3259 3262 3267 3269 3270 3272 3273 3275 3276 4116 4139 4144 4148 4149"
|
||||
|
||||
|
||||
# 15-12-2021
|
||||
# cat import_baX_2021-12-15.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
|
||||
#zip bldgs_2021-12-15_rev5693.55881.zip import_baX_2021-12-15.csv bldg_3120* bldg_3123* bldg_3124* bldg_3129* bldg_3132* bldg_3136* bldg_3246* bldg_3248* bldg_3249* bldg_3256* bldg_3257* bldg_3258* bldg_3259* bldg_3260* bldg_3261* bldg_3263* bldg_3268* bldg_3278* bldg_3281* bldg_3282* bldg_3283* bldg_3284* bldg_3285* bldg_3287* bldg_3288* bldg_3289* bldg_3290* bldg_3291* bldg_3292* bldg_3293* bldg_3294* bldg_3295* bldg_4108* bldg_4113* bldg_4133* bldg_4141* bldg_4145* bldg_4146* bldg_4150* bldg_4151* bldg_4152* bldg_4153* bldg_4154* bldg_4156* bldg_4157* bldg_4158* bldg_4159* bldg_4160* bldg_4161* bldg_4162* bldg_4164* bldg_4165* bldg_4166* bldg_4167* bldg_4168* bldg_4169* bldg_4170* bldg_4171* bldg_4172* bldg_4173* bldg_4174* bldg_4175* bldg_4176* bldg_4177* bldg_4178* bldg_4179* bldg_4180* bldg_4183* bldg_4184* bldg_4185* bldg_4186* bldg_4187* bldg_4188* bldg_4189* bldg_4190* bldg_4191* bldg_4192* bldg_4193*
|
||||
BLDGS="3120 3123 3124 3129 3132 3136 3246 3248 3249 3256 3257 3258 3259 3260 3261 3263 3268 3278 3281 3282 3283 3284 3285 3287 3288 3289 3290 3291 3292 3293 3294 3295 4108 4113 4133 4141 4145 4146 4150 4151 4152 4153 4154 4156 4157 4158 4159 4160 4161 4162 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193"
|
||||
|
||||
|
||||
|
||||
# 17-12-2021
|
||||
# cat import_baX_2021-12-17.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2021-12-17_rev5791.55881.zip import_baX_2021-12-17.csv bldg_1205* bldg_1250* bldg_1272* bldg_3125* bldg_3126* bldg_3127* bldg_3128* bldg_3133* bldg_3234* bldg_3141* bldg_3141* bldg_3234* bldg_3235* bldg_3236* bldg_3237* bldg_3238* bldg_3239* bldg_3240* bldg_3244* bldg_3245* bldg_3247* bldg_3250* bldg_3251* bldg_3252* bldg_3253* bldg_3255* bldg_3265* bldg_3271* bldg_3274* bldg_3277* bldg_3296* bldg_3297* bldg_4104* bldg_4105* bldg_4109* bldg_4110* bldg_4114* bldg_4135* bldg_4136* bldg_4142* bldg_4163* bldg_4181* bldg_4182* bldg_4194* bldg_4196*
|
||||
BLDGS="1205 1250 1272 3125 3126 3127 3128 3133 3134 3141_26 3141_27 3234 3235 3236 3237 3238 3239 3240 3244 3245 3247 3250 3251 3252 3253 3255 3265 3271 3274 3277 3296 3297 4104 4105 4109 4110 4114 4135 4136 4142 4163 4181 4182 4194 4196"
|
||||
|
||||
|
||||
#BLDGS="4127"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
#BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
BLDG_STR="";
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
BLDG_STR="${BLDG_STR} bldg_${BLDG}*"
|
||||
done
|
||||
echo " copy and paste template: zip bldgs_2021-XX-XX_rev5000.XXXXX.zip import_baX.csv $BLDG_STR"
|
||||
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
#echo " work on item: '$BLDG'"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin/BuildingControlTestVwmXml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml
|
||||
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo "------------------------------------";
|
||||
echo " failure on -> '$BLDG' ";
|
||||
echo " kate /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml &"
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
echo "grep for '$BLDG':";
|
||||
grep -E "WARN|ERROR|FATAL" /shd/CTC/LOG/ctc_bcu_1.log* | grep $BLDG
|
||||
|
||||
|
||||
# bldg_1102 -> 4 Aussentreppen
|
||||
# bldg_1107 -> Aussentreppen
|
||||
# bldg_3280 -> Aussentreppen
|
||||
# U_Bahn -> 6 Fehler 2102 2114 2131 2202 2206 2210 (Räume ohne 'Dach')
|
||||
|
||||
#bldg_1208 Raum 109 ist über Eck gebaut -> daher keinen Treffer
|
||||
#bdlg_1221 ist über Eck gebaut. Center von 301 erzielt daher keinen Treffer
|
||||
#bldg_1232 ist über Eck gebaut. Center von 110, 210, 301 erzielen daher keinen Treffer
|
||||
#bldg_1234: Raum 106, 115, 206, 215, 304 ist über Eck gebaut -> erzielen daher keinen Treffer
|
||||
#bldg_1239: 2108, 2207 -> Aussentreppe
|
||||
#bldg_1240: 2104, 2202 -> Aussentreppe
|
||||
#bldg 1244: Raum 108, 202 ist Aussentreppe
|
||||
#bldg 1254: RefMode/BSM 11008 ist an einem Geländer angebracht. Trifft aber keinen Raum (auch nicht 301) Da es ein Geländer ist, stufe ich es als akzeptabel ein.
|
||||
|
||||
#bldg_3132: Raum 2114, 2214, 2314, 2401 sind über Eck gebaut -> erzielen daher keinen Treffer
|
||||
#bldg_3133: Krankenhaus: 2309 ist über Eck gebaut -> erzielen daher keinen Treffer
|
||||
#bldg_3264: Raum 2102 ist ein Innenhof -> according outterWalls (#=55) are vertical?
|
||||
|
||||
#bldg_4169, 4170, 4171, 4172, 4173, 4174, 4175, 4176, 4177 -> Aussentreppe according outterWalls (#=55) are vertical?
|
||||
|
||||
done
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
|
||||
# kate /shd/CTC/TOOLS/TDS/TDS-build/bin/log4cxx_bcu.props &
|
||||
# kate /shd/CTC/LOG/ctc_bcu_1.log &
|
||||
Executable
+161
@@ -0,0 +1,161 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
rm -v /shd/CTC/LOG/ctc_bcu_1.log*
|
||||
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# 29-10-2021: ----
|
||||
BLDGS="1111 1112 1113 1118 1119 1120 1121 1122 1123 1124 1125 1128 1130 1132 1134 1136 1138 1140 1142 1163"
|
||||
|
||||
# 03-11-2021: ----
|
||||
# zip bldgs_2021-11-03_rev5028 import_ba1_2021-11-03.csv bldg_1127* bldg_1129* bldg_1131* bldg_1133* bldg_1135* bldg_1137* bldg_1139* bldg_1141* bldg_1143* bldg_1144* bldg_1145* bldg_1146* bldg_1147* bldg_1153* bldg_1158* bldg_1167*
|
||||
BLDGS="1127 1129 1131 1133 1135 1137 1139 1141 1143 1144 1145 1146 1147 1153 1158 1167"
|
||||
|
||||
# 05-11-2021: ----
|
||||
BLDGS="1155 1159 1160 1161 1162 1164 1166 1168 1170 1172 1173"
|
||||
|
||||
# 10-11-2021
|
||||
# zip bldgs_2021-11-10_rev5135XXXX.zip import_ba1_2021-11-10.csv bldg_1174* bldg_1175* bldg_1176* bldg_1177* bldg_1178* bldg_1179* bldg_1180* bldg_1181* bldg_1182* bldg_1183* bldg_1185* bldg_1188* bldg_1191* bldg_1193* bldg_1194* bldg_1195* bldg_1196* bldg_1201* bldg_1202* bldg_1203* bldg_1204* bldg_1210* bldg_1211*
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
# zip bldgs_2021-11-12_rev5157.zip import_ba1_2021-11-12.csv bldg_1213* bldg_1215* bldg_1216* bldg_1217* bldg_1218* bldg_1219* bldg_1220* bldg_1221* bldg_1222* bldg_1223* bldg_1225* bldg_1226* bldg_1227*
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
# zip bldgs_2021-11-17_rev5217.55642.zip import_ba1_2021-11-17.csv bldg_1224* bldg_1228* bldg_1229* bldg_1230* bldg_1231* bldg_1232* bldg_1235* bldg_1237* bldg_1239* bldg_1241* bldg_1243*
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
# 19-11-2021
|
||||
# 2 Nachzuegler: 1197 1207
|
||||
# zip bldgs_2021-11-19_rev5219.XXX.zip import_ba1_2021-11-19.csv bldg_1197* bldg_1207* bldg_1234* bldg_1238* bldg_1240* bldg_1244* bldg_1245* bldg_1246* bldg_1248* bldg_1249* bldg_1257* bldg_1258* bldg_1259*
|
||||
BLDGS="1197 1207 1234 1238 1240 1244 1245 1246 1248 1249 1257 1258 1259"
|
||||
|
||||
# 24-11-2021
|
||||
# zip bldgs_2021-11-24_rev5297.XXX.zip import_baX_2021-11-24.csv bldg_1165* bldg_1208* bldg_1209* bldg_1212* bldg_1236* bldg_1253* bldg_1260* bldg_1261* bldg_1262* bldg_1265* bldg_3103*
|
||||
BLDGS="1165 1208 1209 1212 1236 1253 1260 1261 1262 1265 3103"
|
||||
|
||||
# 26-11-2101
|
||||
# zip bldgs_2021-11-16_revXXXX.zip import_baX_2021-11-26.csv bldg_1253* bldg_1254* bldg_1255* bldg_1269* bldg_1270* bldg_1271* bldg_1273* bldg_1274* bldg_1276* bldg_1277* bldg_1278* bldg_1279* bldg_1280* bldg_1283* bldg_3104* bldg_3105* bldg_3106* bldg_3107*"
|
||||
BLDGS="1253 1254 1255 1269 1270 1271 1273 1274 1276 1277 1278 1279 1280 1283 3104 3105 3106 3107"
|
||||
|
||||
# 01-12-2021
|
||||
# zip bldgs_2021-12-10_rev5421.55750.zip import_baX_2021-12-01.csv bldg_1256* bldg_1268* bldg_1275* bldg_1281* bldg_1282* bldg_3108* bldg_3109* bldg_3110* bldg_3111* bldg_3112* bldg_3113* bldg_3114* bldg_3115* bldg_3116* bldg_3117* bldg_3118* bldg_3119* bldg_3121* bldg_3122*
|
||||
BLDGS="1256 1268 1275 1281 1282 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3121 3122"
|
||||
|
||||
# 03-12-2021
|
||||
# cat import_baX_2021-12-03.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2021-12-03_rev5424.55750.zip import_baX.csv bldg_1251* bldg_1264* bldg_3220* bldg_3222* bldg_3224* bldg_3226* bldg_3228* bldg_3229* bldg_3266*
|
||||
BLDGS="1251 1264 3220 3222 3224 3226 3228 3229 3266"
|
||||
|
||||
# 08-12-2021
|
||||
# cat import_baX_2021-12-08.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2021-12-08_rev56xx.55750.zip import_baX.csv
|
||||
BLDGS="3120 3123 3124 3129 3130 3131 3135 3230 3231 3232 3233 3241 3243 3260 3264 4106 4107 4111 4112 4117 4126 4127 4128 4129 4131 4132 4134 4140 4143 4145"
|
||||
|
||||
# 10-12-2021
|
||||
# cat import_baX_2021-12-10.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
BLDGS="3259 3262 3267 3269 3270 3272 3273 3275 3276 4116 4139 4144 4148 4149"
|
||||
|
||||
|
||||
# 15-12-2021
|
||||
# cat import_baX_2021-12-15.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
|
||||
#zip bldgs_2021-12-15_rev5693.55881.zip import_baX_2021-12-15.csv bldg_3120* bldg_3123* bldg_3124* bldg_3129* bldg_3132* bldg_3136* bldg_3246* bldg_3248* bldg_3249* bldg_3256* bldg_3257* bldg_3258* bldg_3259* bldg_3260* bldg_3261* bldg_3263* bldg_3268* bldg_3278* bldg_3281* bldg_3282* bldg_3283* bldg_3284* bldg_3285* bldg_3287* bldg_3288* bldg_3289* bldg_3290* bldg_3291* bldg_3292* bldg_3293* bldg_3294* bldg_3295* bldg_4108* bldg_4113* bldg_4133* bldg_4141* bldg_4145* bldg_4146* bldg_4150* bldg_4151* bldg_4152* bldg_4153* bldg_4154* bldg_4156* bldg_4157* bldg_4158* bldg_4159* bldg_4160* bldg_4161* bldg_4162* bldg_4164* bldg_4165* bldg_4166* bldg_4167* bldg_4168* bldg_4169* bldg_4170* bldg_4171* bldg_4172* bldg_4173* bldg_4174* bldg_4175* bldg_4176* bldg_4177* bldg_4178* bldg_4179* bldg_4180* bldg_4183* bldg_4184* bldg_4185* bldg_4186* bldg_4187* bldg_4188* bldg_4189* bldg_4190* bldg_4191* bldg_4192* bldg_4193*
|
||||
BLDGS="3120 3123 3124 3129 3132 3136 3246 3248 3249 3256 3257 3258 3259 3260 3261 3263 3268 3278 3281 3282 3283 3284 3285 3287 3288 3289 3290 3291 3292 3293 3294 3295 4108 4113 4133 4141 4145 4146 4150 4151 4152 4153 4154 4156 4157 4158 4159 4160 4161 4162 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193"
|
||||
|
||||
|
||||
|
||||
# 17-12-2021
|
||||
# cat import_baX_2021-12-17.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2021-12-17_rev5791.55881.zip import_baX_2021-12-17.csv bldg_1205* bldg_1250* bldg_1272* bldg_3125* bldg_3126* bldg_3127* bldg_3128* bldg_3133* bldg_3234* bldg_3141* bldg_3141* bldg_3234* bldg_3235* bldg_3236* bldg_3237* bldg_3238* bldg_3239* bldg_3240* bldg_3244* bldg_3245* bldg_3247* bldg_3250* bldg_3251* bldg_3252* bldg_3253* bldg_3255* bldg_3265* bldg_3271* bldg_3274* bldg_3277* bldg_3296* bldg_3297* bldg_4104* bldg_4105* bldg_4109* bldg_4110* bldg_4114* bldg_4135* bldg_4136* bldg_4142* bldg_4163* bldg_4181* bldg_4182* bldg_4194* bldg_4196*
|
||||
BLDGS="1205 1250 1272 3125 3126 3127 3128 3133 3134 3141_26 3141_27 3234 3235 3236 3237 3238 3239 3240 3244 3245 3247 3250 3251 3252 3253 3255 3265 3271 3274 3277 3296 3297 4104 4105 4109 4110 4114 4135 4136 4142 4163 4181 4182 4194 4196"
|
||||
|
||||
# 05-01-2022
|
||||
# cat import_baX_2022-01-05.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2022-01-05_rev5791.55881.zip import_baX_2021-12-17.csv 1148* 1150* 1151* 1152* 1154* 1155* 1156* 1157* 1169* 1171* 1214* 1242* 1247* 1263* 1284* 3137* 3138* 3139* 3140* 3142* 3143* 3144* 3148* 3149* 3150* 3151* 3152* 3153BLDGS="1148* 1150* 1151* 1152* 1154* 1155* 1156* 1157* 1169* 1171* 1214* 1242* 1247* 1263* 1284* 3137* 3138* 3139* 3140* 3142* 3143* 3144* 3148* 3149* 3150* 3151* 3152* 3153* 3154* 3155* 3156* 3157* 3158* 3159* 3160* 3161*
|
||||
BLDGS="1148 1150 1151 1152 1154 1155 1156 1157 1169 1171 1214 1242 1247 1263 1284 3137 3138 3139 3140 3142 3143 3144 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161"
|
||||
|
||||
|
||||
#BLDGS="3138"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
#BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
BLDG_STR="";
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
BLDG_STR="${BLDG_STR} bldg_${BLDG}*"
|
||||
done
|
||||
echo " copy and paste template: zip bldgs_2021-XX-XX_rev5000.XXXXX.zip import_baX.csv $BLDG_STR"
|
||||
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
#echo " work on item: '$BLDG'"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin/BuildingControlTestVwmXml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml
|
||||
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo "------------------------------------";
|
||||
echo " failure on -> '$BLDG' ";
|
||||
echo " kate /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml &"
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
echo "grep for '$BLDG':";
|
||||
grep -E "WARN|ERROR|FATAL" /shd/CTC/LOG/ctc_bcu_1.log* | grep $BLDG
|
||||
|
||||
|
||||
# bldg_1102 -> 4 Aussentreppen
|
||||
# bldg_1107 -> Aussentreppen
|
||||
# bldg_3280 -> Aussentreppen
|
||||
# U_Bahn -> 6 Fehler 2102 2114 2131 2202 2206 2210 (Räume ohne 'Dach')
|
||||
|
||||
#bldg_1208 Raum 109 ist über Eck gebaut -> daher keinen Treffer
|
||||
#bdlg_1221 ist über Eck gebaut. Center von 301 erzielt daher keinen Treffer
|
||||
#bldg_1232 ist über Eck gebaut. Center von 110, 210, 301 erzielen daher keinen Treffer
|
||||
#bldg_1234: Raum 106, 115, 206, 215, 304 ist über Eck gebaut -> erzielen daher keinen Treffer
|
||||
#bldg_1239: 2108, 2207 -> Aussentreppe
|
||||
#bldg_1240: 2104, 2202 -> Aussentreppe
|
||||
#bldg_1242: 2103, 2203, 2302 -> Aussentreppe
|
||||
#bldg 1244: Raum 108, 202 ist Aussentreppe
|
||||
#bldg 1254: RefMode/BSM 11008 ist an einem Geländer angebracht. Trifft aber keinen Raum (auch nicht 301) Da es ein Geländer ist, stufe ich es als akzeptabel ein.
|
||||
|
||||
#bldg_3132: Raum 2114, 2214, 2314, 2401 sind über Eck gebaut -> erzielen daher keinen Treffer
|
||||
#bldg_3133: Krankenhaus: 2309 ist über Eck gebaut -> erzielen daher keinen Treffer
|
||||
#bldg_3160: 2105, 2204 -> Aussentreppe
|
||||
#bldg_3264: Raum 2102 ist ein Innenhof -> according outterWalls (#=55) are vertical?
|
||||
|
||||
#bldg_4169, 4170, 4171, 4172, 4173, 4174, 4175, 4176, 4177 -> Aussentreppe according outterWalls (#=55) are vertical?
|
||||
|
||||
|
||||
|
||||
done
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
|
||||
# kate /shd/CTC/TOOLS/TDS/TDS-build/bin/log4cxx_bcu.props &
|
||||
# kate /shd/CTC/LOG/ctc_bcu_1.log &
|
||||
Executable
+167
@@ -0,0 +1,167 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
rm -v /shd/CTC/LOG/ctc_bcu_1.log*
|
||||
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# 29-10-2021: ----
|
||||
BLDGS="1111 1112 1113 1118 1119 1120 1121 1122 1123 1124 1125 1128 1130 1132 1134 1136 1138 1140 1142 1163"
|
||||
|
||||
# 03-11-2021: ----
|
||||
# zip bldgs_2021-11-03_rev5028 import_ba1_2021-11-03.csv bldg_1127* bldg_1129* bldg_1131* bldg_1133* bldg_1135* bldg_1137* bldg_1139* bldg_1141* bldg_1143* bldg_1144* bldg_1145* bldg_1146* bldg_1147* bldg_1153* bldg_1158* bldg_1167*
|
||||
BLDGS="1127 1129 1131 1133 1135 1137 1139 1141 1143 1144 1145 1146 1147 1153 1158 1167"
|
||||
|
||||
# 05-11-2021: ----
|
||||
BLDGS="1155 1159 1160 1161 1162 1164 1166 1168 1170 1172 1173"
|
||||
|
||||
# 10-11-2021
|
||||
# zip bldgs_2021-11-10_rev5135XXXX.zip import_ba1_2021-11-10.csv bldg_1174* bldg_1175* bldg_1176* bldg_1177* bldg_1178* bldg_1179* bldg_1180* bldg_1181* bldg_1182* bldg_1183* bldg_1185* bldg_1188* bldg_1191* bldg_1193* bldg_1194* bldg_1195* bldg_1196* bldg_1201* bldg_1202* bldg_1203* bldg_1204* bldg_1210* bldg_1211*
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
# zip bldgs_2021-11-12_rev5157.zip import_ba1_2021-11-12.csv bldg_1213* bldg_1215* bldg_1216* bldg_1217* bldg_1218* bldg_1219* bldg_1220* bldg_1221* bldg_1222* bldg_1223* bldg_1225* bldg_1226* bldg_1227*
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
# zip bldgs_2021-11-17_rev5217.55642.zip import_ba1_2021-11-17.csv bldg_1224* bldg_1228* bldg_1229* bldg_1230* bldg_1231* bldg_1232* bldg_1235* bldg_1237* bldg_1239* bldg_1241* bldg_1243*
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
# 19-11-2021
|
||||
# 2 Nachzuegler: 1197 1207
|
||||
# zip bldgs_2021-11-19_rev5219.XXX.zip import_ba1_2021-11-19.csv bldg_1197* bldg_1207* bldg_1234* bldg_1238* bldg_1240* bldg_1244* bldg_1245* bldg_1246* bldg_1248* bldg_1249* bldg_1257* bldg_1258* bldg_1259*
|
||||
BLDGS="1197 1207 1234 1238 1240 1244 1245 1246 1248 1249 1257 1258 1259"
|
||||
|
||||
# 24-11-2021
|
||||
# zip bldgs_2021-11-24_rev5297.XXX.zip import_baX_2021-11-24.csv bldg_1165* bldg_1208* bldg_1209* bldg_1212* bldg_1236* bldg_1253* bldg_1260* bldg_1261* bldg_1262* bldg_1265* bldg_3103*
|
||||
BLDGS="1165 1208 1209 1212 1236 1253 1260 1261 1262 1265 3103"
|
||||
|
||||
# 26-11-2101
|
||||
# zip bldgs_2021-11-16_revXXXX.zip import_baX_2021-11-26.csv bldg_1253* bldg_1254* bldg_1255* bldg_1269* bldg_1270* bldg_1271* bldg_1273* bldg_1274* bldg_1276* bldg_1277* bldg_1278* bldg_1279* bldg_1280* bldg_1283* bldg_3104* bldg_3105* bldg_3106* bldg_3107*"
|
||||
BLDGS="1253 1254 1255 1269 1270 1271 1273 1274 1276 1277 1278 1279 1280 1283 3104 3105 3106 3107"
|
||||
|
||||
# 01-12-2021
|
||||
# zip bldgs_2021-12-10_rev5421.55750.zip import_baX_2021-12-01.csv bldg_1256* bldg_1268* bldg_1275* bldg_1281* bldg_1282* bldg_3108* bldg_3109* bldg_3110* bldg_3111* bldg_3112* bldg_3113* bldg_3114* bldg_3115* bldg_3116* bldg_3117* bldg_3118* bldg_3119* bldg_3121* bldg_3122*
|
||||
BLDGS="1256 1268 1275 1281 1282 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3121 3122"
|
||||
|
||||
# 03-12-2021
|
||||
# cat import_baX_2021-12-03.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2021-12-03_rev5424.55750.zip import_baX.csv bldg_1251* bldg_1264* bldg_3220* bldg_3222* bldg_3224* bldg_3226* bldg_3228* bldg_3229* bldg_3266*
|
||||
BLDGS="1251 1264 3220 3222 3224 3226 3228 3229 3266"
|
||||
|
||||
# 08-12-2021
|
||||
# cat import_baX_2021-12-08.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2021-12-08_rev56xx.55750.zip import_baX.csv
|
||||
BLDGS="3120 3123 3124 3129 3130 3131 3135 3230 3231 3232 3233 3241 3243 3260 3264 4106 4107 4111 4112 4117 4126 4127 4128 4129 4131 4132 4134 4140 4143 4145"
|
||||
|
||||
# 10-12-2021
|
||||
# cat import_baX_2021-12-10.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
BLDGS="3259 3262 3267 3269 3270 3272 3273 3275 3276 4116 4139 4144 4148 4149"
|
||||
|
||||
|
||||
# 15-12-2021
|
||||
# cat import_baX_2021-12-15.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
|
||||
#zip bldgs_2021-12-15_rev5693.55881.zip import_baX_2021-12-15.csv bldg_3120* bldg_3123* bldg_3124* bldg_3129* bldg_3132* bldg_3136* bldg_3246* bldg_3248* bldg_3249* bldg_3256* bldg_3257* bldg_3258* bldg_3259* bldg_3260* bldg_3261* bldg_3263* bldg_3268* bldg_3278* bldg_3281* bldg_3282* bldg_3283* bldg_3284* bldg_3285* bldg_3287* bldg_3288* bldg_3289* bldg_3290* bldg_3291* bldg_3292* bldg_3293* bldg_3294* bldg_3295* bldg_4108* bldg_4113* bldg_4133* bldg_4141* bldg_4145* bldg_4146* bldg_4150* bldg_4151* bldg_4152* bldg_4153* bldg_4154* bldg_4156* bldg_4157* bldg_4158* bldg_4159* bldg_4160* bldg_4161* bldg_4162* bldg_4164* bldg_4165* bldg_4166* bldg_4167* bldg_4168* bldg_4169* bldg_4170* bldg_4171* bldg_4172* bldg_4173* bldg_4174* bldg_4175* bldg_4176* bldg_4177* bldg_4178* bldg_4179* bldg_4180* bldg_4183* bldg_4184* bldg_4185* bldg_4186* bldg_4187* bldg_4188* bldg_4189* bldg_4190* bldg_4191* bldg_4192* bldg_4193*
|
||||
BLDGS="3120 3123 3124 3129 3132 3136 3246 3248 3249 3256 3257 3258 3259 3260 3261 3263 3268 3278 3281 3282 3283 3284 3285 3287 3288 3289 3290 3291 3292 3293 3294 3295 4108 4113 4133 4141 4145 4146 4150 4151 4152 4153 4154 4156 4157 4158 4159 4160 4161 4162 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193"
|
||||
|
||||
|
||||
|
||||
# 17-12-2021
|
||||
# cat import_baX_2021-12-17.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2021-12-17_rev5791.55881.zip import_baX_2021-12-17.csv bldg_1205* bldg_1250* bldg_1272* bldg_3125* bldg_3126* bldg_3127* bldg_3128* bldg_3133* bldg_3234* bldg_3141* bldg_3141* bldg_3234* bldg_3235* bldg_3236* bldg_3237* bldg_3238* bldg_3239* bldg_3240* bldg_3244* bldg_3245* bldg_3247* bldg_3250* bldg_3251* bldg_3252* bldg_3253* bldg_3255* bldg_3265* bldg_3271* bldg_3274* bldg_3277* bldg_3296* bldg_3297* bldg_4104* bldg_4105* bldg_4109* bldg_4110* bldg_4114* bldg_4135* bldg_4136* bldg_4142* bldg_4163* bldg_4181* bldg_4182* bldg_4194* bldg_4196*
|
||||
BLDGS="1205 1250 1272 3125 3126 3127 3128 3133 3134 3141_26 3141_27 3234 3235 3236 3237 3238 3239 3240 3244 3245 3247 3250 3251 3252 3253 3255 3265 3271 3274 3277 3296 3297 4104 4105 4109 4110 4114 4135 4136 4142 4163 4181 4182 4194 4196"
|
||||
|
||||
# 05-01-2022
|
||||
# cat import_baX_2022-01-05.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2022-01-05_rev5791.55881.zip import_baX_2022-01-05.csv 1148* 1150* 1151* 1152* 1154* 1155* 1156* 1157* 1169* 1171* 1214* 1242* 1247* 1263* 1284* 3137* 3138* 3139* 3140* 3142* 3143* 3144* 3148* 3149* 3150* 3151* 3152* 3153BLDGS="1148* 1150* 1151* 1152* 1154* 1155* 1156* 1157* 1169* 1171* 1214* 1242* 1247* 1263* 1284* 3137* 3138* 3139* 3140* 3142* 3143* 3144* 3148* 3149* 3150* 3151* 3152* 3153* 3154* 3155* 3156* 3157* 3158* 3159* 3160* 3161*
|
||||
BLDGS="1148 1150 1151 1152 1154 1155 1156 1157 1169 1171 1214 1242 1247 1263 1284 3137 3138 3139 3140 3142 3143 3144 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161"
|
||||
|
||||
# 12-01-2022
|
||||
# cat import_baX_2022-01-12.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2022-01-12_rev5791.55881.zip import_baX_2022-01-12.csv 0910* 2100* 2101* 2205* 3162* 3163* 3164* 3165* 3166* 3167* 3168* 3169* 3170* 3171* 3172* 3173* 3174* 3175* 3176* 3177* 3178* 3179* 3180* 3181* 3182* 3183* 3184* 3185* 3186* 3187* 3188* 3189* 3190* 3254* 4115* 4147* 4155* 4194*
|
||||
BLDGS="0910 2100 2101 2205 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3254 4115 4147 4155 4194"
|
||||
|
||||
|
||||
#BLDGS="0910"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
#BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
BLDG_STR="";
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
BLDG_STR="${BLDG_STR} bldg_${BLDG}*"
|
||||
done
|
||||
echo " copy and paste template: zip bldgs_2021-XX-XX_rev5000.XXXXX.zip import_baX.csv $BLDG_STR"
|
||||
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
#echo " work on item: '$BLDG'"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin/BuildingControlTestVwmXml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml
|
||||
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo "------------------------------------";
|
||||
echo " failure on -> '$BLDG' ";
|
||||
echo " kate /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml &"
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
echo "grep for '$BLDG':";
|
||||
grep -E "WARN|ERROR|FATAL" /shd/CTC/LOG/ctc_bcu_1.log* | grep $BLDG
|
||||
|
||||
|
||||
# bldg_1102 -> 4 Aussentreppen
|
||||
# bldg_1107 -> Aussentreppen
|
||||
# bldg_3280 -> Aussentreppen
|
||||
# U_Bahn -> 6 Fehler 2102 2114 2131 2202 2206 2210 (Räume ohne 'Dach')
|
||||
|
||||
#bldg_1208 Raum 109 ist über Eck gebaut -> daher keinen Treffer
|
||||
#bdlg_1221 ist über Eck gebaut. Center von 301 erzielt daher keinen Treffer
|
||||
#bldg_1232 ist über Eck gebaut. Center von 110, 210, 301 erzielen daher keinen Treffer
|
||||
#bldg_1234: Raum 106, 115, 206, 215, 304 ist über Eck gebaut -> erzielen daher keinen Treffer
|
||||
#bldg_1239: 2108, 2207 -> Aussentreppe
|
||||
#bldg_1240: 2104, 2202 -> Aussentreppe
|
||||
#bldg_1242: 2103, 2203, 2302 -> Aussentreppe
|
||||
#bldg 1244: Raum 108, 202 ist Aussentreppe
|
||||
#bldg 1254: RefMode/BSM 11008 ist an einem Geländer angebracht. Trifft aber keinen Raum (auch nicht 301) Da es ein Geländer ist, stufe ich es als akzeptabel ein.
|
||||
|
||||
#bldg_3132: Raum 2114, 2214, 2314, 2401 sind über Eck gebaut -> erzielen daher keinen Treffer
|
||||
#bldg_3133: Krankenhaus: 2309 ist über Eck gebaut -> erzielen daher keinen Treffer
|
||||
#bldg_3160: 2105, 2204 -> Aussentreppe
|
||||
#bldg_3164: Aussentreppe OUT OF FOOTPRINT. Center von 2204 erzielt daher keinen Treffer
|
||||
|
||||
#bldg_3264: Raum 2102 ist ein Innenhof -> according outterWalls (#=55) are vertical?
|
||||
|
||||
#bldg_4169, 4170, 4171, 4172, 4173, 4174, 4175, 4176, 4177 -> Aussentreppe according outterWalls (#=55) are vertical?
|
||||
|
||||
|
||||
done
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
|
||||
# kate /shd/CTC/TOOLS/TDS/TDS-build/bin/log4cxx_bcu.props &
|
||||
# kate /shd/CTC/LOG/ctc_bcu_1.log &
|
||||
Executable
+174
@@ -0,0 +1,174 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
rm -v /shd/CTC/LOG/ctc_bcu_1.log*
|
||||
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# 29-10-2021: ----
|
||||
BLDGS="1111 1112 1113 1118 1119 1120 1121 1122 1123 1124 1125 1128 1130 1132 1134 1136 1138 1140 1142 1163"
|
||||
|
||||
# 03-11-2021: ----
|
||||
# zip bldgs_2021-11-03_rev5028 import_ba1_2021-11-03.csv bldg_1127* bldg_1129* bldg_1131* bldg_1133* bldg_1135* bldg_1137* bldg_1139* bldg_1141* bldg_1143* bldg_1144* bldg_1145* bldg_1146* bldg_1147* bldg_1153* bldg_1158* bldg_1167*
|
||||
BLDGS="1127 1129 1131 1133 1135 1137 1139 1141 1143 1144 1145 1146 1147 1153 1158 1167"
|
||||
|
||||
# 05-11-2021: ----
|
||||
BLDGS="1155 1159 1160 1161 1162 1164 1166 1168 1170 1172 1173"
|
||||
|
||||
# 10-11-2021
|
||||
# zip bldgs_2021-11-10_rev5135XXXX.zip import_ba1_2021-11-10.csv bldg_1174* bldg_1175* bldg_1176* bldg_1177* bldg_1178* bldg_1179* bldg_1180* bldg_1181* bldg_1182* bldg_1183* bldg_1185* bldg_1188* bldg_1191* bldg_1193* bldg_1194* bldg_1195* bldg_1196* bldg_1201* bldg_1202* bldg_1203* bldg_1204* bldg_1210* bldg_1211*
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
# zip bldgs_2021-11-12_rev5157.zip import_ba1_2021-11-12.csv bldg_1213* bldg_1215* bldg_1216* bldg_1217* bldg_1218* bldg_1219* bldg_1220* bldg_1221* bldg_1222* bldg_1223* bldg_1225* bldg_1226* bldg_1227*
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
# zip bldgs_2021-11-17_rev5217.55642.zip import_ba1_2021-11-17.csv bldg_1224* bldg_1228* bldg_1229* bldg_1230* bldg_1231* bldg_1232* bldg_1235* bldg_1237* bldg_1239* bldg_1241* bldg_1243*
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
# 19-11-2021
|
||||
# 2 Nachzuegler: 1197 1207
|
||||
# zip bldgs_2021-11-19_rev5219.XXX.zip import_ba1_2021-11-19.csv bldg_1197* bldg_1207* bldg_1234* bldg_1238* bldg_1240* bldg_1244* bldg_1245* bldg_1246* bldg_1248* bldg_1249* bldg_1257* bldg_1258* bldg_1259*
|
||||
BLDGS="1197 1207 1234 1238 1240 1244 1245 1246 1248 1249 1257 1258 1259"
|
||||
|
||||
# 24-11-2021
|
||||
# zip bldgs_2021-11-24_rev5297.XXX.zip import_baX_2021-11-24.csv bldg_1165* bldg_1208* bldg_1209* bldg_1212* bldg_1236* bldg_1253* bldg_1260* bldg_1261* bldg_1262* bldg_1265* bldg_3103*
|
||||
BLDGS="1165 1208 1209 1212 1236 1253 1260 1261 1262 1265 3103"
|
||||
|
||||
# 26-11-2101
|
||||
# zip bldgs_2021-11-16_revXXXX.zip import_baX_2021-11-26.csv bldg_1253* bldg_1254* bldg_1255* bldg_1269* bldg_1270* bldg_1271* bldg_1273* bldg_1274* bldg_1276* bldg_1277* bldg_1278* bldg_1279* bldg_1280* bldg_1283* bldg_3104* bldg_3105* bldg_3106* bldg_3107*"
|
||||
BLDGS="1253 1254 1255 1269 1270 1271 1273 1274 1276 1277 1278 1279 1280 1283 3104 3105 3106 3107"
|
||||
|
||||
# 01-12-2021
|
||||
# zip bldgs_2021-12-10_rev5421.55750.zip import_baX_2021-12-01.csv bldg_1256* bldg_1268* bldg_1275* bldg_1281* bldg_1282* bldg_3108* bldg_3109* bldg_3110* bldg_3111* bldg_3112* bldg_3113* bldg_3114* bldg_3115* bldg_3116* bldg_3117* bldg_3118* bldg_3119* bldg_3121* bldg_3122*
|
||||
BLDGS="1256 1268 1275 1281 1282 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3121 3122"
|
||||
|
||||
# 03-12-2021
|
||||
# cat import_baX_2021-12-03.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2021-12-03_rev5424.55750.zip import_baX.csv bldg_1251* bldg_1264* bldg_3220* bldg_3222* bldg_3224* bldg_3226* bldg_3228* bldg_3229* bldg_3266*
|
||||
BLDGS="1251 1264 3220 3222 3224 3226 3228 3229 3266"
|
||||
|
||||
# 08-12-2021
|
||||
# cat import_baX_2021-12-08.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2021-12-08_rev56xx.55750.zip import_baX.csv
|
||||
BLDGS="3120 3123 3124 3129 3130 3131 3135 3230 3231 3232 3233 3241 3243 3260 3264 4106 4107 4111 4112 4117 4126 4127 4128 4129 4131 4132 4134 4140 4143 4145"
|
||||
|
||||
# 10-12-2021
|
||||
# cat import_baX_2021-12-10.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
BLDGS="3259 3262 3267 3269 3270 3272 3273 3275 3276 4116 4139 4144 4148 4149"
|
||||
|
||||
|
||||
# 15-12-2021
|
||||
# cat import_baX_2021-12-15.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
|
||||
#zip bldgs_2021-12-15_rev5693.55881.zip import_baX_2021-12-15.csv bldg_3120* bldg_3123* bldg_3124* bldg_3129* bldg_3132* bldg_3136* bldg_3246* bldg_3248* bldg_3249* bldg_3256* bldg_3257* bldg_3258* bldg_3259* bldg_3260* bldg_3261* bldg_3263* bldg_3268* bldg_3278* bldg_3281* bldg_3282* bldg_3283* bldg_3284* bldg_3285* bldg_3287* bldg_3288* bldg_3289* bldg_3290* bldg_3291* bldg_3292* bldg_3293* bldg_3294* bldg_3295* bldg_4108* bldg_4113* bldg_4133* bldg_4141* bldg_4145* bldg_4146* bldg_4150* bldg_4151* bldg_4152* bldg_4153* bldg_4154* bldg_4156* bldg_4157* bldg_4158* bldg_4159* bldg_4160* bldg_4161* bldg_4162* bldg_4164* bldg_4165* bldg_4166* bldg_4167* bldg_4168* bldg_4169* bldg_4170* bldg_4171* bldg_4172* bldg_4173* bldg_4174* bldg_4175* bldg_4176* bldg_4177* bldg_4178* bldg_4179* bldg_4180* bldg_4183* bldg_4184* bldg_4185* bldg_4186* bldg_4187* bldg_4188* bldg_4189* bldg_4190* bldg_4191* bldg_4192* bldg_4193*
|
||||
BLDGS="3120 3123 3124 3129 3132 3136 3246 3248 3249 3256 3257 3258 3259 3260 3261 3263 3268 3278 3281 3282 3283 3284 3285 3287 3288 3289 3290 3291 3292 3293 3294 3295 4108 4113 4133 4141 4145 4146 4150 4151 4152 4153 4154 4156 4157 4158 4159 4160 4161 4162 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193"
|
||||
|
||||
|
||||
|
||||
# 17-12-2021
|
||||
# cat import_baX_2021-12-17.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2021-12-17_rev5791.55881.zip import_baX_2021-12-17.csv bldg_1205* bldg_1250* bldg_1272* bldg_3125* bldg_3126* bldg_3127* bldg_3128* bldg_3133* bldg_3234* bldg_3141* bldg_3141* bldg_3234* bldg_3235* bldg_3236* bldg_3237* bldg_3238* bldg_3239* bldg_3240* bldg_3244* bldg_3245* bldg_3247* bldg_3250* bldg_3251* bldg_3252* bldg_3253* bldg_3255* bldg_3265* bldg_3271* bldg_3274* bldg_3277* bldg_3296* bldg_3297* bldg_4104* bldg_4105* bldg_4109* bldg_4110* bldg_4114* bldg_4135* bldg_4136* bldg_4142* bldg_4163* bldg_4181* bldg_4182* bldg_4194* bldg_4196*
|
||||
BLDGS="1205 1250 1272 3125 3126 3127 3128 3133 3134 3141_26 3141_27 3234 3235 3236 3237 3238 3239 3240 3244 3245 3247 3250 3251 3252 3253 3255 3265 3271 3274 3277 3296 3297 4104 4105 4109 4110 4114 4135 4136 4142 4163 4181 4182 4194 4196"
|
||||
|
||||
# 05-01-2022
|
||||
# cat import_baX_2022-01-05.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2022-01-05_rev5791.55881.zip import_baX_2022-01-05.csv 1148* 1150* 1151* 1152* 1154* 1155* 1156* 1157* 1169* 1171* 1214* 1242* 1247* 1263* 1284* 3137* 3138* 3139* 3140* 3142* 3143* 3144* 3148* 3149* 3150* 3151* 3152* 3153BLDGS="1148* 1150* 1151* 1152* 1154* 1155* 1156* 1157* 1169* 1171* 1214* 1242* 1247* 1263* 1284* 3137* 3138* 3139* 3140* 3142* 3143* 3144* 3148* 3149* 3150* 3151* 3152* 3153* 3154* 3155* 3156* 3157* 3158* 3159* 3160* 3161*
|
||||
BLDGS="1148 1150 1151 1152 1154 1155 1156 1157 1169 1171 1214 1242 1247 1263 1284 3137 3138 3139 3140 3142 3143 3144 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161"
|
||||
|
||||
# 12-01-2022
|
||||
# cat import_baX_2022-01-12.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2022-01-12_rev5791.55881.zip import_baX_2022-01-12.csv 0910* 2100* 2101* 2205* 3162* 3163* 3164* 3165* 3166* 3167* 3168* 3169* 3170* 3171* 3172* 3173* 3174* 3175* 3176* 3177* 3178* 3179* 3180* 3181* 3182* 3183* 3184* 3185* 3186* 3187* 3188* 3189* 3190* 3254* 4115* 4147* 4155* 4194*
|
||||
BLDGS="0910 2100 2101 2205 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3254 4115 4147 4155 4194"
|
||||
|
||||
# 14-01-2022
|
||||
# cat import_baX_2022-01-14.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2022-01-14_rev5791.55881.zip import_baX_2022-01-14.csv 2106* 2107* 2108* 2109* 2110* 2112* 2116* 2117* 2118* 2121* 2122* 3191* 3192* 3193* 3194* 3195* 3196* 3197* 3198* 3199* 3200* 3201* 3202* 3203* 3204* 3205* 3206* 3207* 3208* 3209* 3210* 3211* 3212* 3213* 3214* 3215* 3216* 3217* 3218* 3221* 3223* 3225* 3286* 3301* 4103* 4118* 4119* 4120* 4121* 4122* 4123* 4124* 4130*
|
||||
BLDGS="2106 2107 2108 2109 2110 2112 2116 2117 2118 2121 2122 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3221 3223 3225 3286 3301 4103 4118 4119 4120 4121 4122 4123 4124 4130"
|
||||
|
||||
|
||||
###BLDGS="4127"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
#BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
BLDG_STR="";
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
BLDG_STR="${BLDG_STR} bldg_${BLDG}*"
|
||||
done
|
||||
echo " copy and paste template: zip bldgs_2021-XX-XX_rev5000.XXXXX.zip import_baX.csv $BLDG_STR"
|
||||
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
#echo " work on item: '$BLDG'"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin/BuildingControlTestVwmXml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml
|
||||
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo "------------------------------------";
|
||||
echo " failure on -> '$BLDG' ";
|
||||
echo " kate /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml &"
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
echo "grep for '$BLDG':";
|
||||
grep -E "WARN|ERROR|FATAL" /shd/CTC/LOG/ctc_bcu_1.log* | grep $BLDG
|
||||
|
||||
|
||||
# bldg_1102 -> 4 Aussentreppen
|
||||
# bldg_1107 -> Aussentreppen
|
||||
# bldg_3280 -> Aussentreppen
|
||||
# U_Bahn -> 6 Fehler 2102 2114 2131 2202 2206 2210 (Räume ohne 'Dach')
|
||||
|
||||
#bldg_1208 Raum 109 ist über Eck gebaut -> daher keinen Treffer
|
||||
#bdlg_1221 ist über Eck gebaut. Center von 301 erzielt daher keinen Treffer
|
||||
#bldg_1232 ist über Eck gebaut. Center von 110, 210, 301 erzielen daher keinen Treffer
|
||||
#bldg_1234: Raum 106, 115, 206, 215, 304 ist über Eck gebaut -> erzielen daher keinen Treffer
|
||||
#bldg_1239: 2108, 2207 -> Aussentreppe
|
||||
#bldg_1240: 2104, 2202 -> Aussentreppe
|
||||
#bldg_1242: 2103, 2203, 2302 -> Aussentreppe
|
||||
#bldg 1244: Raum 108, 202 ist Aussentreppe
|
||||
#bldg 1254: RefMode/BSM 11008 ist an einem Geländer angebracht. Trifft aber keinen Raum (auch nicht 301) Da es ein Geländer ist, stufe ich es als akzeptabel ein.
|
||||
|
||||
#bldg_3132: Raum 2114, 2214, 2314, 2401 sind über Eck gebaut -> erzielen daher keinen Treffer
|
||||
#bldg_3133: Krankenhaus: 2309 ist über Eck gebaut -> erzielen daher keinen Treffer
|
||||
#bldg_3160: 2105, 2204 -> Aussentreppe
|
||||
#bldg_3164: Aussentreppe OUT OF FOOTPRINT. Center von 2204 erzielt daher keinen Treffer
|
||||
|
||||
#bldg_3264: Raum 2102 ist ein Innenhof -> according outterWalls (#=55) are vertical?
|
||||
|
||||
#bldg_4169, 4170, 4171, 4172, 4173, 4174, 4175, 4176, 4177 -> Aussentreppe according outterWalls (#=55) are vertical?
|
||||
|
||||
#bldg_3207: 2101 OUT OF FOOTPRINT Aussentreppe
|
||||
#bldg_3213: 2102, 2202 OUT OF FOOTPRINT Aussentreppe
|
||||
|
||||
done
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
|
||||
# kate /shd/CTC/TOOLS/TDS/TDS-build/bin/log4cxx_bcu.props &
|
||||
# kate /shd/CTC/LOG/ctc_bcu_1.log &
|
||||
Executable
+178
@@ -0,0 +1,178 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id: BuildingControlTestVwmXml_Nachbarbeitung2022-01-14.sh 57200 2022-05-24 10:39:44Z karwat $
|
||||
# $HeadURL: svn://192.168.133.21/TDS/branches/product/features/3dws_devel/Lts/Proxies/Buildings/BuildingControlUnit/VWM/BuildingControlTestVwmXml_Nachbarbeitung2022-01-14.sh $
|
||||
# $Author: karwat $
|
||||
#
|
||||
|
||||
rm -v /shd/CTC/LOG/ctc_bcu_1.log*
|
||||
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# 29-10-2021: ----
|
||||
BLDGS="1111 1112 1113 1118 1119 1120 1121 1122 1123 1124 1125 1128 1130 1132 1134 1136 1138 1140 1142 1163"
|
||||
|
||||
# 03-11-2021: ----
|
||||
# zip bldgs_2021-11-03_rev5028 import_ba1_2021-11-03.csv bldg_1127* bldg_1129* bldg_1131* bldg_1133* bldg_1135* bldg_1137* bldg_1139* bldg_1141* bldg_1143* bldg_1144* bldg_1145* bldg_1146* bldg_1147* bldg_1153* bldg_1158* bldg_1167*
|
||||
BLDGS="1127 1129 1131 1133 1135 1137 1139 1141 1143 1144 1145 1146 1147 1153 1158 1167"
|
||||
|
||||
# 05-11-2021: ----
|
||||
BLDGS="1155 1159 1160 1161 1162 1164 1166 1168 1170 1172 1173"
|
||||
|
||||
# 10-11-2021
|
||||
# zip bldgs_2021-11-10_rev5135XXXX.zip import_ba1_2021-11-10.csv bldg_1174* bldg_1175* bldg_1176* bldg_1177* bldg_1178* bldg_1179* bldg_1180* bldg_1181* bldg_1182* bldg_1183* bldg_1185* bldg_1188* bldg_1191* bldg_1193* bldg_1194* bldg_1195* bldg_1196* bldg_1201* bldg_1202* bldg_1203* bldg_1204* bldg_1210* bldg_1211*
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
# zip bldgs_2021-11-12_rev5157.zip import_ba1_2021-11-12.csv bldg_1213* bldg_1215* bldg_1216* bldg_1217* bldg_1218* bldg_1219* bldg_1220* bldg_1221* bldg_1222* bldg_1223* bldg_1225* bldg_1226* bldg_1227*
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
# zip bldgs_2021-11-17_rev5217.55642.zip import_ba1_2021-11-17.csv bldg_1224* bldg_1228* bldg_1229* bldg_1230* bldg_1231* bldg_1232* bldg_1235* bldg_1237* bldg_1239* bldg_1241* bldg_1243*
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
# 19-11-2021
|
||||
# 2 Nachzuegler: 1197 1207
|
||||
# zip bldgs_2021-11-19_rev5219.XXX.zip import_ba1_2021-11-19.csv bldg_1197* bldg_1207* bldg_1234* bldg_1238* bldg_1240* bldg_1244* bldg_1245* bldg_1246* bldg_1248* bldg_1249* bldg_1257* bldg_1258* bldg_1259*
|
||||
BLDGS="1197 1207 1234 1238 1240 1244 1245 1246 1248 1249 1257 1258 1259"
|
||||
|
||||
# 24-11-2021
|
||||
# zip bldgs_2021-11-24_rev5297.XXX.zip import_baX_2021-11-24.csv bldg_1165* bldg_1208* bldg_1209* bldg_1212* bldg_1236* bldg_1253* bldg_1260* bldg_1261* bldg_1262* bldg_1265* bldg_3103*
|
||||
BLDGS="1165 1208 1209 1212 1236 1253 1260 1261 1262 1265 3103"
|
||||
|
||||
# 26-11-2101
|
||||
# zip bldgs_2021-11-16_revXXXX.zip import_baX_2021-11-26.csv bldg_1253* bldg_1254* bldg_1255* bldg_1269* bldg_1270* bldg_1271* bldg_1273* bldg_1274* bldg_1276* bldg_1277* bldg_1278* bldg_1279* bldg_1280* bldg_1283* bldg_3104* bldg_3105* bldg_3106* bldg_3107*"
|
||||
BLDGS="1253 1254 1255 1269 1270 1271 1273 1274 1276 1277 1278 1279 1280 1283 3104 3105 3106 3107"
|
||||
|
||||
# 01-12-2021
|
||||
# zip bldgs_2021-12-10_rev5421.55750.zip import_baX_2021-12-01.csv bldg_1256* bldg_1268* bldg_1275* bldg_1281* bldg_1282* bldg_3108* bldg_3109* bldg_3110* bldg_3111* bldg_3112* bldg_3113* bldg_3114* bldg_3115* bldg_3116* bldg_3117* bldg_3118* bldg_3119* bldg_3121* bldg_3122*
|
||||
BLDGS="1256 1268 1275 1281 1282 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3121 3122"
|
||||
|
||||
# 03-12-2021
|
||||
# cat import_baX_2021-12-03.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2021-12-03_rev5424.55750.zip import_baX.csv bldg_1251* bldg_1264* bldg_3220* bldg_3222* bldg_3224* bldg_3226* bldg_3228* bldg_3229* bldg_3266*
|
||||
BLDGS="1251 1264 3220 3222 3224 3226 3228 3229 3266"
|
||||
|
||||
# 08-12-2021
|
||||
# cat import_baX_2021-12-08.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2021-12-08_rev56xx.55750.zip import_baX.csv
|
||||
BLDGS="3120 3123 3124 3129 3130 3131 3135 3230 3231 3232 3233 3241 3243 3260 3264 4106 4107 4111 4112 4117 4126 4127 4128 4129 4131 4132 4134 4140 4143 4145"
|
||||
|
||||
# 10-12-2021
|
||||
# cat import_baX_2021-12-10.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
BLDGS="3259 3262 3267 3269 3270 3272 3273 3275 3276 4116 4139 4144 4148 4149"
|
||||
|
||||
|
||||
# 15-12-2021
|
||||
# cat import_baX_2021-12-15.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
|
||||
#zip bldgs_2021-12-15_rev5693.55881.zip import_baX_2021-12-15.csv bldg_3120* bldg_3123* bldg_3124* bldg_3129* bldg_3132* bldg_3136* bldg_3246* bldg_3248* bldg_3249* bldg_3256* bldg_3257* bldg_3258* bldg_3259* bldg_3260* bldg_3261* bldg_3263* bldg_3268* bldg_3278* bldg_3281* bldg_3282* bldg_3283* bldg_3284* bldg_3285* bldg_3287* bldg_3288* bldg_3289* bldg_3290* bldg_3291* bldg_3292* bldg_3293* bldg_3294* bldg_3295* bldg_4108* bldg_4113* bldg_4133* bldg_4141* bldg_4145* bldg_4146* bldg_4150* bldg_4151* bldg_4152* bldg_4153* bldg_4154* bldg_4156* bldg_4157* bldg_4158* bldg_4159* bldg_4160* bldg_4161* bldg_4162* bldg_4164* bldg_4165* bldg_4166* bldg_4167* bldg_4168* bldg_4169* bldg_4170* bldg_4171* bldg_4172* bldg_4173* bldg_4174* bldg_4175* bldg_4176* bldg_4177* bldg_4178* bldg_4179* bldg_4180* bldg_4183* bldg_4184* bldg_4185* bldg_4186* bldg_4187* bldg_4188* bldg_4189* bldg_4190* bldg_4191* bldg_4192* bldg_4193*
|
||||
BLDGS="3120 3123 3124 3129 3132 3136 3246 3248 3249 3256 3257 3258 3259 3260 3261 3263 3268 3278 3281 3282 3283 3284 3285 3287 3288 3289 3290 3291 3292 3293 3294 3295 4108 4113 4133 4141 4145 4146 4150 4151 4152 4153 4154 4156 4157 4158 4159 4160 4161 4162 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193"
|
||||
|
||||
|
||||
|
||||
# 17-12-2021
|
||||
# cat import_baX_2021-12-17.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2021-12-17_rev5791.55881.zip import_baX_2021-12-17.csv bldg_1205* bldg_1250* bldg_1272* bldg_3125* bldg_3126* bldg_3127* bldg_3128* bldg_3133* bldg_3234* bldg_3141* bldg_3141* bldg_3234* bldg_3235* bldg_3236* bldg_3237* bldg_3238* bldg_3239* bldg_3240* bldg_3244* bldg_3245* bldg_3247* bldg_3250* bldg_3251* bldg_3252* bldg_3253* bldg_3255* bldg_3265* bldg_3271* bldg_3274* bldg_3277* bldg_3296* bldg_3297* bldg_4104* bldg_4105* bldg_4109* bldg_4110* bldg_4114* bldg_4135* bldg_4136* bldg_4142* bldg_4163* bldg_4181* bldg_4182* bldg_4194* bldg_4196*
|
||||
BLDGS="1205 1250 1272 3125 3126 3127 3128 3133 3134 3141_26 3141_27 3234 3235 3236 3237 3238 3239 3240 3244 3245 3247 3250 3251 3252 3253 3255 3265 3271 3274 3277 3296 3297 4104 4105 4109 4110 4114 4135 4136 4142 4163 4181 4182 4194 4196"
|
||||
|
||||
# 05-01-2022
|
||||
# cat import_baX_2022-01-05.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2022-01-05_rev5791.55881.zip import_baX_2022-01-05.csv 1148* 1150* 1151* 1152* 1154* 1155* 1156* 1157* 1169* 1171* 1214* 1242* 1247* 1263* 1284* 3137* 3138* 3139* 3140* 3142* 3143* 3144* 3148* 3149* 3150* 3151* 3152* 3153BLDGS="1148* 1150* 1151* 1152* 1154* 1155* 1156* 1157* 1169* 1171* 1214* 1242* 1247* 1263* 1284* 3137* 3138* 3139* 3140* 3142* 3143* 3144* 3148* 3149* 3150* 3151* 3152* 3153* 3154* 3155* 3156* 3157* 3158* 3159* 3160* 3161*
|
||||
BLDGS="1148 1150 1151 1152 1154 1155 1156 1157 1169 1171 1214 1242 1247 1263 1284 3137 3138 3139 3140 3142 3143 3144 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161"
|
||||
|
||||
# 12-01-2022
|
||||
# cat import_baX_2022-01-12.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2022-01-12_rev5791.55881.zip import_baX_2022-01-12.csv 0910* 2100* 2101* 2205* 3162* 3163* 3164* 3165* 3166* 3167* 3168* 3169* 3170* 3171* 3172* 3173* 3174* 3175* 3176* 3177* 3178* 3179* 3180* 3181* 3182* 3183* 3184* 3185* 3186* 3187* 3188* 3189* 3190* 3254* 4115* 4147* 4155* 4194*
|
||||
BLDGS="0910 2100 2101 2205 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3254 4115 4147 4155 4194"
|
||||
|
||||
# 14-01-2022
|
||||
# cat import_baX_2022-01-14.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2022-01-14_rev5791.55881.zip import_baX_2022-01-14.csv 2106* 2107* 2108* 2109* 2110* 2112* 2116* 2117* 2118* 2121* 2122* 3191* 3192* 3193* 3194* 3195* 3196* 3197* 3198* 3199* 3200* 3201* 3202* 3203* 3204* 3205* 3206* 3207* 3208* 3209* 3210* 3211* 3212* 3213* 3214* 3215* 3216* 3217* 3218* 3221* 3223* 3225* 3286* 3301* 4103* 4118* 4119* 4120* 4121* 4122* 4123* 4124* 4130*
|
||||
BLDGS="2106 2107 2108 2109 2110 2112 2116 2117 2118 2121 2122 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3221 3223 3225 3286 3301 4103 4118 4119 4120 4121 4122 4123 4124 4130"
|
||||
|
||||
|
||||
###BLDGS="4127"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
#BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287"
|
||||
#BLDGS="1101 1102"
|
||||
|
||||
BLDGS="1104"
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
BLDG_STR="";
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
BLDG_STR="${BLDG_STR} bldg_${BLDG}*"
|
||||
done
|
||||
echo " copy and paste template: zip bldgs_2021-XX-XX_rev5000.XXXXX.zip import_baX.csv $BLDG_STR"
|
||||
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
#echo " work on item: '$BLDG'"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build-3dws/bin/BuildingControlTestVwmXml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml
|
||||
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo "------------------------------------";
|
||||
echo " failure on -> '$BLDG' ";
|
||||
echo " kate /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml &"
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
echo "grep..";
|
||||
grep -E "WARN|ERROR|FATAL" /shd/CTC/LOG/ctc_bcu_1.log*
|
||||
|
||||
|
||||
# bldg_1102 -> 4 Aussentreppen
|
||||
# bldg_1107 -> Aussentreppen
|
||||
# bldg_3280 -> Aussentreppen
|
||||
# U_Bahn -> 6 Fehler 2102 2114 2131 2202 2206 2210 (Räume ohne 'Dach')
|
||||
|
||||
#bldg_1208 Raum 109 ist über Eck gebaut -> daher keinen Treffer
|
||||
#bdlg_1221 ist über Eck gebaut. Center von 301 erzielt daher keinen Treffer
|
||||
#bldg_1232 ist über Eck gebaut. Center von 110, 210, 301 erzielen daher keinen Treffer
|
||||
#bldg_1234: Raum 106, 115, 206, 215, 304 ist über Eck gebaut -> erzielen daher keinen Treffer
|
||||
#bldg_1239: 2108, 2207 -> Aussentreppe
|
||||
#bldg_1240: 2104, 2202 -> Aussentreppe
|
||||
#bldg_1242: 2103, 2203, 2302 -> Aussentreppe
|
||||
#bldg 1244: Raum 108, 202 ist Aussentreppe
|
||||
#bldg 1254: RefMode/BSM 11008 ist an einem Geländer angebracht. Trifft aber keinen Raum (auch nicht 301) Da es ein Geländer ist, stufe ich es als akzeptabel ein.
|
||||
|
||||
#bldg_3132: Raum 2114, 2214, 2314, 2401 sind über Eck gebaut -> erzielen daher keinen Treffer
|
||||
#bldg_3133: Krankenhaus: 2309 ist über Eck gebaut -> erzielen daher keinen Treffer
|
||||
#bldg_3160: 2105, 2204 -> Aussentreppe
|
||||
#bldg_3164: Aussentreppe OUT OF FOOTPRINT. Center von 2204 erzielt daher keinen Treffer
|
||||
|
||||
#bldg_3264: Raum 2102 ist ein Innenhof -> according outterWalls (#=55) are vertical?
|
||||
|
||||
#bldg_4169, 4170, 4171, 4172, 4173, 4174, 4175, 4176, 4177 -> Aussentreppe according outterWalls (#=55) are vertical?
|
||||
|
||||
#bldg_3207: 2101 OUT OF FOOTPRINT Aussentreppe
|
||||
#bldg_3213: 2102, 2202 OUT OF FOOTPRINT Aussentreppe
|
||||
|
||||
done
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
|
||||
# kate /shd/CTC/TOOLS/TDS/TDS-build/bin/log4cxx_bcu.props &
|
||||
# kate /shd/CTC/LOG/ctc_bcu_1.log &
|
||||
@@ -0,0 +1,78 @@
|
||||
#
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
SET(vwm_SRCS
|
||||
vwm_api.cpp
|
||||
vwm_api.h
|
||||
vwm_building.cpp
|
||||
vwm_building.h
|
||||
vwm_building_room_geometry.cpp
|
||||
vwm_building_room_geometry.h
|
||||
vwm_deposition.cpp
|
||||
vwm_deposition.h
|
||||
vwm_math.cpp
|
||||
vwm_math.h
|
||||
vwm_state_store.cpp
|
||||
vwm_state_store.h
|
||||
vwm_types.h
|
||||
vwm_xml_reader.cpp
|
||||
vwm_xml_reader.h
|
||||
)
|
||||
|
||||
NGL_ADD_LIBRARY2(AAR SV BuildingControlVwm SHARED ${vwm_SRCS})
|
||||
NGL_TARGET_LINK_LIBRARIES(BuildingControlVwm
|
||||
PRIVATE
|
||||
ngltools
|
||||
Qt5::Xml
|
||||
PUBLIC
|
||||
Qt5::Core
|
||||
Qt5::Gui
|
||||
LtsUtilsCoreHeaderOnly
|
||||
BuildingControlCommon
|
||||
)
|
||||
################################
|
||||
### Test
|
||||
################################
|
||||
NGL_ADD_EXECUTABLE(AAR SV BuildingControlTestVwm test_read_xml.cpp test_read_xml.h)
|
||||
NGL_TARGET_LINK_LIBRARIES(BuildingControlTestVwm
|
||||
NGLLogger
|
||||
ngltools
|
||||
LtsUtilsCoreHeaderOnly
|
||||
Qt5::Xml
|
||||
Qt5::Core
|
||||
BuildingControlCommon
|
||||
BuildingControlVwm
|
||||
nglcoreapplication
|
||||
LtsCoordTrans
|
||||
)
|
||||
NGL_ADD_EXECUTABLE(AAR SV BuildingControlTestVwmXml test_vwm_xml.cpp)
|
||||
NGL_TARGET_LINK_LIBRARIES(BuildingControlTestVwmXml
|
||||
LtsUtilsCoreHeaderOnly
|
||||
Qt5::Xml
|
||||
Qt5::Core
|
||||
Qt5::Gui
|
||||
BuildingControlVwm
|
||||
BuildingControlCommon
|
||||
nglcoreapplication
|
||||
)
|
||||
|
||||
IF(BUILD_TESTING AND TARGET BuildingControlVwm)
|
||||
SET(test_SRCS
|
||||
vwm_math_unit_test.cpp
|
||||
vwm_math_unit_test.h
|
||||
)
|
||||
ADD_EXECUTABLE(bld_vwm_math_unit_test ${test_SRCS})
|
||||
TARGET_LINK_LIBRARIES(bld_vwm_math_unit_test
|
||||
Qt5::Gui
|
||||
Qt5::Core
|
||||
Qt5::Test
|
||||
BuildingControlVwm
|
||||
BuildingControlCommon
|
||||
nglcoreapplication
|
||||
)
|
||||
ADD_TEST(NAME bld_vwm_math_unit_test COMMAND $<TARGET_FILE:bld_vwm_math_unit_test>)
|
||||
ENDIF()
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
|
||||
BLDG="1101"
|
||||
|
||||
COORDS=""
|
||||
|
||||
#COORDS="${COORDS} HeAz_${BLDG}Dach_11;371;0.202554;0.916096"
|
||||
#COORDS="${COORDS} Annz_${BLDG}Dach_12;382;0.202554;0.916096"
|
||||
#COORDS="${COORDS} Annz_${BLDG}Dach_13;382;0.202554;0.916096"
|
||||
|
||||
#COORDS="${COORDS} HeAZ_${BLDG}Dach_11;371;0.202554;0.916096"
|
||||
|
||||
# SekundaerWirkung
|
||||
COORDS="${COORDS} HeAz_${BLDG}Dach_SekWirk;371;0.20255028;0.91609673"
|
||||
|
||||
|
||||
for COORD in ${COORDS}
|
||||
do
|
||||
|
||||
NAME=`echo $COORD | awk -F ";" '{print $1}'`
|
||||
AMMO=`echo $COORD | awk -F ";" '{print $2}'`
|
||||
X=`echo $COORD | awk -F ";" '{print $3}'`
|
||||
Y=`echo $COORD | awk -F ";" '{print $4}'`
|
||||
|
||||
echo "Trigger AWES with: Name='$NAME' ; AMMO=$AMMO ; X=$X - Y=$Y"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin//aes_test_explosion_single -d 139 -e42 name $NAME ammoId ${AMMO} x $X y $Y
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "'$NAME' okay";
|
||||
else
|
||||
echo " failure on -> '$NAME' ";
|
||||
fi
|
||||
|
||||
sleep 10
|
||||
|
||||
done
|
||||
|
||||
FILE=`ls -tr /tmp/ShotResult_bldg_${BLDG}* | tail -n 1`
|
||||
echo " libreoffice $FILE"
|
||||
|
||||
#libreoffice $FILE &
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
|
||||
BLDG="1101"
|
||||
|
||||
COORDS=""
|
||||
|
||||
#COORDS="${COORDS} HeAZ_${BLDG}Dach_11;371;0.202554;0.916096"
|
||||
#COORDS="${COORDS} HeAZ_${BLDG}Dach_12;371;0.202554;0.916096"
|
||||
#COORDS="${COORDS} HeAZ_${BLDG}Dach_13;371;0.202554;0.916096"
|
||||
# Verteilt über das Dach
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_11;371;0.202550;0.916097"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_12;371;0.202551;0.916097"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_13;371;0.202552;0.916097"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_14;371;0.202553;0.916096"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_15;371;0.202554;0.916096"
|
||||
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_16;371;0.202549;0.9160965"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_17;371;0.202550;0.9160964"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_18;371;0.202551;0.9160962"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_19;371;0.202552;0.9160960"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_20;371;0.202553;0.9160959"
|
||||
|
||||
|
||||
for COORD in ${COORDS}
|
||||
do
|
||||
|
||||
NAME=`echo $COORD | awk -F ";" '{print $1}'`
|
||||
AMMO=`echo $COORD | awk -F ";" '{print $2}'`
|
||||
X=`echo $COORD | awk -F ";" '{print $3}'`
|
||||
Y=`echo $COORD | awk -F ";" '{print $4}'`
|
||||
|
||||
echo "Trigger AWES with: Name='$NAME' ; AMMO=$AMMO ; X=$X - Y=$Y"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin//aes_test_explosion_single -d 139 -e42 name $NAME ammoId ${AMMO} x $X y $Y
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "'$NAME' okay";
|
||||
else
|
||||
echo " failure on -> '$NAME' ";
|
||||
fi
|
||||
|
||||
sleep 5
|
||||
|
||||
done
|
||||
|
||||
FILE=`ls -tr /tmp/ShotResult_bldg_${BLDG}* | tail -n 1`
|
||||
echo " libreoffice $FILE"
|
||||
|
||||
libreoffice $FILE &
|
||||
@@ -0,0 +1,49 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
|
||||
BLDG="1108"
|
||||
|
||||
COORDS=""
|
||||
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_11;371;0.202567;0.91609"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_12;371;0.202567;0.91609"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_13;371;0.202567;0.91609"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_14;371;0.202567;0.91609"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_15;371;0.202567;0.91609"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_16;371;0.202567;0.91609"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_17;371;0.202567;0.91609"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_18;371;0.202567;0.91609"
|
||||
|
||||
for COORD in ${COORDS}
|
||||
do
|
||||
|
||||
NAME=`echo $COORD | awk -F ";" '{print $1}'`
|
||||
AMMO=`echo $COORD | awk -F ";" '{print $2}'`
|
||||
X=`echo $COORD | awk -F ";" '{print $3}'`
|
||||
Y=`echo $COORD | awk -F ";" '{print $4}'`
|
||||
|
||||
echo "Trigger AWES with: Name='$NAME' ; AMMO=$AMMO ; X=$X - Y=$Y"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin//aes_test_explosion_single -d 139 -e42 name $NAME ammoId ${AMMO} x $X y $Y
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "'$NAME' okay";
|
||||
else
|
||||
echo " failure on -> '$NAME' ";
|
||||
fi
|
||||
|
||||
sleep 10
|
||||
|
||||
done
|
||||
|
||||
FILE=`ls -tr /tmp/ShotResult_bldg_${BLDG}* | tail -n 1`
|
||||
echo " libreoffice $FILE"
|
||||
|
||||
libreoffice $FILE &
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
|
||||
BLDG="1115"
|
||||
|
||||
COORDS=""
|
||||
|
||||
# Verteilt über das Dach
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_11;371;0.2025585;0.9160916"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_12;371;0.2025580;0.9160911"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_13;371;0.2025589;0.9160907"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_14;371;0.2025585;0.9160904"
|
||||
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_15;371;0.2025582;0.9160907"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_16;371;0.2025588;0.9160913"
|
||||
|
||||
|
||||
|
||||
for COORD in ${COORDS}
|
||||
do
|
||||
|
||||
NAME=`echo $COORD | awk -F ";" '{print $1}'`
|
||||
AMMO=`echo $COORD | awk -F ";" '{print $2}'`
|
||||
X=`echo $COORD | awk -F ";" '{print $3}'`
|
||||
Y=`echo $COORD | awk -F ";" '{print $4}'`
|
||||
|
||||
echo "Trigger AWES with: Name='$NAME' ; AMMO=$AMMO ; X=$X - Y=$Y"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin//aes_test_explosion_single -d 139 -e42 name $NAME ammoId ${AMMO} x $X y $Y
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "'$NAME' okay";
|
||||
else
|
||||
echo " failure on -> '$NAME' ";
|
||||
fi
|
||||
|
||||
#sleep 5
|
||||
|
||||
done
|
||||
|
||||
FILE=`ls -tr /tmp/ShotResult_bldg_${BLDG}* | tail -n 1`
|
||||
echo " libreoffice $FILE"
|
||||
|
||||
libreoffice $FILE &
|
||||
@@ -0,0 +1,44 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
|
||||
BLDG="1116"
|
||||
|
||||
COORDS=""
|
||||
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_11;371;0.202561;0.916094"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_12;371;0.202561;0.916094"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_13;371;0.202561;0.916094"
|
||||
|
||||
for COORD in ${COORDS}
|
||||
do
|
||||
|
||||
NAME=`echo $COORD | awk -F ";" '{print $1}'`
|
||||
AMMO=`echo $COORD | awk -F ";" '{print $2}'`
|
||||
X=`echo $COORD | awk -F ";" '{print $3}'`
|
||||
Y=`echo $COORD | awk -F ";" '{print $4}'`
|
||||
|
||||
echo "Trigger AWES with: Name='$NAME' ; AMMO=$AMMO ; X=$X - Y=$Y"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin//aes_test_explosion_single -d 139 -e42 name $NAME ammoId ${AMMO} x $X y $Y
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "'$NAME' okay";
|
||||
else
|
||||
echo " failure on -> '$NAME' ";
|
||||
fi
|
||||
|
||||
sleep 10
|
||||
|
||||
done
|
||||
|
||||
FILE=`ls -tr /tmp/ShotResult_bldg_${BLDG}* | tail -n 1`
|
||||
echo " libreoffice $FILE"
|
||||
|
||||
libreoffice $FILE &
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
|
||||
BLDG="3101"
|
||||
|
||||
COORDS=""
|
||||
|
||||
# Verteilt über das Dach
|
||||
#COORDS="${COORDS} HeAZ_${BLDG}Dach_11;371;32_U_PD_77232_18568"
|
||||
#COORDS="${COORDS} HeAZ_${BLDG}Dach_12;371;32_U_PD_77232_18562"
|
||||
#COORDS="${COORDS} HeAZ_${BLDG}Dach_13;371;32_U_PD_77232_18556" # Outside??? -> 2113
|
||||
#COORDS="${COORDS} HeAZ_${BLDG}Dach_14;371;32_U_PD_77232_18550"
|
||||
|
||||
#COORDS="${COORDS} HeAZ_${BLDG}Dach_15;371;32_U_PD_77226_18559"
|
||||
#COORDS="${COORDS} HeAZ_${BLDG}Dach_16;371;32_U_PD_77240_18559"
|
||||
|
||||
# UnitTest :
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_XX;371;32_U_PD_77230_18558" # U_PD_77230_18558 -> 2608
|
||||
# ->
|
||||
# 2021-11-04 10:56:54.006 INFO BCU::VWM::Math
|
||||
# |#| XXXXX Searching nearest room for bsm position (7.82166,6.2496,10000), bsmViewDirection (0,0,1), hit direction (-0,-0,-1), #rooms = 62 (ies/Buildings/BuildingControlUnit/VWM/vwm_math.cpp:453)
|
||||
# |#| XXXXX nearest distance = 9983.21 on outer wall in room 2608room[2608] wall[1] wallElement[0] (ies/Buildings/BuildingControlUnit/VWM/vwm_math.cpp:533)
|
||||
## ^^^^^
|
||||
# |#| XXXXX nearest distance = 9983.21 on outer wall in room 2701room[2701] wall[12] wallElement[0] (ies/Buildings/BuildingControlUnit/VWM/vwm_math.cpp:533)
|
||||
# |#| XXXXX HitPosition: HitPosition::State::OuterWall, roomId = 2701, outerWallIndex = 12, exclusionZoneIndex = -1 (ies/Buildings/BuildingControlUnit/VWM/vwm_math.cpp:540)
|
||||
# |#| XXXXX Searching hit position for position (7.82166,6.2496,10000), direction (-0,-0,-1), #rooms = 62 (ies/Buildings/BuildingControlUnit/VWM/vwm_math.cpp:364)
|
||||
# |#| XXXXX HitPosition: HitPosition::State::OuterWall, roomId = 2701, outerWallIndex = 12, exclusionZoneIndex = -1 (ies/Buildings/BuildingControlUnit/VWM/vwm_math.cpp:411)
|
||||
|
||||
# : UnitTest
|
||||
|
||||
|
||||
|
||||
|
||||
for COORD in ${COORDS}
|
||||
do
|
||||
|
||||
NAME=`echo $COORD | awk -F ";" '{print $1}'`
|
||||
AMMO=`echo $COORD | awk -F ";" '{print $2}'`
|
||||
MGRS=`echo $COORD | awk -F ";" '{print $3}'`
|
||||
MGRS2=`echo $MGRS | sed -e 's/_//g'`
|
||||
echo "XXX $MGRS2 "
|
||||
|
||||
LATLON=`/shd/CTC/TOOLS/TDS/TDS-build/bin/mgrs2lonlat $MGRS2`
|
||||
echo " '$LATLON' "
|
||||
X=`echo $LATLON | cut -d "(" -f2 | awk -F " " '{print $1}'`
|
||||
Y=`echo $LATLON | cut -d "(" -f2 | awk -F " " '{print $2}'`
|
||||
|
||||
echo "Trigger AWES with: Name='$NAME' ; AMMO=$AMMO ; X=$X - Y=$Y ($MGRS)"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin//aes_test_explosion_single -d 139 -e42 name $NAME ammoId ${AMMO} x $X y $Y
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "'$NAME' okay";
|
||||
else
|
||||
echo " failure on -> '$NAME' ";
|
||||
fi
|
||||
|
||||
sleep 5
|
||||
|
||||
done
|
||||
|
||||
FILE=`ls -tr /tmp/ShotResult_bldg_${BLDG}* | tail -n 1`
|
||||
echo " libreoffice $FILE"
|
||||
|
||||
#libreoffice $FILE &
|
||||
@@ -0,0 +1,75 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
|
||||
BLDG="BN_Kanaele"
|
||||
|
||||
COORDS=""
|
||||
|
||||
# Verteilt
|
||||
COORDS="${COORDS} HeAZ_${BLDG}GULLY109_01;371;32_U_PD_76914_18571"
|
||||
|
||||
# -> 101
|
||||
COORDS="${COORDS} HeAZ_${BLDG}NordOst_11;371;32_U_PD_76945_18588"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}NordOst_12;371;32_U_PD_76945_18588"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}NordOst_13;371;32_U_PD_76945_18588"
|
||||
|
||||
# -> 110
|
||||
COORDS="${COORDS} HeAZ_${BLDG}NordWest_21;371;32_U_PD_76891_18588"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}NordWest_22;371;32_U_PD_76891_18588"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}NordWest_23;371;32_U_PD_76891_18588"
|
||||
|
||||
# -> 114
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Sued_31;371;32_U_PD_76880_18508"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Sued_32;371;32_U_PD_76880_18508"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Sued_33;371;32_U_PD_76880_18508"
|
||||
|
||||
# -> 104
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Ost_41;371;32_U_PD_77000_18515"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Ost_42;371;32_U_PD_77000_18515"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Ost_43;371;32_U_PD_77000_18515"
|
||||
|
||||
# -> NEBEN / 112
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Ost_43;371;32_U_PD_76825_18550"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Ost_43;371;32_U_PD_76825_18550"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Ost_43;371;32_U_PD_76825_18550"
|
||||
|
||||
|
||||
for COORD in ${COORDS}
|
||||
do
|
||||
|
||||
NAME=`echo $COORD | awk -F ";" '{print $1}'`
|
||||
AMMO=`echo $COORD | awk -F ";" '{print $2}'`
|
||||
MGRS=`echo $COORD | awk -F ";" '{print $3}'`
|
||||
MGRS2=`echo $MGRS | sed -e 's/_//g'`
|
||||
echo "XXX $MGRS2 "
|
||||
|
||||
LATLON=`/shd/CTC/TOOLS/TDS/TDS-build/bin/mgrs2lonlat $MGRS2`
|
||||
echo " '$LATLON' "
|
||||
X=`echo $LATLON | cut -d "(" -f2 | awk -F " " '{print $1}'`
|
||||
Y=`echo $LATLON | cut -d "(" -f2 | awk -F " " '{print $2}'`
|
||||
|
||||
echo "Trigger AWES with: Name='$NAME' ; AMMO=$AMMO ; X=$X - Y=$Y ($MGRS)"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin//aes_test_explosion_single -d 139 -e42 name $NAME ammoId ${AMMO} x $X y $Y
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "'$NAME' okay";
|
||||
else
|
||||
echo " failure on -> '$NAME' ";
|
||||
fi
|
||||
|
||||
sleep 5
|
||||
|
||||
done
|
||||
|
||||
FILE=`ls -tr /tmp/ShotResult_bldg_${BLDG}* | tail -n 1`
|
||||
echo " libreoffice $FILE"
|
||||
|
||||
libreoffice $FILE &
|
||||
@@ -0,0 +1,54 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
|
||||
BLDG="U_Bahn"
|
||||
|
||||
COORDS=""
|
||||
# Hit EingangsGebäudeNorden : NEBEN - östlich (Raum 2230 - oberhalb Gleis)
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgN_11;371;0.202619;0.916077"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgN_12;371;0.202619;0.916077"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgN_13;371;0.202619;0.916077"
|
||||
|
||||
# Hit EingangsGebäudeMitte : rel. Mittig (Raum 2213 - oberhalb Gleis)
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgM_21;371;0.202603;0.916049"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgM_22;371;0.202603;0.916049"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgM_23;371;0.202603;0.916049"
|
||||
|
||||
# Hit EingangsGebäudeSüd : Direkt auf Einstieg (Raum - Dach 2401)
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgS_31;371;0.202592;0.91603"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgS_32;371;0.202592;0.91603"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgS_33;371;0.202592;0.91603"
|
||||
|
||||
for COORD in ${COORDS}
|
||||
do
|
||||
|
||||
NAME=`echo $COORD | awk -F ";" '{print $1}'`
|
||||
AMMO=`echo $COORD | awk -F ";" '{print $2}'`
|
||||
X=`echo $COORD | awk -F ";" '{print $3}'`
|
||||
Y=`echo $COORD | awk -F ";" '{print $4}'`
|
||||
|
||||
echo "Trigger AWES with: Name='$NAME' ; AMMO=$AMMO ; X=$X - Y=$Y"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin//aes_test_explosion_single -d 139 -e42 name $NAME ammoId ${AMMO} x $X y $Y
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "'$NAME' okay";
|
||||
else
|
||||
echo " failure on -> '$NAME' ";
|
||||
fi
|
||||
|
||||
sleep 10
|
||||
|
||||
done
|
||||
|
||||
FILE=`ls -tr /tmp/ShotResult_bldg_${BLDG}* | tail -n 1`
|
||||
echo " libreoffice $FILE"
|
||||
|
||||
libreoffice $FILE &
|
||||
@@ -0,0 +1,83 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
|
||||
BLDG="U_Bahn"
|
||||
|
||||
COORDS=""
|
||||
# Hit EingangsGebäudeNorden : (Raum 2230 - oberhalb Gleis)
|
||||
#COORDS="${COORDS} HeAZ_${BLDG}EgN_11;371;32_U_PD_77157_18444"
|
||||
#COORDS="${COORDS} HeAZ_${BLDG}EgN_12;371;32_U_PD_77150_18444"
|
||||
#COORDS="${COORDS} HeAZ_${BLDG}EgN_13;371;32_U_PD_77154_18451"
|
||||
|
||||
|
||||
# Hit EingangsGebäudeMitte :
|
||||
#COORDS="${COORDS} HeAZ_${BLDG}EgM_21;371;32_U_PD_77102_18261"
|
||||
#COORDS="${COORDS} HeAZ_${BLDG}EgM_22;371;32_U_PD_77098_18260"
|
||||
#COORDS="${COORDS} HeAZ_${BLDG}EgM_23;371;32_U_PD_77100_18267"
|
||||
|
||||
# Hit EingangsGebäudeSüd :
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgS_31;371;32_U_PD_77065_18137"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgS_32;371;32_U_PD_77060_18136"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgS_33;371;32_U_PD_77062_18144"
|
||||
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgS_31;371;32_U_PD_77065_18137"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgS_32;371;32_U_PD_77060_18136"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgS_33;371;32_U_PD_77062_18144"
|
||||
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgS_31;371;32_U_PD_77065_18137"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgS_32;371;32_U_PD_77060_18136"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgS_33;371;32_U_PD_77062_18144"
|
||||
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgS_31;371;32_U_PD_77065_18137"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgS_32;371;32_U_PD_77060_18136"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgS_33;371;32_U_PD_77062_18144"
|
||||
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgS_31;371;32_U_PD_77065_18137"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgS_32;371;32_U_PD_77060_18136"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgS_33;371;32_U_PD_77062_18144"
|
||||
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgS_31;371;32_U_PD_77065_18137"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgS_32;371;32_U_PD_77060_18136"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgS_33;371;32_U_PD_77062_18144"
|
||||
|
||||
for COORD in ${COORDS}
|
||||
do
|
||||
|
||||
NAME=`echo $COORD | awk -F ";" '{print $1}'`
|
||||
AMMO=`echo $COORD | awk -F ";" '{print $2}'`
|
||||
X=`echo $COORD | awk -F ";" '{print $3}'`
|
||||
Y=`echo $COORD | awk -F ";" '{print $4}'`
|
||||
MGRS=`echo $COORD | awk -F ";" '{print $3}'`
|
||||
MGRS2=`echo $MGRS | sed -e 's/_//g'`
|
||||
|
||||
LATLON=`/shd/CTC/TOOLS/TDS/TDS-build/bin/mgrs2lonlat $MGRS2`
|
||||
echo " '$LATLON' "
|
||||
X=`echo $LATLON | cut -d "(" -f2 | awk -F " " '{print $1}'`
|
||||
Y=`echo $LATLON | cut -d "(" -f2 | awk -F " " '{print $2}'`
|
||||
|
||||
|
||||
echo "Trigger AWES with: Name='$NAME' ; AMMO=$AMMO ; X=$X - Y=$Y ($MGRS)"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin//aes_test_explosion_single -d 139 -e42 name $NAME ammoId ${AMMO} x $X y $Y
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "'$NAME' okay";
|
||||
else
|
||||
echo " failure on -> '$NAME' ";
|
||||
fi
|
||||
|
||||
sleep 2
|
||||
|
||||
done
|
||||
|
||||
FILE=`ls -tr /tmp/ShotResult_bldg_${BLDG}* | tail -n 1`
|
||||
echo " libreoffice $FILE"
|
||||
|
||||
libreoffice $FILE &
|
||||
@@ -0,0 +1,34 @@
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
|
||||
https://devhub.defence-elec.de/jira/browse/GUEZE-688 U-Bahn: AWES ohne Wirkung
|
||||
|
||||
https://devhub.defence-elec.de/jira/browse/GUEZE-688?focusedCommentId=119903&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-119903
|
||||
|
||||
Stand 06/2021:
|
||||
==============
|
||||
Also, bei BT56 ist vor geraumer Zeit aufgefallen, das AWES auf das Dach seine Wirkung zwar entfaltet hat, die Wirkung aber im EG seinen Ursprung nahm.
|
||||
In dem Zuge hat Christian Ehrlicher (so Philip Dassow) den Algorithmus angepasst. Es wird dann nach der nearest wall gesucht...
|
||||
Damit wurde aber nicht nur AWES auf das Gebäude beeinflusst, sondern auch AWES neben das Gebäude. Der Source Code suggeriert, das dieses nicht unbedingt gewollte war... ("Detected hit was outside of the building - ignored" @ vwm_api.cpp)
|
||||
|
||||
Um die Wirkung von AWES neben das Gebäude zu berechnen (z.B. U-Bahn-Tunnel), wird der AWES-EinschlagOrt (z-Wert von "0") in der Koorinatensystem des Gebäudes verschoben. (BuildingProcess::sendCesHitOnBuilding). Die impactPosition bekommt dadurch einen z-Wert von ca. -90m, da Schnöggersburg bei 90m Höhe liegt.
|
||||
Jetzt wird also die nearest Wall zu der (rel.) impactPosition gesucht. Dabei sind die Keller-Etage näher, als die Einstiegsgebäude - unglücklich.
|
||||
Um bei der der Suche (Api::onHitCes) eine sinnvolle Wall (und damit room) zu finden, wird der z-Wert auf "1" gesetzt ("posImpactOnGround"; bei "0" würde dennoch eine unterirdische Wand gefunden, daher "1"). Somit wird dann eine passende Wall/room gefunden und der "direction"-Vector in die Hit-Structure eingetragen.
|
||||
(Dabei wird noch die 3-dimensionale BoundingBox (bottomLeft, topRight) der Wand ermittelt, um Rundungsprobleme zu eleminieren.)
|
||||
|
||||
Somit wird für den Tunnel oberirdisch gesucht und gefunden - zumindest bei Einschläge neben die Einstiegsgebäude. bei Einschläge zw. den Einstiegsgebäuden (z.B. bei Raum 122) sollte der eine lange virtuelle Raum (derzeit "208") oberhalb von 116-129) gefunden werden. Die nearest-wall-Suche basiert allerdings "nur" auf den Stützpunkten der wall. Und die Stützpunkte von Raum 122 sind näher dran, als die von 208.
|
||||
-> der virtuelle Raum oberhalb der begehbaren Räume 116-129 sollte analog zu diesen aufgeteilt werden. Für 104-112 gilt das gleiche.
|
||||
|
||||
Wie können Räume wie 122 unterhalb der Erdoberfläche stärker von AWES geschützt werden?
|
||||
Dabei könnte man den (in Api::sendHitToVwm) den z-Wert des direction-Vectors nutzen. Bei U-Bahn-Tunnel führt dies z.B. zu ca- "-5" Meter.
|
||||
Bei der Kanalisation funktioniert das nicht. Der Referenzpunkt des U-Bahn-Tunnel ist an der quasi an der Erdoblerfläche. D.h. unterirdische Räume (1nn, 2nn) haben neg. z-Werte, während 3nn positive hat.
|
||||
|
||||
Bei der Kanalisation ist der Referenzpunkt unten, es gibt keine neg. z-Werte!
|
||||
|
||||
Auch aufgrund der große Ausdehnung ist der Ansatz über den z-Wert der direction fragwürdig.
|
||||
|
||||
Und was ist mit dem Tunnel in Salchau?
|
||||
|
||||
Dieser Tunnel hat gar keine Wände! Daher bleibt die nearest-wall-Suche erfolglos. Der Tunnel erfährt keine Zerstörung. Auch mit mit einem Einschlag in den Brunnen keine Zerstörung erzielen...
|
||||
BIN
Binary file not shown.
Executable
+22
@@ -0,0 +1,22 @@
|
||||
Copyright (c) 2012, Vladimir Agafonkin
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are
|
||||
permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
of conditions and the following disclaimer in the documentation and/or other materials
|
||||
provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
Simplify.js is a high-performance JavaScript 2D/3D polyline simplification library by Vladimir Agafonkin, extracted from [Leaflet](http://leafletjs.com).
|
||||
|
||||
Docs and demo: http://mourner.github.io/simplify-js/
|
||||
|
||||
#### Ports
|
||||
|
||||
* Python: [omarestrella / simplify.py](https://github.com/omarestrella/simplify.py) (by Omar Estrella)
|
||||
* PHP: [AKeN / simplify-php](https://github.com/AKeN/simplify-php) (by Rotari Gheorghe)
|
||||
* Java: [ekeneijeoma / simplify-java](https://github.com/ekeneijeoma/simplify-java) (by Ekene Ijeoma)
|
||||
* Java: [hgoebl / simplify-java](https://github.com/hgoebl/simplify-java) (by Heinrich Göbl)
|
||||
* Processing: [ekeneijeoma / simplify-processing](https://github.com/ekeneijeoma/simplify-processing) (by Ekene Ijeoma)
|
||||
* AS3: [fnicollet / simplify-as3](https://github.com/fnicollet/simplify-as3) (by Fabien Nicollet)
|
||||
* Rust: [calvinmetcalf / simplify-rs](https://github.com/calvinmetcalf/simplify-rs) (by Calvin Metcalf)
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "simplify-js",
|
||||
"description": "A high-performance JavaScript 2D/3D polyline simplification library",
|
||||
"homepage": "http://mourner.github.com/simplify-js/",
|
||||
"author": "Vladimir Agafonkin",
|
||||
"keywords": [
|
||||
"math",
|
||||
"geometry",
|
||||
"polyline",
|
||||
"simplification"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/mourner/simplify-js.git"
|
||||
},
|
||||
"main": "simplify.js",
|
||||
"version": "1.1.0"
|
||||
}
|
||||
Executable
+153
@@ -0,0 +1,153 @@
|
||||
/*
|
||||
(c) 2013, Vladimir Agafonkin
|
||||
Simplify.js, a high-performance JS polyline simplification library
|
||||
mourner.github.io/simplify-js
|
||||
*/
|
||||
|
||||
(function () { "use strict";
|
||||
|
||||
// to suit your point format, run search/replace for '.x', '.y' and '.z';
|
||||
// (configurability would draw significant performance overhead)
|
||||
|
||||
// square distance between 2 points
|
||||
function getSquareDistance(p1, p2) {
|
||||
|
||||
var dx = p1.x - p2.x,
|
||||
dy = p1.y - p2.y,
|
||||
dz = p1.z - p2.z;
|
||||
|
||||
return dx * dx + dy * dy + dz * dz;
|
||||
}
|
||||
|
||||
// square distance from a point to a segment
|
||||
function getSquareSegmentDistance(p, p1, p2) {
|
||||
|
||||
var x = p1.x,
|
||||
y = p1.y,
|
||||
z = p1.z,
|
||||
|
||||
dx = p2.x - x,
|
||||
dy = p2.y - y,
|
||||
dz = p2.z - z;
|
||||
|
||||
if (dx !== 0 || dy !== 0 || dz !== 0) {
|
||||
|
||||
var t = ((p.x - x) * dx + (p.y - y) * dy + (p.z - z) * dz) /
|
||||
(dx * dx + dy * dy + dz * dz);
|
||||
|
||||
if (t > 1) {
|
||||
x = p2.x;
|
||||
y = p2.y;
|
||||
z = p2.z;
|
||||
|
||||
} else if (t > 0) {
|
||||
x += dx * t;
|
||||
y += dy * t;
|
||||
z += dz * t;
|
||||
}
|
||||
}
|
||||
|
||||
dx = p.x - x;
|
||||
dy = p.y - y;
|
||||
dz = p.z - z;
|
||||
|
||||
return dx * dx + dy * dy + dz * dz;
|
||||
}
|
||||
// the rest of the code doesn't care for the point format
|
||||
|
||||
// basic distance-based simplification
|
||||
function simplifyRadialDistance(points, sqTolerance) {
|
||||
|
||||
var prevPoint = points[0],
|
||||
newPoints = [prevPoint],
|
||||
point;
|
||||
|
||||
for (var i = 1, len = points.length; i < len; i++) {
|
||||
point = points[i];
|
||||
|
||||
if (getSquareDistance(point, prevPoint) > sqTolerance) {
|
||||
newPoints.push(point);
|
||||
prevPoint = point;
|
||||
}
|
||||
}
|
||||
|
||||
if (prevPoint !== point) {
|
||||
newPoints.push(point);
|
||||
}
|
||||
|
||||
return newPoints;
|
||||
}
|
||||
|
||||
// simplification using optimized Douglas-Peucker algorithm with recursion elimination
|
||||
function simplifyDouglasPeucker(points, sqTolerance) {
|
||||
|
||||
var len = points.length,
|
||||
MarkerArray = typeof Uint8Array !== 'undefined' ? Uint8Array : Array,
|
||||
markers = new MarkerArray(len),
|
||||
|
||||
first = 0,
|
||||
last = len - 1,
|
||||
|
||||
stack = [],
|
||||
newPoints = [],
|
||||
|
||||
i, maxSqDist, sqDist, index;
|
||||
|
||||
markers[first] = markers[last] = 1;
|
||||
|
||||
while (last) {
|
||||
|
||||
maxSqDist = 0;
|
||||
|
||||
for (i = first + 1; i < last; i++) {
|
||||
sqDist = getSquareSegmentDistance(points[i], points[first], points[last]);
|
||||
|
||||
if (sqDist > maxSqDist) {
|
||||
index = i;
|
||||
maxSqDist = sqDist;
|
||||
}
|
||||
}
|
||||
|
||||
if (maxSqDist > sqTolerance) {
|
||||
markers[index] = 1;
|
||||
stack.push(first, index, index, last);
|
||||
}
|
||||
|
||||
last = stack.pop();
|
||||
first = stack.pop();
|
||||
}
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
if (markers[i]) {
|
||||
newPoints.push(points[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return newPoints;
|
||||
}
|
||||
|
||||
// both algorithms combined for awesome performance
|
||||
function simplify(points, tolerance, highestQuality) {
|
||||
|
||||
var sqTolerance = tolerance !== undefined ? tolerance * tolerance : 1;
|
||||
|
||||
points = highestQuality ? points : simplifyRadialDistance(points, sqTolerance);
|
||||
points = simplifyDouglasPeucker(points, sqTolerance);
|
||||
|
||||
return points;
|
||||
}
|
||||
|
||||
// export as a Node module, an AMD module or a global browser variable
|
||||
if (typeof module !== 'undefined') {
|
||||
module.exports = simplify;
|
||||
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define(function() {
|
||||
return simplify;
|
||||
});
|
||||
|
||||
} else {
|
||||
window.simplify = simplify;
|
||||
}
|
||||
|
||||
})();
|
||||
Executable
+239
@@ -0,0 +1,239 @@
|
||||
// $Id$
|
||||
// $HeadURL$
|
||||
// $Author$
|
||||
// Created by Norbert Thoden, 2021-11
|
||||
|
||||
//const fs = require('fs');
|
||||
//const aa = require('./simplify.js')();
|
||||
|
||||
|
||||
var util = require('util');
|
||||
|
||||
var pnts = [{x:100.11,y:100.15, z:1.23}, {x:500.11,y:100.14, z:1.23},{x:500.11,y:200.14, z:1.23},{x:100.1,y:200.15, z:1.23}]
|
||||
|
||||
var pointsArray = [];
|
||||
pointsArray.push(pnts);
|
||||
|
||||
|
||||
|
||||
//static const QVector<LtsUtils::QPoint3D> polyBldg1116_206_9({
|
||||
// {24.038, 11.995, 6.431},
|
||||
// {23.858, 11.995, 6.431}, // dependent / will be removed
|
||||
// {21.226, 11.995, 6.431},
|
||||
// {21.226, 11.995, 6.449}
|
||||
pointsArray.push([{x:24.038, y: 11.995, z: 6.431}, {x: 23.858, y: 11.995, z: 6.431}, {x: 21.226, y: 11.995, z: 6.431}, {x: 21.226, y: 11.995, z: 6.449}] );
|
||||
|
||||
|
||||
//static const QVector<LtsUtils::QPoint3D> polyBldg3101_306_149({
|
||||
// {10.905, 16.003, 5.480},
|
||||
// {12.277, 16.003, 5.480}, // dependent / will be removed
|
||||
// {17.839, 16.004, 5.480},
|
||||
// {17.839, 16.004, 8.040},
|
||||
// {10.905, 16.003, 8.040}
|
||||
pointsArray.push([{x: 10.905, y: 16.003, z: 5.480}, {x: 12.277, y: 16.003, z: 5.480}, {x: 17.839, y: 16.004, z: 5.480}, {x: 17.839, y: 16.004, z: 8.040}, {x: 10.905, y: 16.003, z: 8.040} ]);
|
||||
|
||||
|
||||
// static const QVector<LtsUtils::QPoint3D> polyBldg1108_103_X({
|
||||
// {-0.000, 15.979, 2.278}, // idx=0
|
||||
// {-0.000, 15.979, 0.975}, // idx=1 // problem 1: linear dependent
|
||||
// {-0.000, 15.979, 0.000}, // idx=2
|
||||
// { 0.180, 15.979, 0.000}, // idx=3
|
||||
// { 0.180, 15.979, 2.490}, // idx=4
|
||||
// {-0.000, 15.979, 2.490}, // idx=5
|
||||
// {-0.000, 15.979, 0.000} // idx=6 identical to idx=2 - problem???
|
||||
// });
|
||||
|
||||
pointsArray.push([{x: -0.000, y: 15.979,z: 2.278}, {x: -0.000, y: 15.979,z: 0.975}, {x: -0.000, y: 15.979,z: 0.000}, {x: 0.180, y: 15.979,z: 0.000}, {x: 0.180, y: 15.979,z: 2.490}, {x: -0.000, y: 15.979,z: 2.490}, {x: -0.000, y: 15.979,z: 0.000}]);
|
||||
|
||||
|
||||
|
||||
// static const QVector<LtsUtils::QPoint3D> polyBldg3101_608_387_Org({
|
||||
// {10.726, 8.619, 16.787}, // idx=0
|
||||
// {10.726, 8.716, 16.786}, // idx=1
|
||||
// { 7.291, 8.716, 16.786}, // idx=2
|
||||
// { 7.291, 8.619, 16.787}, // idx=3 // problem 1: linear dependent, wenn z gleich wäre...
|
||||
// { 7.291, 4.281, 16.717}, // idx=4
|
||||
// {10.726, 4.281, 16.717} // idx=5
|
||||
// });
|
||||
|
||||
pointsArray.push([{x: 10.726,y: 8.619,z: 16.787}, {x: 10.726,y: 8.716,z: 16.786}, {x: 7.291,y: 8.716,z: 16.786}, {x: 7.291,y: 8.619,z: 16.787}, {x: 7.291,y: 4.281,z: 16.717}, {x: 10.726,y: 4.281,z: 16.717}] );
|
||||
|
||||
// static const QVector<LtsUtils::QPoint3D> polyBldg1131_201_3({ // sollte eigentlich waagerechte Wand darstellen
|
||||
// {0.000, 5.987, 2.689}, // idx=0
|
||||
// {0.000, 5.791, 2.695}, // idx=1 // idx=1 "stört"
|
||||
// {0.000, 0.170, 2.859}, // idx=2
|
||||
// {3.098, 0.170, 2.859}, // idx=3
|
||||
// {3.098, 5.791, 2.695}, // idx=4
|
||||
// {2.928, 5.987, 2.689} // idx=5
|
||||
// });
|
||||
|
||||
pointsArray.push([{x: 0.000,y: 5.987,z: 2.689}, {x: 0.000,y: 5.791,z: 2.695}, {x: 0.000,y: 0.170,z: 2.859}, {x: 3.098,y: 0.170,z: 2.859}, {x: 3.098,y: 5.791,z: 2.695}, {x: 2.928,y: 5.987,z: 2.689}]);
|
||||
|
||||
|
||||
// 0910:
|
||||
pointsArray.push([{x:22.337, y:0.064, z:5.232}, {x:14.362, y:0.064, z:5.232}, {x:14.362, y:-12.764, z:6.797}, {x:22.337, y:-12.764, z:6.797}]);
|
||||
|
||||
// 1275
|
||||
pointsArray.push([{x:-0.105, y:1.606, z:2.240}, {x:-0.105, y:2.494, z:2.240}, {x:-0.105, y:2.494, z:2.311}, {x:-0.105, y:1.606, z:2.311}]);
|
||||
|
||||
|
||||
var myArgs = process.argv.slice(2);
|
||||
|
||||
console.log('myArgs: ', myArgs);
|
||||
|
||||
|
||||
const tolerance = myArgs[0];
|
||||
const highQuality = myArgs[1];
|
||||
console.log('tolerance: ', tolerance + " - highQuality: " + highQuality);
|
||||
|
||||
|
||||
pointsArray.forEach(points => {
|
||||
console.log("-------------------------------------------");
|
||||
console.log("input: size=" + points.length + " \n data=" + util.inspect(points, {showHidden: false, depth: 2}));
|
||||
var result = simplify(points, tolerance, highQuality);
|
||||
console.log(" result: size=" + result.length + " \n data=" + util.inspect(result, {showHidden: false, depth: 2}));
|
||||
});
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************************/
|
||||
|
||||
|
||||
|
||||
// square distance between 2 points
|
||||
function getSquareDistance(p1, p2) {
|
||||
|
||||
var dx = p1.x - p2.x,
|
||||
dy = p1.y - p2.y,
|
||||
dz = p1.z - p2.z;
|
||||
|
||||
return dx * dx + dy * dy + dz * dz;
|
||||
}
|
||||
|
||||
// square distance from a point to a segment
|
||||
function getSquareSegmentDistance(p, p1, p2) {
|
||||
|
||||
var x = p1.x,
|
||||
y = p1.y,
|
||||
z = p1.z,
|
||||
|
||||
dx = p2.x - x,
|
||||
dy = p2.y - y,
|
||||
dz = p2.z - z;
|
||||
|
||||
if (dx !== 0 || dy !== 0 || dz !== 0) {
|
||||
|
||||
var t = ((p.x - x) * dx + (p.y - y) * dy + (p.z - z) * dz) /
|
||||
(dx * dx + dy * dy + dz * dz);
|
||||
|
||||
if (t > 1) {
|
||||
x = p2.x;
|
||||
y = p2.y;
|
||||
z = p2.z;
|
||||
|
||||
} else if (t > 0) {
|
||||
x += dx * t;
|
||||
y += dy * t;
|
||||
z += dz * t;
|
||||
}
|
||||
}
|
||||
|
||||
dx = p.x - x;
|
||||
dy = p.y - y;
|
||||
dz = p.z - z;
|
||||
|
||||
return dx * dx + dy * dy + dz * dz;
|
||||
}
|
||||
// the rest of the code doesn't care for the point format
|
||||
|
||||
// basic distance-based simplification
|
||||
function simplifyRadialDistance(points, sqTolerance) {
|
||||
console.log("use simplifyRadialDis");
|
||||
|
||||
var prevPoint = points[0],
|
||||
newPoints = [prevPoint],
|
||||
point;
|
||||
|
||||
for (var i = 1, len = points.length; i < len; i++) {
|
||||
point = points[i];
|
||||
|
||||
if (getSquareDistance(point, prevPoint) > sqTolerance) {
|
||||
newPoints.push(point);
|
||||
prevPoint = point;
|
||||
}
|
||||
}
|
||||
|
||||
if (prevPoint !== point) {
|
||||
newPoints.push(point);
|
||||
}
|
||||
|
||||
console.log("simplifyRadialDis -> lenght= " + newPoints.length);
|
||||
|
||||
return newPoints;
|
||||
}
|
||||
|
||||
// simplification using optimized Douglas-Peucker algorithm with recursion elimination
|
||||
function simplifyDouglasPeucker(points, sqTolerance) {
|
||||
|
||||
var len = points.length,
|
||||
MarkerArray = typeof Uint8Array !== 'undefined' ? Uint8Array : Array,
|
||||
markers = new MarkerArray(len),
|
||||
|
||||
first = 0,
|
||||
last = len - 1,
|
||||
|
||||
stack = [],
|
||||
newPoints = [],
|
||||
|
||||
i, maxSqDist, sqDist, index;
|
||||
|
||||
markers[first] = markers[last] = 1;
|
||||
|
||||
while (last) {
|
||||
|
||||
maxSqDist = 0;
|
||||
|
||||
for (i = first + 1; i < last; i++) {
|
||||
sqDist = getSquareSegmentDistance(points[i], points[first], points[last]);
|
||||
|
||||
if (sqDist > maxSqDist) {
|
||||
index = i;
|
||||
maxSqDist = sqDist;
|
||||
}
|
||||
}
|
||||
|
||||
if (maxSqDist > sqTolerance) {
|
||||
markers[index] = 1;
|
||||
stack.push(first, index, index, last);
|
||||
}
|
||||
|
||||
last = stack.pop();
|
||||
first = stack.pop();
|
||||
}
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
if (markers[i]) {
|
||||
newPoints.push(points[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return newPoints;
|
||||
}
|
||||
|
||||
// both algorithms combined for awesome performance
|
||||
function simplify(points, tolerance, highestQuality) {
|
||||
|
||||
var sqTolerance = tolerance !== undefined ? tolerance * tolerance : 1;
|
||||
|
||||
points = highestQuality ? points : simplifyRadialDistance(points, sqTolerance);
|
||||
points = simplifyDouglasPeucker(points, sqTolerance);
|
||||
|
||||
return points;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************************/
|
||||
|
||||
|
||||
|
||||
Executable
+91
@@ -0,0 +1,91 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
rm -v /shd/CTC/LOG/ctc_bcu_1.log*
|
||||
|
||||
|
||||
|
||||
# Since 05-03-2024:
|
||||
BLDGS="A1 A2 A3 A4"
|
||||
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
BLDG_STR="";
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
BLDG_STR="${BLDG_STR} ${BLDG}*"
|
||||
done
|
||||
echo " copy and paste template: zip bldgs_2021-XX-XX_rev5000.XXXXX.zip import_baX.csv $BLDG_STR"
|
||||
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
#echo " work on item: '$BLDG'"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build-3dws/bin/BuildingControlTestVwmXml /opt/BuildingModels/StaticMeshes/${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/${BLDG}.flt.VWM_Building.xml
|
||||
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo "------------------------------------";
|
||||
echo " failure on -> '$BLDG' ";
|
||||
echo " kate /opt/BuildingModels/StaticMeshes/${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/${BLDG}.flt.VWM_Building.xml &"
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
echo "grep for '$BLDG':";
|
||||
grep -E "WARN|ERROR|FATAL" /shd/CTC/LOG/ctc_bcu_1.log* | grep $BLDG
|
||||
|
||||
|
||||
done
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
|
||||
# kate /shd/CTC/TOOLS/TDS/TDS-build/bin/log4cxx_bcu.props &
|
||||
# kate /shd/CTC/LOG/ctc_bcu_1.log &
|
||||
|
||||
# False positive:
|
||||
### A1
|
||||
###
|
||||
# Building 'A1' -> Hit on center point for room 2107 will not hit building - maybe according outterWalls (#=10) are vertical? - position: (-18.3005,8.6,7.55), bsm direction: (0,0,1), (hitPos=state = HitPosition::State::NoHit, roomId = 0, outerWallIdx = -1, exclusionZoneIdx = -1, distance = 100000) (Buildings/BuildingControlUnit/VWM/test_vwm_xml.cpp:441)
|
||||
# ---> Ursache: 4 Innentreppen in 2107 2116 2202 2206
|
||||
|
||||
|
||||
### A2
|
||||
###
|
||||
# Wall with fewer than 3 points - modelling error!
|
||||
# ---> Ursache: roomId: 2202, wallIdx = 2, wElementIdx = 0
|
||||
# ---> Ursache: roomId: 2203, wallIdx = 4, wElementIdx = 0
|
||||
# ---> Das sind die 10 schmalen Seitenwände der Pfeiler
|
||||
|
||||
# Building 'A2' -> Hit on center point for room 2104 will not hit building - maybe according outterWalls (#=6) are vertical? - position: (-7.1,8.502,7.55), bsm direction: (0,0,1), (hitPos=state = HitPosition::State::NoHit, roomId = 0, outerWallIdx = -1, exclusionZoneIdx = -1, distance = 100000) (Buildings/BuildingControlUnit/VWM/test_vwm_xml.cpp:441)
|
||||
#Building 'A2' -> Hit on center point for room 2203 will not hit building - maybe according outterWalls (#=6) are vertical? - position: (-7.1,8.552,7.55), bsm direction: (0,0,1), (hitPos=state = HitPosition::State::NoHit, roomId = 0, outerWallIdx = -1, exclusionZoneIdx = -1, distance = 100000) (Buildings/BuildingControlUnit/VWM/test_vwm_xml.cpp:441)
|
||||
# ---> Ursache: Innentreppe in 2104 2203
|
||||
|
||||
|
||||
### A3
|
||||
###
|
||||
# Building 'A3' -> Hit on center point for room 2103 will not hit building - maybe according outterWalls (#=7) are vertical? - position: (20.1505,14.45,7.55), bsm direction: (0,0,1), (hitPos=state = HitPosition::State::NoHit, roomId = 0, outerWallIdx = -1, exclusionZoneIdx = -1, distance = 100000) (ntrolUnit/VWM/test_vwm_xml.cpp:441)
|
||||
# ---> Ursache: Innentreppe in 2103
|
||||
|
||||
|
||||
|
||||
### A4
|
||||
###
|
||||
# Building 'A4' -> Hit on center point for room 2103 will not hit building - maybe according outterWalls (#=7) are vertical? - position: (18.1505,16.451,7.552), bsm direction: (0,0,1), (hitPos=state = HitPosition::State::NoHit, roomId = 0, outerWallIdx = -1, exclusionZoneIdx = -1, distance = 100000) (ntrolUnit/VWM/test_vwm_xml.cpp:441)
|
||||
# ---> Ursache: Innentreppe in 2102, 2108, 2203, 2205
|
||||
|
||||
|
||||
Executable
+37
@@ -0,0 +1,37 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
BLDGS="1111 1112 1113 1118 1119 1120 1121 1122 1123 1124 1125 1128 1130 1132 1134 1136 1138 1140 1142 1163"
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
echo "Bldg: '$BLDG':";
|
||||
|
||||
MyFile=`find /opt/BuildingModels/StaticMeshes -iname "bldg_${BLDG}.flt.VWM_Building.xml"`
|
||||
grep -E "OuterWallProtectiveFactor|ExclusionZoneProtectiveFactor" $MyFile | sort -u | grep -vE "usionZoneProtectiveFactor>0<|usionZoneProtectiveFactor>20|WallProtectiveFactor>200"
|
||||
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
echo "'$BLDG' okay";
|
||||
else
|
||||
echo " failure on -> '$BLDG' ";
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
Executable
+37
@@ -0,0 +1,37 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
BLDGS="1127 1129 1131 1133 1135 1137 1139 1141 1143 1144 1145 1146 1147 1153 1158 1167"
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
echo "Bldg: '$BLDG':";
|
||||
|
||||
MyFile=`find /opt/BuildingModels/StaticMeshes -iname "bldg_${BLDG}.flt.VWM_Building.xml"`
|
||||
grep -E "OuterWallProtectiveFactor|ExclusionZoneProtectiveFactor" $MyFile | sort -u | grep -vE "usionZoneProtectiveFactor>0<|usionZoneProtectiveFactor>20|WallProtectiveFactor>200"
|
||||
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
echo "'$BLDG' okay";
|
||||
else
|
||||
echo " failure on -> '$BLDG' ";
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
Executable
+37
@@ -0,0 +1,37 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
BLDGS="1155 1159 1160 1161 1162 1164 1166 1168 1170 1172 1173"
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
echo "Bldg: '$BLDG':";
|
||||
|
||||
MyFile=`find /opt/BuildingModels/StaticMeshes -iname "bldg_${BLDG}.flt.VWM_Building.xml"`
|
||||
grep -E "OuterWallProtectiveFactor|ExclusionZoneProtectiveFactor" $MyFile | sort -u | grep -vE "usionZoneProtectiveFactor>0<|usionZoneProtectiveFactor>20|WallProtectiveFactor>200"
|
||||
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
echo "'$BLDG' okay";
|
||||
else
|
||||
echo " failure on -> '$BLDG' ";
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
Executable
+39
@@ -0,0 +1,39 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
# 10-11-2021
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
echo "Bldg: '$BLDG':";
|
||||
|
||||
MyFile=`find /opt/BuildingModels/StaticMeshes -iname "bldg_${BLDG}.flt.VWM_Building.xml"`
|
||||
grep -E "OuterWallProtectiveFactor|ExclusionZoneProtectiveFactor" $MyFile | sort -u | grep -vE "usionZoneProtectiveFactor>0<|usionZoneProtectiveFactor>20|WallProtectiveFactor>200"
|
||||
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
echo "'$BLDG' okay";
|
||||
else
|
||||
echo " failure on -> '$BLDG' ";
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
Executable
+41
@@ -0,0 +1,41 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
# 10-11-2021
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
echo "Bldg: '$BLDG':";
|
||||
|
||||
MyFile=`find /opt/BuildingModels/StaticMeshes -iname "bldg_${BLDG}.flt.VWM_Building.xml"`
|
||||
grep -E "OuterWallProtectiveFactor|ExclusionZoneProtectiveFactor" $MyFile | sort -u | grep -vE "usionZoneProtectiveFactor>0<|usionZoneProtectiveFactor>20|WallProtectiveFactor>200"
|
||||
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
echo "'$BLDG' okay";
|
||||
else
|
||||
echo " failure on -> '$BLDG' ";
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
Executable
+45
@@ -0,0 +1,45 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
# 10-11-2021
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
echo "Bldg: '$BLDG':";
|
||||
|
||||
MyFile=`find /opt/BuildingModels/StaticMeshes -iname "bldg_${BLDG}.flt.VWM_Building.xml"`
|
||||
grep -E "OuterWallProtectiveFactor|ExclusionZoneProtectiveFactor" $MyFile | sort -u | grep -vE "usionZoneProtectiveFactor>0<|usionZoneProtectiveFactor>20|WallProtectiveFactor>200"
|
||||
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
echo "'$BLDG' okay";
|
||||
else
|
||||
echo " failure on -> '$BLDG' ";
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
Executable
+49
@@ -0,0 +1,49 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
# 10-11-2021
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
# 19-11-2021
|
||||
# 2 Nachzuegler: 1197 1207
|
||||
BLDGS="1197 1207 1234 1238 1240 1244 1245 1246 1248 1249 1257 1258 1259"
|
||||
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
echo "Bldg: '$BLDG':";
|
||||
|
||||
MyFile=`find /opt/BuildingModels/StaticMeshes -iname "bldg_${BLDG}.flt.VWM_Building.xml"`
|
||||
grep -E "OuterWallProtectiveFactor|ExclusionZoneProtectiveFactor" $MyFile | sort -u | grep -vE "usionZoneProtectiveFactor>0<|usionZoneProtectiveFactor>20|WallProtectiveFactor>200"
|
||||
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
echo "'$BLDG' okay";
|
||||
else
|
||||
echo " failure on -> '$BLDG' ";
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
Executable
+52
@@ -0,0 +1,52 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
# 10-11-2021
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
# 19-11-2021
|
||||
# 2 Nachzuegler: 1197 1207
|
||||
BLDGS="1197 1207 1234 1238 1240 1244 1245 1246 1248 1249 1257 1258 1259"
|
||||
|
||||
# 24-11-2021
|
||||
BLDGS="1165 1208 1209 1212 1236 1253 1260 1261 1262 1265 3103"
|
||||
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
echo "Bldg: '$BLDG':";
|
||||
|
||||
MyFile=`find /opt/BuildingModels/StaticMeshes -iname "bldg_${BLDG}.flt.VWM_Building.xml"`
|
||||
grep -E "OuterWallProtectiveFactor|ExclusionZoneProtectiveFactor" $MyFile | sort -u | grep -vE "usionZoneProtectiveFactor>0<|usionZoneProtectiveFactor>20|WallProtectiveFactor>200"
|
||||
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
echo "'$BLDG' okay";
|
||||
else
|
||||
echo " failure on -> '$BLDG' ";
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
Executable
+55
@@ -0,0 +1,55 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
# 10-11-2021
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
# 19-11-2021
|
||||
# 2 Nachzuegler: 1197 1207
|
||||
BLDGS="1197 1207 1234 1238 1240 1244 1245 1246 1248 1249 1257 1258 1259"
|
||||
|
||||
# 24-11-2021
|
||||
BLDGS="1165 1208 1209 1212 1236 1253 1260 1261 1262 1265 3103"
|
||||
|
||||
# 26-11-2101
|
||||
BLDGS="1253 1254 1255 1269 1270 1271 1273 1274 1276 1277 1278 1279 1280 1283 3104 3105 3106 3107"
|
||||
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
echo "Bldg: '$BLDG':";
|
||||
|
||||
MyFile=`find /opt/BuildingModels/StaticMeshes -iname "bldg_${BLDG}.flt.VWM_Building.xml"`
|
||||
grep -E "OuterWallProtectiveFactor|ExclusionZoneProtectiveFactor" $MyFile | sort -u | grep -vE "usionZoneProtectiveFactor>0<|usionZoneProtectiveFactor>20|WallProtectiveFactor>200"
|
||||
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
echo "'$BLDG' okay";
|
||||
else
|
||||
echo " failure on -> '$BLDG' ";
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
Executable
+58
@@ -0,0 +1,58 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
# 10-11-2021
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
# 19-11-2021
|
||||
# 2 Nachzuegler: 1197 1207
|
||||
BLDGS="1197 1207 1234 1238 1240 1244 1245 1246 1248 1249 1257 1258 1259"
|
||||
|
||||
# 24-11-2021
|
||||
BLDGS="1165 1208 1209 1212 1236 1253 1260 1261 1262 1265 3103"
|
||||
|
||||
# 26-11-2101
|
||||
BLDGS="1253 1254 1255 1269 1270 1271 1273 1274 1276 1277 1278 1279 1280 1283 3104 3105 3106 3107"
|
||||
|
||||
# 01-12-2021
|
||||
BLDGS="1256 1268 1275 1281 1282 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3121 3122"
|
||||
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
echo "Bldg: '$BLDG':";
|
||||
|
||||
MyFile=`find /opt/BuildingModels/StaticMeshes -iname "bldg_${BLDG}.flt.VWM_Building.xml"`
|
||||
grep -E "OuterWallProtectiveFactor|ExclusionZoneProtectiveFactor" $MyFile | sort -u | grep -vE "usionZoneProtectiveFactor>0<|usionZoneProtectiveFactor>20|WallProtectiveFactor>200"
|
||||
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
echo "'$BLDG' okay";
|
||||
else
|
||||
echo " failure on -> '$BLDG' ";
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
Executable
+61
@@ -0,0 +1,61 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
# 10-11-2021
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
# 19-11-2021
|
||||
# 2 Nachzuegler: 1197 1207
|
||||
BLDGS="1197 1207 1234 1238 1240 1244 1245 1246 1248 1249 1257 1258 1259"
|
||||
|
||||
# 24-11-2021
|
||||
BLDGS="1165 1208 1209 1212 1236 1253 1260 1261 1262 1265 3103"
|
||||
|
||||
# 26-11-2101
|
||||
BLDGS="1253 1254 1255 1269 1270 1271 1273 1274 1276 1277 1278 1279 1280 1283 3104 3105 3106 3107"
|
||||
|
||||
# 01-12-2021
|
||||
BLDGS="1256 1268 1275 1281 1282 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3121 3122"
|
||||
|
||||
# 03-12-2021
|
||||
# cat import_baX_2021-12-03.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
BLDGS="1251 1264 3220 3222 3224 3226 3228 3229 3266"
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
echo "Bldg: '$BLDG':";
|
||||
|
||||
MyFile=`find /opt/BuildingModels/StaticMeshes -iname "bldg_${BLDG}.flt.VWM_Building.xml"`
|
||||
grep -E "OuterWallProtectiveFactor|ExclusionZoneProtectiveFactor" $MyFile | sort -u | grep -vE "usionZoneProtectiveFactor>0<|usionZoneProtectiveFactor>20|WallProtectiveFactor>200"
|
||||
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
echo "'$BLDG' okay";
|
||||
else
|
||||
echo " failure on -> '$BLDG' ";
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
Executable
+71
@@ -0,0 +1,71 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
# 10-11-2021
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
# 19-11-2021
|
||||
# 2 Nachzuegler: 1197 1207
|
||||
BLDGS="1197 1207 1234 1238 1240 1244 1245 1246 1248 1249 1257 1258 1259"
|
||||
|
||||
# 24-11-2021
|
||||
BLDGS="1165 1208 1209 1212 1236 1253 1260 1261 1262 1265 3103"
|
||||
|
||||
# 26-11-2101
|
||||
BLDGS="1253 1254 1255 1269 1270 1271 1273 1274 1276 1277 1278 1279 1280 1283 3104 3105 3106 3107"
|
||||
|
||||
# 01-12-2021
|
||||
BLDGS="1256 1268 1275 1281 1282 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3121 3122"
|
||||
|
||||
# 03-12-2021
|
||||
# cat import_baX_2021-12-03.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
BLDGS="1251 1264 3220 3222 3224 3226 3228 3229 3266"
|
||||
|
||||
# 08-12-2021
|
||||
BLDGS="3120 3123 3124 3129 3130 3131 3135 3230 3231 3232 3233 3241 3243 3260 3264 4106 4107 4111 4112 4117 4126 4127 4128 4129 4131 4132 4134 4140 4143 4145"
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
echo "Bldg: '$BLDG':";
|
||||
|
||||
MyFile=`find /opt/BuildingModels/StaticMeshes -iname "bldg_${BLDG}.flt.VWM_Building.xml"`
|
||||
grep -E "OuterWallProtectiveFactor|ExclusionZoneProtectiveFactor" $MyFile | sort -u | grep -vE "usionZoneProtectiveFactor>0<|usionZoneProtectiveFactor>20|WallProtectiveFactor>200"
|
||||
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo " failure on -> '$BLDG' ";
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
Executable
+75
@@ -0,0 +1,75 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
# 10-11-2021
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
# 19-11-2021
|
||||
# 2 Nachzuegler: 1197 1207
|
||||
BLDGS="1197 1207 1234 1238 1240 1244 1245 1246 1248 1249 1257 1258 1259"
|
||||
|
||||
# 24-11-2021
|
||||
BLDGS="1165 1208 1209 1212 1236 1253 1260 1261 1262 1265 3103"
|
||||
|
||||
# 26-11-2101
|
||||
BLDGS="1253 1254 1255 1269 1270 1271 1273 1274 1276 1277 1278 1279 1280 1283 3104 3105 3106 3107"
|
||||
|
||||
# 01-12-2021
|
||||
BLDGS="1256 1268 1275 1281 1282 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3121 3122"
|
||||
|
||||
# 03-12-2021
|
||||
# cat import_baX_2021-12-03.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
BLDGS="1251 1264 3220 3222 3224 3226 3228 3229 3266"
|
||||
|
||||
# 08-12-2021
|
||||
BLDGS="3120 3123 3124 3129 3130 3131 3135 3230 3231 3232 3233 3241 3243 3260 3264 4106 4107 4111 4112 4117 4126 4127 4128 4129 4131 4132 4134 4140 4143 4145"
|
||||
|
||||
# 10-12-2021
|
||||
BLDGS="3259 3262 3267 3269 3270 3272 3273 3275 3276 4116 4139 4144 4148 4149"
|
||||
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
echo "Bldg: '$BLDG':";
|
||||
|
||||
MyFile=`find /opt/BuildingModels/StaticMeshes -iname "bldg_${BLDG}.flt.VWM_Building.xml"`
|
||||
grep -E "OuterWallProtectiveFactor|ExclusionZoneProtectiveFactor" $MyFile | sort -u | grep -vE "usionZoneProtectiveFactor>0<|usionZoneProtectiveFactor>20|WallProtectiveFactor>200"
|
||||
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo " failure on -> '$BLDG' ";
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
Executable
+79
@@ -0,0 +1,79 @@
|
||||
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
# 10-11-2021
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
# 19-11-2021
|
||||
# 2 Nachzuegler: 1197 1207
|
||||
BLDGS="1197 1207 1234 1238 1240 1244 1245 1246 1248 1249 1257 1258 1259"
|
||||
|
||||
# 24-11-2021
|
||||
BLDGS="1165 1208 1209 1212 1236 1253 1260 1261 1262 1265 3103"
|
||||
|
||||
# 26-11-2101
|
||||
BLDGS="1253 1254 1255 1269 1270 1271 1273 1274 1276 1277 1278 1279 1280 1283 3104 3105 3106 3107"
|
||||
|
||||
# 01-12-2021
|
||||
BLDGS="1256 1268 1275 1281 1282 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3121 3122"
|
||||
|
||||
# 03-12-2021
|
||||
# cat import_baX_2021-12-03.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
BLDGS="1251 1264 3220 3222 3224 3226 3228 3229 3266"
|
||||
|
||||
# 08-12-2021
|
||||
BLDGS="3120 3123 3124 3129 3130 3131 3135 3230 3231 3232 3233 3241 3243 3260 3264 4106 4107 4111 4112 4117 4126 4127 4128 4129 4131 4132 4134 4140 4143 4145"
|
||||
|
||||
# 10-12-2021
|
||||
BLDGS="3259 3262 3267 3269 3270 3272 3273 3275 3276 4116 4139 4144 4148 4149"
|
||||
|
||||
# 15-12-2021
|
||||
BLDGS="3120 3123 3124 3129 3132 3136 3246 3248 3249 3256 3257 3258 3259 3260 3261 3263 3268 3278 3281 3282 3283 3284 3285 3287 3288 3289 3290 3291 3292 3293 3294 3295 4108 4113 4133 4141 4145 4146 4150 4151 4152 4153 4154 4156 4157 4158 4159 4160 4161 4162 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193"
|
||||
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
echo "Bldg: '$BLDG':";
|
||||
|
||||
MyFile=`find /opt/BuildingModels/StaticMeshes -iname "bldg_${BLDG}.flt.VWM_Building.xml"`
|
||||
grep -E "OuterWallProtectiveFactor|ExclusionZoneProtectiveFactor" $MyFile | sort -u | grep -vE "usionZoneProtectiveFactor>0<|usionZoneProtectiveFactor>20|WallProtectiveFactor>200"
|
||||
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo " failure on -> '$BLDG' ";
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
Executable
+81
@@ -0,0 +1,81 @@
|
||||
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
# 10-11-2021
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
# 19-11-2021
|
||||
# 2 Nachzuegler: 1197 1207
|
||||
BLDGS="1197 1207 1234 1238 1240 1244 1245 1246 1248 1249 1257 1258 1259"
|
||||
|
||||
# 24-11-2021
|
||||
BLDGS="1165 1208 1209 1212 1236 1253 1260 1261 1262 1265 3103"
|
||||
|
||||
# 26-11-2101
|
||||
BLDGS="1253 1254 1255 1269 1270 1271 1273 1274 1276 1277 1278 1279 1280 1283 3104 3105 3106 3107"
|
||||
|
||||
# 01-12-2021
|
||||
BLDGS="1256 1268 1275 1281 1282 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3121 3122"
|
||||
|
||||
# 03-12-2021
|
||||
# cat import_baX_2021-12-03.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
BLDGS="1251 1264 3220 3222 3224 3226 3228 3229 3266"
|
||||
|
||||
# 08-12-2021
|
||||
BLDGS="3120 3123 3124 3129 3130 3131 3135 3230 3231 3232 3233 3241 3243 3260 3264 4106 4107 4111 4112 4117 4126 4127 4128 4129 4131 4132 4134 4140 4143 4145"
|
||||
|
||||
# 10-12-2021
|
||||
BLDGS="3259 3262 3267 3269 3270 3272 3273 3275 3276 4116 4139 4144 4148 4149"
|
||||
|
||||
# 15-12-2021
|
||||
BLDGS="3120 3123 3124 3129 3132 3136 3246 3248 3249 3256 3257 3258 3259 3260 3261 3263 3268 3278 3281 3282 3283 3284 3285 3287 3288 3289 3290 3291 3292 3293 3294 3295 4108 4113 4133 4141 4145 4146 4150 4151 4152 4153 4154 4156 4157 4158 4159 4160 4161 4162 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193"
|
||||
|
||||
# 17-12-2021
|
||||
BLDGS="1205 1250 1272 3125 3126 3127 3128 3133 3134 3141_26 3141_27 3234 3235 3236 3237 3238 3239 3240 3244 3245 3247 3250 3251 3252 3253 3255 3265 3271 3274 3277 3296 3297 4104 4105 4109 4110 4114 4135 4136 4142 4163 4181 4182 4194 4196"
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
echo "Bldg: '$BLDG':";
|
||||
|
||||
MyFile=`find /opt/BuildingModels/StaticMeshes -iname "bldg_${BLDG}.flt.VWM_Building.xml"`
|
||||
grep -E "OuterWallProtectiveFactor|ExclusionZoneProtectiveFactor" $MyFile | sort -u | grep -vE "usionZoneProtectiveFactor>0<|usionZoneProtectiveFactor>20|WallProtectiveFactor>200"
|
||||
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo " failure on -> '$BLDG' ";
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
Executable
+84
@@ -0,0 +1,84 @@
|
||||
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
# 10-11-2021
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
# 19-11-2021
|
||||
# 2 Nachzuegler: 1197 1207
|
||||
BLDGS="1197 1207 1234 1238 1240 1244 1245 1246 1248 1249 1257 1258 1259"
|
||||
|
||||
# 24-11-2021
|
||||
BLDGS="1165 1208 1209 1212 1236 1253 1260 1261 1262 1265 3103"
|
||||
|
||||
# 26-11-2101
|
||||
BLDGS="1253 1254 1255 1269 1270 1271 1273 1274 1276 1277 1278 1279 1280 1283 3104 3105 3106 3107"
|
||||
|
||||
# 01-12-2021
|
||||
BLDGS="1256 1268 1275 1281 1282 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3121 3122"
|
||||
|
||||
# 03-12-2021
|
||||
# cat import_baX_2021-12-03.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
BLDGS="1251 1264 3220 3222 3224 3226 3228 3229 3266"
|
||||
|
||||
# 08-12-2021
|
||||
BLDGS="3120 3123 3124 3129 3130 3131 3135 3230 3231 3232 3233 3241 3243 3260 3264 4106 4107 4111 4112 4117 4126 4127 4128 4129 4131 4132 4134 4140 4143 4145"
|
||||
|
||||
# 10-12-2021
|
||||
BLDGS="3259 3262 3267 3269 3270 3272 3273 3275 3276 4116 4139 4144 4148 4149"
|
||||
|
||||
# 15-12-2021
|
||||
BLDGS="3120 3123 3124 3129 3132 3136 3246 3248 3249 3256 3257 3258 3259 3260 3261 3263 3268 3278 3281 3282 3283 3284 3285 3287 3288 3289 3290 3291 3292 3293 3294 3295 4108 4113 4133 4141 4145 4146 4150 4151 4152 4153 4154 4156 4157 4158 4159 4160 4161 4162 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193"
|
||||
|
||||
# 17-12-2021
|
||||
BLDGS="1205 1250 1272 3125 3126 3127 3128 3133 3134 3141_26 3141_27 3234 3235 3236 3237 3238 3239 3240 3244 3245 3247 3250 3251 3252 3253 3255 3265 3271 3274 3277 3296 3297 4104 4105 4109 4110 4114 4135 4136 4142 4163 4181 4182 4194 4196"
|
||||
|
||||
# 05-01-2022
|
||||
BLDGS="1148 1150 1151 1152 1154 1155 1156 1157 1169 1171 1214 1242 1247 1263 1284 3137 3138 3139 3140 3142 3143 3144 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161"
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
echo "Bldg: '$BLDG':";
|
||||
|
||||
MyFile=`find /opt/BuildingModels/StaticMeshes -iname "bldg_${BLDG}.flt.VWM_Building.xml"`
|
||||
grep -E "OuterWallProtectiveFactor|ExclusionZoneProtectiveFactor" $MyFile | sort -u | grep -vE "usionZoneProtectiveFactor>0<|usionZoneProtectiveFactor>20|WallProtectiveFactor>200"
|
||||
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo " failure on -> '$BLDG' ";
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
Executable
+88
@@ -0,0 +1,88 @@
|
||||
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
# 10-11-2021
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
# 19-11-2021
|
||||
# 2 Nachzuegler: 1197 1207
|
||||
BLDGS="1197 1207 1234 1238 1240 1244 1245 1246 1248 1249 1257 1258 1259"
|
||||
|
||||
# 24-11-2021
|
||||
BLDGS="1165 1208 1209 1212 1236 1253 1260 1261 1262 1265 3103"
|
||||
|
||||
# 26-11-2101
|
||||
BLDGS="1253 1254 1255 1269 1270 1271 1273 1274 1276 1277 1278 1279 1280 1283 3104 3105 3106 3107"
|
||||
|
||||
# 01-12-2021
|
||||
BLDGS="1256 1268 1275 1281 1282 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3121 3122"
|
||||
|
||||
# 03-12-2021
|
||||
# cat import_baX_2021-12-03.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
BLDGS="1251 1264 3220 3222 3224 3226 3228 3229 3266"
|
||||
|
||||
# 08-12-2021
|
||||
BLDGS="3120 3123 3124 3129 3130 3131 3135 3230 3231 3232 3233 3241 3243 3260 3264 4106 4107 4111 4112 4117 4126 4127 4128 4129 4131 4132 4134 4140 4143 4145"
|
||||
|
||||
# 10-12-2021
|
||||
BLDGS="3259 3262 3267 3269 3270 3272 3273 3275 3276 4116 4139 4144 4148 4149"
|
||||
|
||||
# 15-12-2021
|
||||
BLDGS="3120 3123 3124 3129 3132 3136 3246 3248 3249 3256 3257 3258 3259 3260 3261 3263 3268 3278 3281 3282 3283 3284 3285 3287 3288 3289 3290 3291 3292 3293 3294 3295 4108 4113 4133 4141 4145 4146 4150 4151 4152 4153 4154 4156 4157 4158 4159 4160 4161 4162 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193"
|
||||
|
||||
# 17-12-2021
|
||||
BLDGS="1205 1250 1272 3125 3126 3127 3128 3133 3134 3141_26 3141_27 3234 3235 3236 3237 3238 3239 3240 3244 3245 3247 3250 3251 3252 3253 3255 3265 3271 3274 3277 3296 3297 4104 4105 4109 4110 4114 4135 4136 4142 4163 4181 4182 4194 4196"
|
||||
|
||||
# 05-01-2022
|
||||
BLDGS="1148 1150 1151 1152 1154 1155 1156 1157 1169 1171 1214 1242 1247 1263 1284 3137 3138 3139 3140 3142 3143 3144 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161"
|
||||
|
||||
# 12-01-2022
|
||||
BLDGS="0910 2100 2101 2205 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3254 4115 4147 4155 4194"
|
||||
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
echo "Bldg: '$BLDG':";
|
||||
|
||||
MyFile=`find /opt/BuildingModels/StaticMeshes -iname "bldg_${BLDG}.flt.VWM_Building.xml"`
|
||||
grep -E "OuterWallProtectiveFactor|ExclusionZoneProtectiveFactor" $MyFile | sort -u | grep -vE "usionZoneProtectiveFactor>0<|usionZoneProtectiveFactor>20|WallProtectiveFactor>200"
|
||||
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo " failure on -> '$BLDG' ";
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
Executable
+91
@@ -0,0 +1,91 @@
|
||||
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
# 10-11-2021
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
# 19-11-2021
|
||||
# 2 Nachzuegler: 1197 1207
|
||||
BLDGS="1197 1207 1234 1238 1240 1244 1245 1246 1248 1249 1257 1258 1259"
|
||||
|
||||
# 24-11-2021
|
||||
BLDGS="1165 1208 1209 1212 1236 1253 1260 1261 1262 1265 3103"
|
||||
|
||||
# 26-11-2101
|
||||
BLDGS="1253 1254 1255 1269 1270 1271 1273 1274 1276 1277 1278 1279 1280 1283 3104 3105 3106 3107"
|
||||
|
||||
# 01-12-2021
|
||||
BLDGS="1256 1268 1275 1281 1282 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3121 3122"
|
||||
|
||||
# 03-12-2021
|
||||
# cat import_baX_2021-12-03.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
BLDGS="1251 1264 3220 3222 3224 3226 3228 3229 3266"
|
||||
|
||||
# 08-12-2021
|
||||
BLDGS="3120 3123 3124 3129 3130 3131 3135 3230 3231 3232 3233 3241 3243 3260 3264 4106 4107 4111 4112 4117 4126 4127 4128 4129 4131 4132 4134 4140 4143 4145"
|
||||
|
||||
# 10-12-2021
|
||||
BLDGS="3259 3262 3267 3269 3270 3272 3273 3275 3276 4116 4139 4144 4148 4149"
|
||||
|
||||
# 15-12-2021
|
||||
BLDGS="3120 3123 3124 3129 3132 3136 3246 3248 3249 3256 3257 3258 3259 3260 3261 3263 3268 3278 3281 3282 3283 3284 3285 3287 3288 3289 3290 3291 3292 3293 3294 3295 4108 4113 4133 4141 4145 4146 4150 4151 4152 4153 4154 4156 4157 4158 4159 4160 4161 4162 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193"
|
||||
|
||||
# 17-12-2021
|
||||
BLDGS="1205 1250 1272 3125 3126 3127 3128 3133 3134 3141_26 3141_27 3234 3235 3236 3237 3238 3239 3240 3244 3245 3247 3250 3251 3252 3253 3255 3265 3271 3274 3277 3296 3297 4104 4105 4109 4110 4114 4135 4136 4142 4163 4181 4182 4194 4196"
|
||||
|
||||
# 05-01-2022
|
||||
BLDGS="1148 1150 1151 1152 1154 1155 1156 1157 1169 1171 1214 1242 1247 1263 1284 3137 3138 3139 3140 3142 3143 3144 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161"
|
||||
|
||||
# 12-01-2022
|
||||
BLDGS="0910 2100 2101 2205 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3254 4115 4147 4155 4194"
|
||||
|
||||
# 14-01-2022
|
||||
BLDGS="2106 2107 2108 2109 2110 2112 2116 2117 2118 2121 2122 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3221 3223 3225 3286 3301 4103 4118 4119 4120 4121 4122 4123 4124 4130"
|
||||
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
echo "Bldg: '$BLDG':";
|
||||
|
||||
MyFile=`find /opt/BuildingModels/StaticMeshes -iname "bldg_${BLDG}.flt.VWM_Building.xml"`
|
||||
grep -E "OuterWallProtectiveFactor|ExclusionZoneProtectiveFactor" $MyFile | sort -u | grep -vE "usionZoneProtectiveFactor>0<|usionZoneProtectiveFactor>20|WallProtectiveFactor>200"
|
||||
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo " failure on -> '$BLDG' ";
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
@@ -0,0 +1,151 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Test application for VWM
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLSE, 2016-01-25
|
||||
*/
|
||||
|
||||
|
||||
#include <nglapplication/nglcoreapplication.h>
|
||||
#include <QDateTime>
|
||||
#include <QString>
|
||||
#include <QTimer>
|
||||
#include "vwm_api.h"
|
||||
#include "vwm_math.h"
|
||||
#include "test_read_xml.h"
|
||||
#include "bcu_xml_reader.h"
|
||||
#include <NGLLogger/NGLLoggerBootstrap.h>
|
||||
|
||||
|
||||
Test::Test()
|
||||
: m_api(new BuildingControlUnit::VWM::Api(this))
|
||||
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("BCU.VWM.Test"))
|
||||
{
|
||||
connect(m_api, &BuildingControlUnit::VWM::Api::hitResult,
|
||||
this, &Test::hitResult);
|
||||
QTimer::singleShot(0, this, &Test::test1);
|
||||
}
|
||||
|
||||
Test::~Test()
|
||||
{
|
||||
delete m_api;
|
||||
}
|
||||
|
||||
void Test::hitResult(const BuildingControlUnit::HitResult &result)
|
||||
{
|
||||
INFO_LOG(m_logger) << "Hit Result: sensorId = " << result.sensorId
|
||||
<< ", originatorId = " << result.originatorId
|
||||
<< ", chargeTypeId = " << result.chargeTypeId
|
||||
<< ", dmgPercentOld = " << result.damagePercentOld
|
||||
<< ", dmgPercentNew = " << result.damagePercentNew
|
||||
<< ", effectSoundId = " << result.effectSoundId
|
||||
<< ", effectTime = " << QDateTime::fromMSecsSinceEpoch(result.effectTimeMSec).toString(QStringLiteral("hh:mm:ss.zzz"))
|
||||
<< ", damageState = " << result.damageState
|
||||
<< ", #rooms = " << result.rooms.size();
|
||||
}
|
||||
|
||||
void Test::test1()
|
||||
{
|
||||
// Incoming hit: sensorId = 11003, originatorId = 1, originatorType = OriginatorType::DirectHit, chargeId = 1,
|
||||
// effectTimeMSec = 1486718229883, position = 2.084/-0.05/3.823, direction = 0/0/-1
|
||||
// Searching hit position for position 2.084/-0.05/3.823, direction 0/0/-1
|
||||
//m_api->onHitOptical(QDateTime::currentMSecsSinceEpoch(), 11001, 4711, 1, 0, 0);
|
||||
const auto bsmMap = m_api->bsmMap();
|
||||
for (const BuildingControlUnit::Bsm &bsm : bsmMap)
|
||||
{
|
||||
const auto rooms = m_api->building().rooms();
|
||||
|
||||
const auto hitPos = BuildingControlUnit::VWM::Math::checkBsmPosition(bsm.position, bsm.direction, rooms);
|
||||
if (hitPos.state != BuildingControlUnit::VWM::HitPosition::State::OuterWall)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Effect on bsm " << bsm.id << " does not hit building ! - position: "
|
||||
<< bsm.position << ", direction: " << bsm.direction;
|
||||
}
|
||||
else if (hitPos.distance < 0)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Effect on bsm " << bsm.id << " results in hit pos behind a wall ("
|
||||
<< hitPos.distance << "m) instead in front - BSM is not modelled in the correct place: "
|
||||
<< bsm.position << ", direction: " << bsm.direction << ", roomId which was hit: " << hitPos.roomId;
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "BSM with id " << bsm.id << " looks fine - room which will be hit: " << hitPos.roomId;
|
||||
}
|
||||
}
|
||||
|
||||
QTimer::singleShot(1000, this, &Test::test2);
|
||||
}
|
||||
// 9.19/5.1/2.83, p2 = 9.19/5.1/6.06, p3 = 9.19/9.05/6.06
|
||||
|
||||
void Test::test2()
|
||||
{
|
||||
m_api->onHitOpticalOC(QDateTime::currentMSecsSinceEpoch(), 2, 0, 7, BuildingControlUnit::DamageState::Destroyed);
|
||||
QTimer::singleShot(1000, this, &Test::test3);
|
||||
}
|
||||
|
||||
void Test::test3()
|
||||
{
|
||||
m_api->onHitOpticalOC(QDateTime::currentMSecsSinceEpoch(), 2, 1, 8, BuildingControlUnit::DamageState::NoDamage);
|
||||
QTimer::singleShot(1000, this, &Test::test4);
|
||||
}
|
||||
|
||||
void Test::test4()
|
||||
{
|
||||
m_api->onHitEcc(2, BuildingControlUnit::DamageState::Destroyed, QVector<int>());
|
||||
m_api->onHitEcc(2, BuildingControlUnit::DamageState::NoDamage, QVector<int>());
|
||||
QTimer::singleShot(1000, this, &Test::test5);
|
||||
}
|
||||
|
||||
void Test::test5()
|
||||
{
|
||||
m_api->onHitOptical(QDateTime::currentMSecsSinceEpoch(), 1, 4711, 5, 0, 0);
|
||||
QTimer::singleShot(1000, this, &Test::test6);
|
||||
}
|
||||
|
||||
void Test::test6()
|
||||
{
|
||||
// Todo: Correct ChargeTypeID!
|
||||
// outside
|
||||
m_api->onHitCes(QDateTime::currentMSecsSinceEpoch(), 112, 42, 55, 66, LtsUtils::QPoint3D(30,-30,0), {});
|
||||
// inside
|
||||
m_api->onHitCes(QDateTime::currentMSecsSinceEpoch(), 112, 42, 55, 66, LtsUtils::QPoint3D(2,2,0), QLatin1String(""));
|
||||
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
NGLCoreApplication app(argc, argv);
|
||||
app.createLogger("BCU", 1);
|
||||
|
||||
QString path = QCoreApplication::applicationDirPath();
|
||||
QString chargesConfig = path + QLatin1String("/bldg_7_charges.xml");
|
||||
QString vulConfig = path + QLatin1String("/bldg_7_vulnerability_model.xml");
|
||||
QString bldConfigFile = path + QLatin1String("/bldg_7_building_config.xml");
|
||||
|
||||
if (app.arguments().size() > 1)
|
||||
{
|
||||
// assume: /tmp/bldg_7
|
||||
path = app.arguments().at(1);
|
||||
chargesConfig = path + QLatin1String("_charges.xml");
|
||||
vulConfig = path + QLatin1String("_vulnerability_model.xml");
|
||||
bldConfigFile = path + QLatin1String("_building_config.xml");
|
||||
}
|
||||
|
||||
BuildingControlUnit::BuildingBsmConfig bsmConfig;
|
||||
BuildingControlUnit::BuildingEgcuConfig egcuConfig;
|
||||
if (!BuildingControlUnit::parseBuildingConfigXml(bldConfigFile, bsmConfig, egcuConfig))
|
||||
return 1;
|
||||
|
||||
Test *test = new Test;
|
||||
if (!test->m_api->init(chargesConfig, vulConfig, bsmConfig, true))
|
||||
{
|
||||
delete test;
|
||||
return 1;
|
||||
}
|
||||
app.exec();
|
||||
|
||||
delete test;
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Test application for VWM
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLSE, 2016-01-25
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
#include <NGLLogger/INGLLogger.h>
|
||||
#include "vwm_api.h"
|
||||
|
||||
class Test : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
Test();
|
||||
~Test();
|
||||
|
||||
BuildingControlUnit::VWM::Api *m_api;
|
||||
private Q_SLOTS:
|
||||
void hitResult(const BuildingControlUnit::HitResult &result);
|
||||
void test1();
|
||||
void test2();
|
||||
void test3();
|
||||
void test4();
|
||||
void test5();
|
||||
void test6();
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
@@ -0,0 +1,590 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Read VWM and building xml to check if BSM positions are correct
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLSE, 2016-01-25
|
||||
*/
|
||||
|
||||
#include "vwm_math.h"
|
||||
#include "vwm_xml_reader.h"
|
||||
#include "vwm_building_room_geometry.h"
|
||||
#include "vwm_api.h"
|
||||
|
||||
|
||||
#include <iostream>
|
||||
#include <nglapplication/nglcoreapplication.h>
|
||||
#include <NGLLogger/INGLLogger.h>
|
||||
|
||||
#include <bcu_xml_reader.h>
|
||||
|
||||
#include <QStringList>
|
||||
#include <QFile>
|
||||
#include <QPolygonF>
|
||||
#include <QDomDocument>
|
||||
#include <QDebug>
|
||||
|
||||
static QDomElement getChildElement(const QDomElement &parent, const QString &childTag, bool bThrow = true)
|
||||
{
|
||||
const QDomElement ret = parent.firstChildElement(childTag);
|
||||
if (ret.isNull() && bThrow)
|
||||
throw BuildingControlUnit::XmlReaderException(QStringLiteral("Invalid XML Structure - no '%1' tag").arg(childTag));
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int getInteger(const QDomElement &element, const QString &attribute)
|
||||
{
|
||||
bool bOk = true;
|
||||
const int ret = element.attribute(attribute).toInt(&bOk);
|
||||
if (!bOk)
|
||||
throw BuildingControlUnit::XmlReaderException(QStringLiteral("Can not find attribute %1 in xml element %2 (line %3:%4)")
|
||||
.arg(attribute, element.tagName()).arg(element.lineNumber()).arg(element.columnNumber()));
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline bool checkRange(double d)
|
||||
{
|
||||
return (fabs(d) < 10000000);
|
||||
}
|
||||
|
||||
static inline LtsUtils::QPoint3D positionFromElement(const QDomElement &elem)
|
||||
{
|
||||
bool bOkX, bOkY, bOkZ;
|
||||
auto ret (LtsUtils::QPoint3D(elem.attribute(QStringLiteral("X")).toDouble(&bOkX),
|
||||
elem.attribute(QStringLiteral("Y")).toDouble(&bOkY),
|
||||
elem.attribute(QStringLiteral("Z")).toDouble(&bOkZ)));
|
||||
if (!bOkX || !checkRange(ret.x()))
|
||||
throw BuildingControlUnit::XmlReaderException(QStringLiteral("invalid value for X: %1 (line %2:%3)")
|
||||
.arg(elem.attribute(QStringLiteral("X"))).arg(elem.lineNumber()).arg(elem.columnNumber()));
|
||||
if (!bOkY || !checkRange(ret.y()))
|
||||
throw BuildingControlUnit::XmlReaderException(QStringLiteral("invalid value for Y: %1 (line %2:%3)")
|
||||
.arg(elem.attribute(QStringLiteral("Y"))).arg(elem.lineNumber()).arg(elem.columnNumber()));
|
||||
if (!bOkZ || !checkRange(ret.z()))
|
||||
throw BuildingControlUnit::XmlReaderException(QStringLiteral("invalid value for Z: %1 (line %2:%3)")
|
||||
.arg(elem.attribute(QStringLiteral("Z"))).arg(elem.lineNumber()).arg(elem.columnNumber()));
|
||||
return ret;
|
||||
}
|
||||
|
||||
struct MyRoom
|
||||
{
|
||||
LtsUtils::QPoint3D bBoxMin;
|
||||
LtsUtils::QPoint3D bBoxMax;
|
||||
int id = 0;
|
||||
|
||||
LtsUtils::QPoint3D center() const
|
||||
{
|
||||
return (bBoxMin + bBoxMax) / 2;
|
||||
}
|
||||
double maxZ() const
|
||||
{
|
||||
return std::max(bBoxMax.z(), bBoxMin.z());
|
||||
}
|
||||
|
||||
double minZ() const
|
||||
{
|
||||
return std::min(bBoxMax.z(), bBoxMin.z());
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
static BuildingControlUnit::Bsm getRefMod(const QDomElement &extRef)
|
||||
{
|
||||
BuildingControlUnit::Bsm bsm;
|
||||
const QDomElement nameElement = getChildElement(extRef, QStringLiteral("Name"), false);
|
||||
if (!nameElement.text().startsWith(QLatin1String("REF_MOD_AP_"), Qt::CaseInsensitive))
|
||||
return bsm;
|
||||
|
||||
bsm.id = getInteger(getChildElement(extRef, QStringLiteral("SubId")), QStringLiteral("ID"));
|
||||
bsm.position = positionFromElement(getChildElement(extRef, QStringLiteral("Coord")));
|
||||
bsm.direction = positionFromElement(getChildElement(extRef, QStringLiteral("Dir"))); // xyz=hpr?
|
||||
|
||||
return bsm;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
static inline T positionFromElement(const QDomElement &elem)
|
||||
{
|
||||
return T(elem.attribute(QStringLiteral("X")).toDouble(),
|
||||
elem.attribute(QStringLiteral("Y")).toDouble(),
|
||||
elem.attribute(QStringLiteral("Z")).toDouble());
|
||||
}
|
||||
|
||||
static void parseRooms(const QDomElement &domGroup,
|
||||
BuildingControlUnit::BuildingBsmConfig &bsmConfig,
|
||||
QMap<int, MyRoom> &rooms)
|
||||
{
|
||||
MyRoom room;
|
||||
QDomElement domGroup1 = getChildElement(domGroup, QStringLiteral("Group"));
|
||||
for ( ; !domGroup1.isNull(); domGroup1 = domGroup1.nextSiblingElement(domGroup1.tagName()))
|
||||
{
|
||||
const QDomElement nameElement = getChildElement(domGroup1, QStringLiteral("Name"), false);
|
||||
if (!nameElement.text().startsWith(QLatin1String("floor_"), Qt::CaseInsensitive))
|
||||
continue;
|
||||
QDomElement domSwitch = getChildElement(domGroup1, QStringLiteral("Switch"), false);
|
||||
for ( ; !domSwitch.isNull(); domSwitch = domSwitch.nextSiblingElement(domSwitch.tagName()))
|
||||
{
|
||||
const QDomElement roomNameElement = getChildElement(domSwitch, QStringLiteral("Name"), false);
|
||||
if (!roomNameElement.text().startsWith(QLatin1String("SW_room_"), Qt::CaseInsensitive))
|
||||
continue;
|
||||
room.id = getInteger(getChildElement(domSwitch, QStringLiteral("SubId")), QStringLiteral("ID"));
|
||||
|
||||
QDomElement domGroup2 = getChildElement(domSwitch, QStringLiteral("Group"), false);
|
||||
for ( ; !domGroup2.isNull(); domGroup2 = domGroup2.nextSiblingElement(domGroup2.tagName()))
|
||||
{
|
||||
const QDomElement domBBMin = getChildElement(domGroup2, QStringLiteral("BBox_Min"));
|
||||
const QDomElement domBBMax = getChildElement(domGroup2, QStringLiteral("BBox_Max"));
|
||||
room.bBoxMin = positionFromElement(domBBMin);
|
||||
room.bBoxMax = positionFromElement(domBBMax);
|
||||
rooms[room.id] = room;
|
||||
|
||||
QDomElement extRef = getChildElement(domGroup2, QStringLiteral("External_Reference"), false);
|
||||
for ( ; !extRef.isNull(); extRef = extRef.nextSiblingElement(extRef.tagName()))
|
||||
{
|
||||
const BuildingControlUnit::Bsm bsm = getRefMod(extRef);
|
||||
if (bsm.id)
|
||||
bsmConfig.bsmMap.insert(bsm.id, bsm);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static bool parseFlt(NGL::INGLLogger &logger, const QString &fn,
|
||||
BuildingControlUnit::BuildingBsmConfig &bsmConfig,
|
||||
BuildingControlUnit::BuildingBsmConfig &bsmConfigOhneRaumbezug,
|
||||
QMap<int, MyRoom> &rooms,
|
||||
std::vector<LtsUtils::QPoint3D> &footprint_ref)
|
||||
{
|
||||
const QDomElement domRoot = BuildingControlUnit::readFile(fn, QStringLiteral("STREIF"));
|
||||
if (domRoot.isNull())
|
||||
{
|
||||
WARNING_LOG(logger) << "domRoot isNull";
|
||||
return false;
|
||||
}
|
||||
try
|
||||
{
|
||||
// main part
|
||||
const QDomElement domHdr = domRoot.firstChildElement(QStringLiteral("Header"));
|
||||
const QDomElement domGroup = domHdr.firstChildElement(QStringLiteral("Group"));
|
||||
QDomElement extRef = getChildElement(domGroup, QStringLiteral("External_Reference"));
|
||||
for ( ; !extRef.isNull(); extRef = extRef.nextSiblingElement(extRef.tagName()))
|
||||
{
|
||||
const BuildingControlUnit::Bsm bsm = getRefMod(extRef);
|
||||
if (bsm.id)
|
||||
bsmConfig.bsmMap.insert(bsm.id, bsm);
|
||||
}
|
||||
bsmConfigOhneRaumbezug = bsmConfig;
|
||||
|
||||
parseRooms(domGroup, bsmConfig, rooms);
|
||||
|
||||
// bldg-footprint
|
||||
{
|
||||
const QDomElement domHdrFootprint = domRoot.firstChildElement(QStringLiteral("Header"));
|
||||
const QDomElement domGroupFootprint = domHdrFootprint.firstChildElement(QStringLiteral("Group"));
|
||||
QDomElement groupElem = domGroupFootprint.firstChildElement(QStringLiteral("Group"));
|
||||
|
||||
footprint_ref.clear();
|
||||
for (; !groupElem.isNull(); groupElem = groupElem.nextSiblingElement(groupElem.tagName()))
|
||||
{
|
||||
const QDomElement nameElement = getChildElement(groupElem, QStringLiteral("Name"), false);
|
||||
|
||||
if (!nameElement.text().startsWith(QLatin1String("FOOTPRINT"), Qt::CaseInsensitive))
|
||||
continue;
|
||||
|
||||
const QDomElement polygonElem = getChildElement(groupElem, QStringLiteral("Polygon"), false);
|
||||
if (polygonElem.isNull())
|
||||
continue;
|
||||
QDomElement vertexElem = polygonElem.firstChildElement(QStringLiteral("Vertex"));
|
||||
for (; !vertexElem.isNull(); vertexElem = vertexElem.nextSiblingElement(vertexElem.tagName()))
|
||||
{
|
||||
// TODO: xml hat keine Reihenfolge! Man kann es anhand der Namen sortieren
|
||||
const QDomElement coordElem = vertexElem.firstChildElement(QStringLiteral("Coord"));
|
||||
if (coordElem.isNull())
|
||||
continue;
|
||||
footprint_ref.emplace_back(positionFromElement(coordElem));
|
||||
}
|
||||
break;
|
||||
} // for
|
||||
}
|
||||
|
||||
}
|
||||
catch (const BuildingControlUnit::XmlReaderException &ex)
|
||||
{
|
||||
WARNING_LOG(logger) << ex.what();
|
||||
return false;
|
||||
}
|
||||
return !bsmConfig.bsmMap.isEmpty();
|
||||
}
|
||||
|
||||
/*
|
||||
* Folgende Probleme werder ermittlt:
|
||||
* VWM: doppelte Punkte in den Polygonen
|
||||
*
|
||||
* checkBsmPosition using rooms:
|
||||
* VWM:
|
||||
<< "Hit on center point for room " << myRoom.id << " will not hit building - no outterWalls"
|
||||
* Beschuss von oben auf den CenterPoint eines jeden Raumes
|
||||
* Hier machen die Aussentreppen Probleme (s.a. GUEZE-704)
|
||||
* Diese Probleme werden durch Vergleich mit dem Footprint mittlerweile erkannt
|
||||
* und nicht mehr als Fehler eingestuft.
|
||||
*
|
||||
* << "Hit on center point for room results in hit pos behind a wall ("
|
||||
* // hitPos.distance negative
|
||||
*
|
||||
* FLT:
|
||||
* checkBsmPosition using BSMs:
|
||||
* << "Effect on bsm " << bsm.id << " will not hit building ! - position: "
|
||||
*
|
||||
* << "Effect on bsm " << bsm.id << " results in hit pos behind a wall ("
|
||||
* BSM is not modelled in the correct place
|
||||
*/
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
NGLCoreApplication app(argc, argv);
|
||||
app.createLogger("BCU", 1);
|
||||
|
||||
// logcxx_bcu.props
|
||||
|
||||
if (app.arguments().size() != 3)
|
||||
{
|
||||
std::cerr << "Usage: " << app.arguments().constFirst().toStdString() << " <foo.flt.xml> <foo.vwm.xml>";
|
||||
return -1;
|
||||
}
|
||||
const QString flt = app.arguments().at(1);
|
||||
const QString vwm = app.arguments().at(2);
|
||||
|
||||
BuildingControlUnit::VWM::Building building;
|
||||
if (!BuildingControlUnit::VWM::XmlReader::readBuilding(vwm, building))
|
||||
{
|
||||
WARNING_LOG(app.baseLogger()) << "parsing failed for '" << flt;
|
||||
return 1;
|
||||
}
|
||||
|
||||
bool bAllOk = true;
|
||||
|
||||
INFO_LOG(app.baseLogger()) << "******** Building '" << building.name() << "' -> checkPolygons for duplicate...";
|
||||
int numberOfDuplicates = building.checkPolygons();
|
||||
if (numberOfDuplicates == 0)
|
||||
INFO_LOG(app.baseLogger()) << "Building '" << building.name() << "' -> " << "fine, no duplicates founds";
|
||||
else
|
||||
{
|
||||
WARNING_LOG(app.baseLogger()) << "Building '" << building.name() << "' -> first search: " << numberOfDuplicates << " duplicates found";
|
||||
bAllOk = false;
|
||||
}
|
||||
|
||||
// cleanup
|
||||
{
|
||||
int numberOfRemoved = building.cleanupPolygons();
|
||||
WARNING_LOG(app.baseLogger()) << "Building '" << building.name() << "' -> cleanupPolygons: " << numberOfRemoved << " removed";
|
||||
|
||||
int numberOfDuplicates2 = building.checkPolygons();
|
||||
WARNING_LOG(app.baseLogger()) << "Building '" << building.name() << "' -> second search: " << numberOfDuplicates2 << " duplicates found"
|
||||
<< " bAllOk=" << bAllOk;
|
||||
|
||||
bAllOk = true;
|
||||
}
|
||||
|
||||
BuildingControlUnit::BuildingBsmConfig bsmConfig;
|
||||
BuildingControlUnit::BuildingBsmConfig bsmConfigOhneRaumbezug;
|
||||
QMap<int, MyRoom> rooms;
|
||||
std::vector<LtsUtils::QPoint3D> footprint;
|
||||
|
||||
if (!parseFlt(app.baseLogger(), flt, bsmConfig, bsmConfigOhneRaumbezug, rooms, footprint) )
|
||||
{
|
||||
// Exception:
|
||||
// bldg_BN_Kanaele.flt.xml does not have REF_MOD / BSM
|
||||
// so parseFlt return false;
|
||||
|
||||
// Exception:
|
||||
// bldg_BN_Kanaele.flt.xml does not have REF_MOD / BSM
|
||||
if (flt.contains(QStringLiteral("bldg_BN_Kanaele"))
|
||||
|| flt.contains(QStringLiteral("bldg_0910"))
|
||||
|| flt.contains(QStringLiteral("bldg_2105"))
|
||||
|| flt.contains(QStringLiteral("bldg_2106"))
|
||||
|| flt.contains(QStringLiteral("bldg_2107"))
|
||||
|| flt.contains(QStringLiteral("bldg_2108"))
|
||||
|| flt.contains(QStringLiteral("bldg_2109"))
|
||||
|| flt.contains(QStringLiteral("bldg_2110"))
|
||||
|| flt.contains(QStringLiteral("bldg_2112"))
|
||||
|| flt.contains(QStringLiteral("bldg_2116"))
|
||||
|| flt.contains(QStringLiteral("bldg_2117"))
|
||||
|| flt.contains(QStringLiteral("bldg_2118"))
|
||||
|| flt.contains(QStringLiteral("bldg_2121"))
|
||||
|| flt.contains(QStringLiteral("bldg_2122"))
|
||||
)
|
||||
{
|
||||
// check rooms instead of bsmMap
|
||||
if (rooms.empty())
|
||||
{
|
||||
WARNING_LOG(app.baseLogger()) << "parsing failed for '" << flt
|
||||
<< " (" << rooms.size() << ")";
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
WARNING_LOG(app.baseLogger()) << "parsing failed for '" << flt
|
||||
<< " (" << rooms.size() << ")";
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
|
||||
// footprint des Bldgs:
|
||||
QPolygonF footprintPoly;
|
||||
footprintPoly.reserve(footprint.size());
|
||||
for (auto coord : qAsConst(footprint))
|
||||
footprintPoly << coord.toPointF();
|
||||
|
||||
double maxZ = 0;
|
||||
for(const MyRoom &room : qAsConst(rooms))
|
||||
{
|
||||
TRACE_LOG(app.baseLogger()) << "Room: " << room.id
|
||||
<< ", bboxMin: " << room.bBoxMin
|
||||
<< ", bboxMax: " << room.bBoxMax
|
||||
<< ", center: " << room.center()
|
||||
<< ", zMax: " << room.maxZ();
|
||||
maxZ = std::max(maxZ, room.maxZ());
|
||||
}
|
||||
|
||||
const QDomElement domRoot = BuildingControlUnit::readFile(flt, QStringLiteral("STREIF"));
|
||||
if (domRoot.isNull())
|
||||
{
|
||||
WARNING_LOG(app.baseLogger()) << "domRoot isNull";
|
||||
return 2;
|
||||
}
|
||||
|
||||
//#define USE_BUILDINGROOMGEOMETRY
|
||||
#ifdef USE_BUILDINGROOMGEOMETRY
|
||||
const QDomElement domHdr = domRoot.firstChildElement(QStringLiteral("Header"));
|
||||
const QDomElement &domGroup = domHdr.firstChildElement(QStringLiteral("Group"));
|
||||
|
||||
BuildingControlUnit::VWM::BuildingRoomGeometry buildingRoomGeometry;
|
||||
if (!buildingRoomGeometry.init(domGroup))
|
||||
{
|
||||
WARNING_LOG(app.baseLogger()) << " BuildingRoomGeometry failed for '" << flt;
|
||||
return -2;
|
||||
}
|
||||
#endif // USE_BUILDINGROOMGEOMETRY
|
||||
|
||||
|
||||
// Guez-Building 1114:
|
||||
// 2021-07-02 12:21:41.600 INFO BCU::VWM::Math |#| Searching nearest room for bsm position (6.023,-4.634,8.556), bsmViewDirection (0,0,1), hit direction (-0,-0,-1), #rooms = 11 (ies/Buildings/BuildingControlUnit/VWM/vwm_math.cpp:452)
|
||||
// 2021-07-02 12:21:41.600 INFO BCU::VWM::Math |#| HitPosition: 1, roomId = 2301, outerWallIndex = 11, exclusionZoneIndex = -1 (ies/Buildings/BuildingControlUnit/VWM/vwm_math.cpp:539)
|
||||
// 2021-07-02 12:21:41.600 WARN BCU::main |#| Building 'bldg_1114' -> Hit on center point for room results in hit pos behind a wall (-7.41573e-16m) instead in front - looks like the house is more than 8.556m high!?!?, (hitPos=state = HitPosition::State::OuterWall, roomId = 2301, outerWallIdx = 11, exclusionZoneIdx = -1, distance = -7.41573e-16 (Buildings/BuildingControlUnit/VWM/test_vwm_xml.cpp:217)
|
||||
|
||||
// 2021-12-17 13:50:42.658 WARN BCU::main |#| Building 'bldg_3127' -> Hit on center point for room results in hit pos behind a wall (-0.00194683m) instead in front - looks like the house is more than 8.681m high!?!?, (hitPos=state = HitPosition::State::OuterWall, roomId = 2401, outerWallIdx = 4, exclusionZoneIdx = -1, distance = -0.00194683 (Buildings/BuildingControlUnit/VWM/test_vwm_xml.cpp:408)
|
||||
// --> accept s small neg hitPos.distance: // if (hitPos.distance < -0.00001) //
|
||||
|
||||
INFO_LOG(app.baseLogger()) << "******** Building '" << building.name() << "' -> BSMs ohne Raumbezug " << "(maxZ=" << maxZ << ")" ;
|
||||
|
||||
if (bsmConfigOhneRaumbezug.bsmMap.isEmpty())
|
||||
{
|
||||
INFO_LOG(app.baseLogger()) << "Building '" << building.name() << "' -> no outdoor BSM";
|
||||
} else {
|
||||
WARNING_LOG(app.baseLogger()) << "Building '" << building.name() << "' -> has outdoor BSMs. Size=" << bsmConfigOhneRaumbezug.bsmMap.size();
|
||||
for (auto bsm : bsmConfigOhneRaumbezug.bsmMap)
|
||||
{
|
||||
WARNING_LOG(app.baseLogger()) << "Building '" << building.name() << "' -> has outdoor BSMs:"
|
||||
<< "bsm " << bsm.id << " ; position: " << bsm.position
|
||||
<< " ; bsm direction: " << bsm.direction;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
INFO_LOG(app.baseLogger()) << "******** Building '" << building.name() << "' -> checkBsmPosition using rooms";
|
||||
for(const MyRoom &myRoom : qAsConst(rooms))
|
||||
{
|
||||
const int roomIdToCheck = myRoom.id;
|
||||
LtsUtils::QPoint3D center = myRoom.center();
|
||||
center.setZ(maxZ);
|
||||
|
||||
// Bldg 1147, Raum 2203 (r 5075)
|
||||
// Maybe the BSM is on the edge of an triangle (wall/ceiling is modelled using 2 triangles)
|
||||
// |-----|
|
||||
// | / |
|
||||
// | / |
|
||||
// | / |
|
||||
// |/ |
|
||||
// |-----|
|
||||
//
|
||||
// Bldg 4127, Raum 101, 102, 201, 301: Hit is at the edge of the roof (y value)
|
||||
// Could be moved one millimeter to overcome that detection.
|
||||
// Since we simulate AWES here, it´s not realistic to hit the edge:
|
||||
center.rx() -= 0.1; // For bldg 1147, 3127
|
||||
center.ry() -= 0.2; // For bldg 4127, 3127
|
||||
|
||||
const LtsUtils::QPoint3D direction(0,0,1); // bsm dir -> looking upwards
|
||||
auto hitPos = BuildingControlUnit::VWM::Math::checkBsmPosition(center, direction, building.rooms());
|
||||
if (hitPos.state != BuildingControlUnit::VWM::HitPosition::State::OuterWall)
|
||||
{
|
||||
// find room at building to get number of OuterWalls:
|
||||
int numberOuterWalls = -1;
|
||||
const BuildingControlUnit::VWM::Room &room = building.room(roomIdToCheck);
|
||||
if (room.id() == roomIdToCheck)
|
||||
numberOuterWalls = room.outerWalls().size();
|
||||
|
||||
if (numberOuterWalls == 0)
|
||||
WARNING_LOG(app.baseLogger()) << "Building '" << building.name() << "' -> "
|
||||
<< "Hit on center point for room " << roomIdToCheck << " will not hit building - no outterWalls"
|
||||
<< " - position: " << center << ", bsm direction: " << direction
|
||||
<< ", (hitPos=" << hitPos << ")";
|
||||
else
|
||||
{
|
||||
// possible reasons: wall vertical | Aussentreppe
|
||||
|
||||
|
||||
const bool withinFootprint = footprintPoly.containsPoint(center.toPointF(), Qt::OddEvenFill);
|
||||
if ((footprintPoly.size() >= 4) && // valid
|
||||
withinFootprint)
|
||||
{
|
||||
// Aussentreppen haben oft keine Wände...
|
||||
WARNING_LOG(app.baseLogger()) << "Building '" << building.name() << "' -> "
|
||||
<< "Hit on center point for room " << roomIdToCheck << " will not hit building - "
|
||||
<< " maybe according outterWalls (#=" << numberOuterWalls << ") are vertical?"
|
||||
<< " - position: " << center << ", bsm direction: " << direction
|
||||
<< ", (hitPos=" << hitPos << ")";
|
||||
} else {
|
||||
// Aussentreppen liegen oft ausserhalb...
|
||||
WARNING_LOG(app.baseLogger()) << "Building '" << building.name() << "' -> "
|
||||
<< "Hit on center point for room " << roomIdToCheck << " will not hit building - "
|
||||
<< " it´s OUT OF FOOTPRINT"
|
||||
<< " - position: " << center << ", bsm direction: " << direction;
|
||||
bAllOk = false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Guez-Building 1114: (renoirRepo 4722)
|
||||
// 2021-07-02 12:21:41.600 INFO BCU::VWM::Math |#| Searching nearest room for bsm position (6.023,-4.634,8.556), bsmViewDirection (0,0,1), hit direction (-0,-0,-1), #rooms = 11 (ies/Buildings/BuildingControlUnit/VWM/vwm_math.cpp:452)
|
||||
// 2021-07-02 12:21:41.600 INFO BCU::VWM::Math |#| HitPosition: 1, roomId = 2301, outerWallIndex = 11, exclusionZoneIndex = -1 (ies/Buildings/BuildingControlUnit/VWM/vwm_math.cpp:539)
|
||||
// 2021-07-02 12:21:41.600 WARN BCU::main |#| Building 'bldg_1114' -> Hit on center point for room results in hit pos behind a wall (-7.41573e-16m) instead in front - looks like the house is more than 8.556m high!?!?, (hitPos=state = HitPosition::State::OuterWall, roomId = 2301, outerWallIdx = 11, exclusionZoneIdx = -1, distance = -7.41573e-16 (Buildings/BuildingControlUnit/VWM/test_vwm_xml.cpp:217)
|
||||
|
||||
// 2021-07-02 12:21:41.600 INFO BCU::VWM::Math |#| Searching nearest room for bsm position (6.023,-4.634,8.556), bsmViewDirection (0,0,1), hit direction (-0,-0,-1), #rooms = 11 (ies/Buildings/BuildingControlUnit/VWM/vwm_math.cpp:452)
|
||||
// 2021-07-02 12:21:41.601 INFO BCU::VWM::Math |#| HitPosition: 1, roomId = 2301, outerWallIndex = 11, exclusionZoneIndex = -1 (ies/Buildings/BuildingControlUnit/VWM/vwm_math.cpp:539)
|
||||
// 2021-07-02 12:21:41.601 WARN BCU::main |#| Building 'bldg_1114' -> Hit on center point for room results in hit pos behind a wall (-7.41573e-16m) instead in front - looks like the house is more than 8.556m high!?!?, (hitPos=state = HitPosition::State::OuterWall, roomId = 2301, outerWallIdx = 11, exclusionZoneIdx = -1, distance = -7.41573e-16 (Buildings/BuildingControlUnit/VWM/test_vwm_xml.cpp:217)
|
||||
// --> accept s small neg hitPos.distance: // if (hitPos.distance < -0.00001) //
|
||||
else if (hitPos.distance < -0.02)
|
||||
{
|
||||
WARNING_LOG(app.baseLogger()) << " Building '" << building.name() << "' -> "
|
||||
<< "Hit on center point for room results in hit pos behind a wall ("
|
||||
<< QString::number(hitPos.distance) << "m) instead in front - looks like the house is more than "
|
||||
<< center.z() << "m high!?!?"
|
||||
<< ", (hitPos=" << hitPos;
|
||||
bAllOk = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// set new Z to compare with room height of room which is hit
|
||||
center.setZ(rooms.value(hitPos.roomId).maxZ());
|
||||
// hit calc -> mirror direction
|
||||
hitPos = BuildingControlUnit::VWM::Math::getHitPosition(center, direction * -1, building.rooms());
|
||||
INFO_LOG(app.baseLogger()) << " Building '" << building.name() << "' -> "
|
||||
<< "Hit on center point for room " << myRoom.id << " looks fine - room which will be hit: " << hitPos.roomId
|
||||
<< ", " << QString::number(hitPos.distance) << "m away from outer wall"
|
||||
<< ((hitPos.distance < 1) ? "" : " - to far away from ceiling!");
|
||||
}
|
||||
} // for all rooms
|
||||
|
||||
|
||||
INFO_LOG(app.baseLogger()) << "******** Building '" << building.name() << "' -> checkBsmPosition using BSMs";
|
||||
for (const BuildingControlUnit::Bsm &bsm : qAsConst(bsmConfig.bsmMap))
|
||||
{
|
||||
const auto hitPos = BuildingControlUnit::VWM::Math::checkBsmPosition(bsm.position, bsm.direction, building.rooms());
|
||||
if (hitPos.state != BuildingControlUnit::VWM::HitPosition::State::OuterWall)
|
||||
{
|
||||
WARNING_LOG(app.baseLogger()) << "Building '" << building.name() << "' -> "
|
||||
<< "Effect on bsm " << bsm.id << " will not hit building ! - position: "
|
||||
<< bsm.position << ", bsm direction: " << bsm.direction << ", state: " << hitPos.state;
|
||||
bAllOk = false;
|
||||
}
|
||||
else if (hitPos.distance < -0.02)
|
||||
{
|
||||
WARNING_LOG(app.baseLogger()) << "Building '" << building.name() << "' -> "
|
||||
<< "Effect on bsm " << bsm.id << " results in hit pos behind a wall ("
|
||||
<< QString::number(hitPos.distance) << "m) instead in front - BSM is not modelled in the correct place: "
|
||||
<< bsm.position << ", bsm direction: " << bsm.direction << ", roomId which was hit: " << hitPos.roomId;
|
||||
bAllOk = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
INFO_LOG(app.baseLogger()) << "Building '" << building.name() << "' -> "
|
||||
<< "BSM with id " << bsm.id << " looks fine - room which will be hit: " << hitPos.roomId
|
||||
<< ", " << QString::number(hitPos.distance) << "m away from outer wall";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#ifdef USE_BUILDINGROOMGEOMETRY
|
||||
|
||||
int counterOk = 0;
|
||||
int counterZero = 0;
|
||||
int counterToMuch = 0;
|
||||
|
||||
INFO_LOG(app.baseLogger()) << "******** Building '" << building.name() << "' -> pointIsInWhichRooms using rooms";
|
||||
|
||||
int heightZOffset = 2;
|
||||
for (int heightZ = 1; heightZ<maxZ; )
|
||||
{
|
||||
|
||||
INFO_LOG(app.baseLogger()) << "**** Building '" << building.name() << "' heightZ = " << heightZ;
|
||||
|
||||
for(const MyRoom &myRoom : qAsConst(rooms))
|
||||
{
|
||||
const int roomIdToCheck = myRoom.id;
|
||||
LtsUtils::QPoint3D center = myRoom.center(); // myRoom.center(); is z-aware
|
||||
|
||||
LtsUtils::QPoint3D delayedDetonationLocation = center; // center of current room
|
||||
// withinFootprint (Aussentreppen sind ausserhalb)
|
||||
const bool withinFootprint = footprintPoly.containsPoint(delayedDetonationLocation.toPointF(), Qt::OddEvenFill);
|
||||
if ((footprintPoly.size() >= 4) && // valid
|
||||
withinFootprint)
|
||||
{
|
||||
// search for delayedDetonationLocation
|
||||
QVector<int> roomsWithDetonation = buildingRoomGeometry.pointIsInWhichRooms(delayedDetonationLocation);
|
||||
|
||||
if (roomsWithDetonation.isEmpty())
|
||||
++counterZero;
|
||||
else if (roomsWithDetonation.size()==1)
|
||||
++counterOk;
|
||||
else
|
||||
++counterToMuch;
|
||||
|
||||
if (roomsWithDetonation.size() == 1)
|
||||
{
|
||||
INFO_LOG(app.baseLogger()) << " Building / pointIsInWhichRooms '" << building.name() << "' -> "
|
||||
<< ", roomIdToCheck = " << roomIdToCheck
|
||||
<< ", detoLoc = " << delayedDetonationLocation
|
||||
<< " fine, found just one room: " << roomsWithDetonation.first();
|
||||
} else {
|
||||
QString roomIdsStr(QStringLiteral("roomIds("));
|
||||
for (auto roomId : qAsConst(roomsWithDetonation))
|
||||
roomIdsStr.append(QString(QStringLiteral("%1 ")).arg(roomId));
|
||||
roomIdsStr.append(QStringLiteral(")"));
|
||||
|
||||
WARNING_LOG(app.baseLogger()) << " Building / pointIsInWhichRooms '" << building.name() << "'"
|
||||
<< ", roomIdToCheck = " << roomIdToCheck
|
||||
<< ", delayedDetonationLocation = " << delayedDetonationLocation
|
||||
<< " wrongSize roomsWithDetonation.size() != 1 , size=" << roomsWithDetonation.size()
|
||||
<< ", roomIds=" << roomIdsStr;
|
||||
bAllOk = false;
|
||||
|
||||
}
|
||||
}
|
||||
} // // for all rooms
|
||||
|
||||
heightZ += heightZOffset;
|
||||
} // for heightZ
|
||||
|
||||
INFO_LOG(app.baseLogger()) << "******** Building '" << building.name() << "' -> pointIsInWhichRooms using rooms RESULT"
|
||||
<< ", counterZero = " << counterZero
|
||||
<< ", counterOk = " << counterOk
|
||||
<< ", counterToMuch = " << counterToMuch
|
||||
<< ", percentOk = " << counterOk*100.0 / (counterZero+counterOk+counterToMuch);
|
||||
|
||||
#endif // USE_BUILDINGROOMGEOMETRY
|
||||
|
||||
return bAllOk ? 0 : 5;
|
||||
}
|
||||
+924
@@ -0,0 +1,924 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Api for VWM
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLSA, 2013-03-05
|
||||
*/
|
||||
|
||||
#include "vwm_api.h"
|
||||
#include "vwm_deposition.h"
|
||||
#include "vwm_xml_reader.h"
|
||||
#include "vwm_state_store.h"
|
||||
#include "vwm_math.h"
|
||||
#include <QDateTime>
|
||||
#include <settings.h>
|
||||
#include <QFile>
|
||||
#include <initializer_list>
|
||||
#ifdef LTS_DEBUG
|
||||
// For ShotResult.cvs
|
||||
# include <QTextStream>
|
||||
# include <sstream>
|
||||
#endif // LTS_DEBUG
|
||||
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonParseError>
|
||||
#include <QDebug>
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace VWM
|
||||
{
|
||||
Api::Api(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_lastHitResult(HitResult())
|
||||
, m_logger(BuildingControlUnit::getLogger("VWM.Api"))
|
||||
{}
|
||||
|
||||
bool Api::init(const QString &chargesConfig,
|
||||
const QString &vulBuildingConfig,
|
||||
const BuildingBsmConfig &bsmConfig,
|
||||
const bool initBuilding)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "chargesConfig=" << chargesConfig;
|
||||
if (!XmlReader::readCharges(chargesConfig, m_chargeMap))
|
||||
return false;
|
||||
if (!XmlReader::readBuilding(vulBuildingConfig, m_building))
|
||||
return false;
|
||||
|
||||
// Fake:
|
||||
QString fltXml = QString(QStringLiteral("/opt/BuildingModels/StaticMeshes/%1.flt.xml")).arg(m_building.name());
|
||||
if (!XmlReader::readBuildingGeometry(fltXml, m_buildingRoomGeometry ))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error reading buildingRoomGeometry from file: " << fltXml << "'";
|
||||
// return false;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "Building buildingRoomGeometry read successfully from file: " << fltXml << "'";
|
||||
|
||||
|
||||
|
||||
int numberOfRemoved = m_building.cleanupPolygons();
|
||||
int numberOfDuplicates = m_building.checkPolygons();
|
||||
DEBUG_LOG(m_logger) << "Building cleanupPolygons: " << m_building.name() << "' -> " << numberOfRemoved << " points removed";
|
||||
if (numberOfDuplicates > 0)
|
||||
ERROR_LOG(m_logger) << "Building checkPolygons: " << m_building.name() << "' -> " << numberOfDuplicates << " duplicates";
|
||||
else
|
||||
DEBUG_LOG(m_logger) << "Building checkPolygons: " << m_building.name() << "' -> " << numberOfDuplicates << " duplicates";
|
||||
|
||||
|
||||
m_bsmMap = bsmConfig.bsmMap;
|
||||
m_building.init();
|
||||
if (!initBuilding)
|
||||
StateStore::loadState(m_building, m_lastHitResult, m_contaminationStates);
|
||||
else
|
||||
StateStore::saveState(m_building, m_lastHitResult, m_contaminationStates);
|
||||
m_lastHitResult.rooms = m_building.roomStates();
|
||||
m_lastHitResult.damageState = m_building.damageState();
|
||||
m_lastHitResult.damagePercentNew = m_building.damagePercent();
|
||||
return true;
|
||||
}
|
||||
|
||||
void Api::onHitOptical(qint64 timeMSec, int sensorId, int originatorId, int chargeTypeId, int deposition1, int deposition2)
|
||||
{
|
||||
// Reale Position berechnen (Ablage)
|
||||
// 1. zugehöriges BSM suchen
|
||||
const Bsm bsm = m_bsmMap.value(sensorId);
|
||||
// 2. ist BSM gültig
|
||||
if (!bsm.isValid())
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Given bsm id " << sensorId << " is not in our internal bsm list!";
|
||||
return;
|
||||
}
|
||||
// 3. Ablage berechnen (wenn deposition1 != 0 || deposition2 != 0)
|
||||
const LtsUtils::QPoint3D depositionRel = getDeposition(deposition1, deposition2, bsm.direction);
|
||||
|
||||
Hit hit;
|
||||
hit.effectTimeMSec = timeMSec;
|
||||
hit.sensorId = sensorId;
|
||||
hit.originatorId = originatorId;
|
||||
hit.originatorType = OriginatorType::DirectHit;
|
||||
hit.chargeTypeId = chargeTypeId;
|
||||
hit.position = bsm.position + depositionRel;
|
||||
hit.direction = bsm.direction * -1; // bsm looks away from building
|
||||
|
||||
sendHitToVwm(hit);
|
||||
}
|
||||
|
||||
void Api::onSetEffectStatesRequest(const QString &hostname, const QVector<BcuEffectState> &effectStates)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "onSetEffectStatesRequest:"
|
||||
<< " hostname= " << hostname
|
||||
<< " effectStes.zize=" << effectStates.size();
|
||||
|
||||
QJsonObject overridesObj;
|
||||
|
||||
if (hostname.isEmpty())
|
||||
{
|
||||
for (const BcuEffectState &es : effectStates)
|
||||
{
|
||||
if (es.type == BcuEffectType::BET_BsmFlash)
|
||||
{
|
||||
if (es.effectOverride == BcuEffectOverride::BEO_Off)
|
||||
{
|
||||
overridesObj.insert(QStringLiteral("flash"), 0);
|
||||
DEBUG_LOG(m_logger) << "flash = 0";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
QJsonArray relayStateArray;
|
||||
for (const BcuEffectState &es : effectStates)
|
||||
{
|
||||
if (es.effectOverride == BcuEffectOverride::BEO_Auto)
|
||||
continue;
|
||||
|
||||
if (es.type == BcuEffectType::BET_Relay)
|
||||
{
|
||||
QJsonObject relayStateObj;
|
||||
relayStateObj[QString::number(es.id)]=es.effectOverride;
|
||||
DEBUG_LOG(m_logger) << "relay = " << QString::number(es.id)
|
||||
<< " " << es.effectOverride;
|
||||
relayStateArray.append(relayStateObj);
|
||||
}
|
||||
else if (es.type == BcuEffectType::BET_BackgroundSound)
|
||||
{
|
||||
overridesObj.insert(QStringLiteral("sound"), es.effectOverride);
|
||||
DEBUG_LOG(m_logger) << "sound=" << es.effectOverride;
|
||||
}
|
||||
}
|
||||
overridesObj.insert(QStringLiteral("relays"), relayStateArray);
|
||||
}
|
||||
|
||||
QJsonObject propertiesObj;
|
||||
propertiesObj[QStringLiteral("Overrides")] = overridesObj;
|
||||
|
||||
QString totalString = QString::fromLatin1(QJsonDocument(propertiesObj).toJson(QJsonDocument::Compact));
|
||||
DEBUG_LOG(m_logger) << "totalString=" << totalString;
|
||||
m_building.setSegmentProperties(hostname,totalString);
|
||||
StateStore::saveState(m_building, m_lastHitResult, m_contaminationStates);
|
||||
}
|
||||
|
||||
void Api::dumpHitResult(const Hit &hit, const HitResult &result, const Charge &chargeOrg, const Charge &charge, const QString &context)
|
||||
{
|
||||
// write ShotResult.cvs
|
||||
static QString filename = QString(QLatin1String("/tmp/ShotResult_%1_%2.csv")).arg(m_building.name()).arg(result.effectTimeMSec);
|
||||
QFile data(filename);
|
||||
if(data.open(QFile::WriteOnly | QIODevice::Append/* |QFile::Truncate*/ ))
|
||||
{
|
||||
QTextStream output(&data);
|
||||
|
||||
output << "EffectTime at," << QDateTime::fromMSecsSinceEpoch(result.effectTimeMSec).toString(QStringLiteral("yyyy.MM.dd hh:mm::ss")) << "\n";
|
||||
output << ",(" << result.effectTimeMSec << ")\n";
|
||||
|
||||
output << "Bldg-Name," << m_building.name() << "\n";
|
||||
|
||||
output << "Context," << context << "\n";
|
||||
|
||||
{
|
||||
std::ostringstream stream;
|
||||
stream << result.originatorType;
|
||||
output << "OriginatorType," << QString::fromStdString(stream.str()) << "\n";
|
||||
}
|
||||
|
||||
{ // some values, more or less 'const':
|
||||
output << " [BCU]minimumRemainEffectThreshold," << Settings::minimumRemainEffectThreshold() << "\n";
|
||||
output << " [BCU]transitionMultiplier," << Settings::transitionMultiplier() << "\n";
|
||||
output << " buildingProtectionLevel," << m_building.buildingProtectionLevel() << "\n";
|
||||
}
|
||||
|
||||
output << "ChargeTypeId," << result.chargeTypeId << "\n";
|
||||
|
||||
output << " Original dstrctvZF/pntrtnWF, "
|
||||
<< QString::number(chargeOrg.destructiveFactor) << QStringLiteral("/") << QString::number(chargeOrg.penetrationEffect)<< "\n";
|
||||
output << " Current dstrctvZF/pntrtnWF, "
|
||||
<< QString::number(charge.destructiveFactor) << QStringLiteral("/") << QString::number(charge.penetrationEffect)<< "\n";
|
||||
|
||||
output << "OriginatorId," << result.originatorId << "\n";
|
||||
|
||||
{
|
||||
std::ostringstream stream;
|
||||
stream << hit.typeOfHit;
|
||||
output << "TypeOfHit," << QString::fromStdString(stream.str()) << "\n";
|
||||
output << "BelowGround(Hack)," << m_building.isLastHitPositionBelowGroundHack() << "\n";
|
||||
}
|
||||
|
||||
output << "RoomId," << m_building.lastHitPosition().roomId << "\n";
|
||||
|
||||
{
|
||||
std::ostringstream stream;
|
||||
stream << result.damageState;
|
||||
output << "DamageState," << QString::fromStdString(stream.str()) << "\n";
|
||||
}
|
||||
|
||||
output << "DamagePercentNew," << result.damagePercentNew << "\n";
|
||||
output << "DamagePercentOld," << result.damagePercentOld << "\n";
|
||||
|
||||
output << ",," << "\n";
|
||||
|
||||
output << "RoomId,damagePercent,remainingEffectPercent,directHit" << "\n";
|
||||
for (const HitRoom &hitRoom : qAsConst(result.rooms))
|
||||
{
|
||||
output << hitRoom.roomId << ","
|
||||
<< hitRoom.damagePercent << ","
|
||||
<< hitRoom.remainingEffectPercent << ","
|
||||
<< hitRoom.directHit << ","
|
||||
<< "\n";
|
||||
}
|
||||
|
||||
output << ",," << "\n";
|
||||
output << ",," << "\n";
|
||||
}
|
||||
}
|
||||
|
||||
void Api::onHitOpticalOC(qint64 timeMSec, int sensorId, int originatorId, int chargeTypeId, DamageState damageState)
|
||||
{
|
||||
Hit hit;
|
||||
const Bsm bsm = m_bsmMap.value(sensorId);
|
||||
if (bsm.isValid())
|
||||
{
|
||||
hit.position = bsm.position;
|
||||
hit.direction = bsm.direction * -1; // bsm looks away from building
|
||||
}
|
||||
hit.sensorId = sensorId;
|
||||
hit.effectTimeMSec = timeMSec;
|
||||
hit.damageStateOverride = damageState;
|
||||
hit.chargeTypeId = chargeTypeId;
|
||||
hit.originatorId = originatorId;
|
||||
hit.originatorType = OriginatorType::OC;
|
||||
|
||||
sendHitToVwm(hit);
|
||||
}
|
||||
|
||||
void Api::onHitEcc(int originatorId, DamageState damageState, const QVector<int> &roomIds)
|
||||
{
|
||||
Hit hit;
|
||||
hit.effectTimeMSec = QDateTime::currentMSecsSinceEpoch();
|
||||
hit.damageStateOverride = damageState;
|
||||
hit.originatorId = originatorId;
|
||||
hit.originatorType = OriginatorType::ECC;
|
||||
hit.affectedRoomIds = roomIds;
|
||||
|
||||
sendHitToVwm(hit);
|
||||
}
|
||||
|
||||
void Api::onSetContaminationState(const std::vector<ContaminationState> &contaminationStates)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "contaminationStates.size=" << contaminationStates.size();
|
||||
|
||||
for (const auto &newcs : contaminationStates)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "newcs.damagePercentNew=" << newcs.damagePercentNew
|
||||
<< " m_lastHitResult.damagePercentNew=" << m_lastHitResult.damagePercentNew;
|
||||
if ( newcs.damagePercentNew > m_lastHitResult.damagePercentNew)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "newcs.damagePercentNew=" << newcs.damagePercentNew;
|
||||
m_lastHitResult.damagePercentNew = newcs.damagePercentNew;
|
||||
}
|
||||
if (m_contaminationStates.contains(newcs.aesId))
|
||||
{
|
||||
|
||||
//used in qt >5.14
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5,10,0)
|
||||
//satisfy 42.3 Build
|
||||
QSet<int> roomsSet;
|
||||
for (const auto i: qAsConst(newcs.rooms))
|
||||
{
|
||||
roomsSet.insert(i);
|
||||
}
|
||||
#else
|
||||
QSet<int> roomsSet = QSet<int>(newcs.rooms.begin(), newcs.rooms.end());
|
||||
#endif
|
||||
const auto &rooms = m_contaminationStates.value(newcs.aesId).rooms;
|
||||
for (const auto &oldRoom : rooms)
|
||||
roomsSet.insert(oldRoom);
|
||||
|
||||
ContaminationState contaState;
|
||||
contaState.aesId = newcs.aesId;
|
||||
contaState.damagePercentNew = newcs.damagePercentNew;
|
||||
contaState.rooms = std::vector<int>(roomsSet.begin(), roomsSet.end());
|
||||
m_contaminationStates[newcs.aesId] = contaState;
|
||||
}
|
||||
else
|
||||
m_contaminationStates.insert(newcs.aesId, newcs);
|
||||
}
|
||||
DEBUG_LOG(m_logger) << "onSetContaminationState emit hitResult "
|
||||
<< " m_lastHitResult.damagePercentNew=" << m_lastHitResult.damagePercentNew;
|
||||
emit hitResult(m_lastHitResult, m_contaminationStates, false);
|
||||
StateStore::saveState(m_building, m_lastHitResult, m_contaminationStates);
|
||||
}
|
||||
|
||||
void Api::onResetContaminations()
|
||||
{
|
||||
m_contaminationStates.clear();
|
||||
DEBUG_LOG(m_logger) << "onResetContaminations emit hitResult";
|
||||
m_lastHitResult.chargeTypeId = 0;
|
||||
m_lastHitResult.originatorId = 0;
|
||||
m_lastHitResult.originatorType = BuildingControlUnit::OriginatorType::ECC;
|
||||
emit hitResult(m_lastHitResult, m_contaminationStates, false);
|
||||
StateStore::saveState(m_building, m_lastHitResult, m_contaminationStates);
|
||||
}
|
||||
|
||||
void Api::onHitCes(const qint64 effectTimeMSec, const int chargeTypeId,
|
||||
const int destructiveFactor, const int penetrationFactor,
|
||||
const int aesId, const LtsUtils::QPoint3D &posImpact,
|
||||
const QString &properties)
|
||||
{
|
||||
Q_UNUSED(properties); // intention: data could be added to struct 'Hit' and passed to the user
|
||||
|
||||
Hit hit;
|
||||
hit.effectTimeMSec = effectTimeMSec;
|
||||
hit.chargeTypeId = chargeTypeId;
|
||||
hit.destructiveFactor = destructiveFactor;
|
||||
hit.penetrationFactor = penetrationFactor;
|
||||
hit.originatorId = aesId;
|
||||
hit.originatorType = OriginatorType::CesHit;
|
||||
hit.position = posImpact;
|
||||
|
||||
// use "1" meter here to find rooms ABOVE ground:
|
||||
hit.position.setZ(1);
|
||||
|
||||
INFO_LOG(m_logger) << "XXXXX CES Hit = " << hit;
|
||||
|
||||
// first we have to check if the building was hit directly
|
||||
// -> check every wall if it would be hit with bsm direction 0/0/1
|
||||
BuildingControlUnit::VWM::HitPosition hitPos;
|
||||
hitPos.distance = +10000;
|
||||
|
||||
LtsUtils::QPoint3D posTmp(posImpact);
|
||||
posTmp.setZ(10000);
|
||||
const LtsUtils::QPoint3D direction(0,0,1); // fake bsm dir -> looking upwards
|
||||
const auto hitPosTmp = BuildingControlUnit::VWM::Math::checkBsmPosition(posTmp, direction, m_building.rooms());
|
||||
INFO_LOG(m_logger) << "XXXXX hitPosTmp after checkBsmPosition = " << hitPosTmp;
|
||||
if (hitPosTmp.state != BuildingControlUnit::VWM::HitPosition::State::NoHit)
|
||||
{
|
||||
auto room = m_building.rooms().value(hitPosTmp.roomId);
|
||||
if (room.isValid()) // should not happen but who knows...
|
||||
{
|
||||
// At the beginning, only on-ground-bulding were considered.
|
||||
// Starting with U-Bahn-Tunnel and Kanalisation, below-ground-building have to be considerd.
|
||||
// In that cases the distance is like 10003 meters...
|
||||
// so skip this additional check
|
||||
// // if (hitPosTmp.distance < hitPos.distance)
|
||||
{
|
||||
hitPos = hitPosTmp;
|
||||
hit.direction = direction * -1; // look downwards
|
||||
hit.position = posTmp; // hit from above, use this pos with z == 10000;
|
||||
}
|
||||
}
|
||||
// not really relevant, but who knows:
|
||||
hit.typeOfHit = TypeOfHit::InsideBuilding;
|
||||
}
|
||||
|
||||
// if not inside building -> find nearest wall point to impact position
|
||||
LtsUtils::QPoint3D posImpactOnGround(posImpact);
|
||||
posImpactOnGround.setZ(1); // use "1" meter here to find rooms ABOVE ground:
|
||||
|
||||
// struct NearestWall
|
||||
// {
|
||||
// int roomId{0};
|
||||
// WallElement wallElement;
|
||||
// };
|
||||
NearestWall nearestWall;
|
||||
if (hitPos.state == BuildingControlUnit::VWM::HitPosition::State::NoHit)
|
||||
{
|
||||
INFO_LOG(m_logger) << "XXXXX CES Hit outside building - searching nearest wall ...";
|
||||
|
||||
double distanceOut = 0;
|
||||
LtsUtils::QPoint3D directionWallElementPointToDetonationOut;
|
||||
nearestWall = findNearestWall(posImpactOnGround, distanceOut, directionWallElementPointToDetonationOut);
|
||||
|
||||
if (nearestWall.isValid())
|
||||
{
|
||||
hitPos.state = BuildingControlUnit::VWM::HitPosition::State::OuterWall;
|
||||
hitPos.distance = distanceOut;
|
||||
hit.direction = directionWallElementPointToDetonationOut;
|
||||
hit.typeOfHit = TypeOfHit::OutsideBuilding; // will reduce charge (effect)
|
||||
}
|
||||
}
|
||||
|
||||
if (hitPos.state == BuildingControlUnit::VWM::HitPosition::State::NoHit)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Internal error - could not find impact position on building "
|
||||
<< m_building.name() << " with impact pos " << posImpactOnGround;
|
||||
}
|
||||
INFO_LOG(m_logger) << "XXXXX Aes hit - hit pos: " << posImpactOnGround << " direction: " << hit.direction
|
||||
<< " (p=" << hit.direction+posImpactOnGround << ")"
|
||||
<< " ; nearestWall.roomId=" << nearestWall.roomId;
|
||||
for (auto item : qAsConst(nearestWall.wallElement))
|
||||
DEBUG_LOG(m_logger) << "Aes hit - hit pos: " << posImpactOnGround << " direction: " << hit.direction
|
||||
<< " (p=" << hit.direction+posImpactOnGround
|
||||
<< " - " << item;
|
||||
|
||||
if (nearestWall.wallElement.isEmpty())
|
||||
{
|
||||
sendHitToVwm(hit);
|
||||
} else {
|
||||
|
||||
const LtsUtils::QPoint3D ¢er = centerOfWallElement3D(nearestWall.wallElement);
|
||||
|
||||
INFO_LOG(m_logger) << "XXXXX Aes hit - hit pos: " << posImpactOnGround << " direction: " << hit.direction
|
||||
<< ", m_building.name=" << m_building.name()
|
||||
<< ", m_building.modelId=" << m_building.modelId()
|
||||
<< ", nearestWall.roomId=" << nearestWall.roomId
|
||||
<< ", hitPos.distance=" << hitPos.distance
|
||||
<< ", center=" << center
|
||||
<< ", direction would be " << center-posImpactOnGround;
|
||||
|
||||
hit.direction = center - posImpactOnGround;
|
||||
|
||||
sendHitToVwm(hit);
|
||||
}
|
||||
}
|
||||
|
||||
NearestWall Api::findNearestWall(const LtsUtils::QPoint3D &detonationLocation, double &distanceOut, LtsUtils::QPoint3D &directionWallElementPointToDetonationOut)
|
||||
{
|
||||
NearestWall nearestWall;
|
||||
distanceOut = std::numeric_limits<double>::max();
|
||||
|
||||
INFO_LOG(m_logger) << "XXXXX searching nearest wall ...";
|
||||
for (const Room &room : qAsConst(m_building.rooms()))
|
||||
{
|
||||
for (const OuterWall &wall : qAsConst(room.outerWalls()))
|
||||
{
|
||||
for (const WallElement &we : qAsConst(wall.elements()))
|
||||
{
|
||||
for (const LtsUtils::QPoint3D &p : qAsConst(we))
|
||||
{
|
||||
const double dist = (detonationLocation - p).length();
|
||||
DEBUG_LOG(m_logger) << "Room[" << room.id() << "]: " << p << ", dist = " << dist;
|
||||
if (dist >= distanceOut)
|
||||
continue;
|
||||
|
||||
// hitPos.state = BuildingControlUnit::VWM::HitPosition::State::OuterWall;
|
||||
distanceOut = dist;
|
||||
INFO_LOG(m_logger) << "New min distance " << dist << " Room[" << room.id() << "]: " << p;
|
||||
directionWallElementPointToDetonationOut = p - detonationLocation;
|
||||
|
||||
nearestWall.roomId = room.id();
|
||||
nearestWall.wallElement = we;
|
||||
|
||||
// hit.typeOfHit = TypeOfHit::OutsideBuilding; // will reduce charge (effect)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return nearestWall;
|
||||
}
|
||||
|
||||
void Api::onHitCes3D_Evaluation(const qint64 effectTimeMSec,
|
||||
const int chargeTypeId, const int destructiveFactor, const int penetrationFactor,
|
||||
const int aesId,
|
||||
const LtsUtils::QPoint3D &posImpact,
|
||||
const LtsUtils::QPoint3D &detonationLocation,
|
||||
const double detonationDistance,
|
||||
const QString &properties)
|
||||
{
|
||||
Q_UNUSED(posImpact);
|
||||
Q_UNUSED(properties); // intention: data could be added to struct 'Hit' and passed to the user
|
||||
|
||||
Hit hit;
|
||||
hit.effectTimeMSec = effectTimeMSec;
|
||||
hit.chargeTypeId = chargeTypeId;
|
||||
hit.originatorId = aesId;
|
||||
hit.originatorType = OriginatorType::CesHit3D;
|
||||
hit.position = detonationLocation;
|
||||
// hit.direction
|
||||
// hit.detonationLocation
|
||||
|
||||
INFO_LOG(m_logger) << "XXXXXXXXXX CES Hit 3D = " << hit
|
||||
<< ", detonationLocation = " << detonationLocation
|
||||
<< ", detonationDistance = " << detonationDistance
|
||||
<< ", chargeTypeId = " << chargeTypeId
|
||||
<< ", destructiveFactor = " << destructiveFactor
|
||||
<< ", penetrationFactor = " << penetrationFactor;
|
||||
|
||||
// Aufschlagzünder == 0 ?
|
||||
// Verzögerungszünder > 0 ?
|
||||
// Annäherungszünder < 0 ?
|
||||
|
||||
// ProjectDataManagement::FuseType::FtProximity -> position = (1.91756,10.9597,9.94583), direction = (0,0,0)
|
||||
// ProjectDataManagement::FuseType::FtImpact -> position = (1.91756,10.9597,9.94583), direction = (0,0,0)
|
||||
// ProjectDataManagement::FuseType::FtDelay ->
|
||||
|
||||
QVector<int> roomsWithDetonation;
|
||||
const bool bIsDelayed = detonationDistance > 0;
|
||||
|
||||
HitPosition hitPosPreCalculated;
|
||||
hitPosPreCalculated.state = HitPosition::State::OuterWall;
|
||||
hitPosPreCalculated.outerWallIdx = 0; // will point to the dummyWall !?
|
||||
|
||||
|
||||
if (bIsDelayed)
|
||||
{
|
||||
roomsWithDetonation = m_buildingRoomGeometry.pointIsInWhichRooms(detonationLocation);
|
||||
if (roomsWithDetonation.isEmpty())
|
||||
{
|
||||
INFO_LOG(m_logger) << "XXXX Building '" << m_building.name() << "'"
|
||||
<< ", detonationLocation = " << detonationLocation
|
||||
<< " -> found no room";
|
||||
} else {
|
||||
if (roomsWithDetonation.size() == 1)
|
||||
INFO_LOG(m_logger) << "XXXX Building '" << m_building.name() << "'"
|
||||
<< ", detonationLocation = " << detonationLocation
|
||||
<< " -> found just one room: " << roomsWithDetonation.first();
|
||||
else
|
||||
INFO_LOG(m_logger) << "XXXX Building '" << m_building.name() << "'"
|
||||
<< ", detonationLocation = " << detonationLocation
|
||||
<< " -> found several rooms, choose first: " << roomsWithDetonation.first();
|
||||
|
||||
hitPosPreCalculated.roomId = roomsWithDetonation.first();
|
||||
hitPosPreCalculated.exclusionZoneIdx = -1;
|
||||
hitPosPreCalculated.distance = 0;
|
||||
}
|
||||
} // if
|
||||
|
||||
if (!bIsDelayed ||
|
||||
roomsWithDetonation.isEmpty()) // fallback
|
||||
{
|
||||
// handle similar as before: findNearestWall
|
||||
double distanceOut = 0;
|
||||
LtsUtils::QPoint3D directionWallElementPointToDetonationOut;
|
||||
NearestWall nearestWall = findNearestWall(detonationLocation, distanceOut, directionWallElementPointToDetonationOut);
|
||||
|
||||
INFO_LOG(m_logger) << "XXXXX CES Hit outside building - searching nearest wall ..."
|
||||
<< ", detonationDistance = " << detonationDistance
|
||||
<< ", nearestWall.roomId = " << nearestWall.roomId;
|
||||
|
||||
if (nearestWall.isValid())
|
||||
{
|
||||
hitPosPreCalculated.roomId = nearestWall.roomId;
|
||||
hitPosPreCalculated.distance = distanceOut;
|
||||
hit.direction = directionWallElementPointToDetonationOut;
|
||||
if (bIsDelayed)
|
||||
hit.typeOfHit = TypeOfHit::InsideBuilding;
|
||||
else
|
||||
hit.typeOfHit = TypeOfHit::OutsideBuilding; // will reduce charge (effect)
|
||||
}
|
||||
} // if
|
||||
|
||||
|
||||
HitResult result;
|
||||
result.damagePercentOld = m_building.damagePercent();
|
||||
result.effectTimeMSec = effectTimeMSec;
|
||||
|
||||
// von hier ueber a) sendHitToVwm, b) hitResult
|
||||
// Oder direkt hitResult??
|
||||
|
||||
QString context(QStringLiteral("onHitCes-3D - "));
|
||||
|
||||
const Charge &chargeOrg = chargeFromChargeTypeId(chargeTypeId);
|
||||
Charge charge = chargeOrg;
|
||||
charge.destructiveFactor = destructiveFactor;
|
||||
charge.penetrationEffect = penetrationFactor;
|
||||
if (detonationDistance>0)
|
||||
{
|
||||
charge.destructiveFactor *= 2.1;
|
||||
charge.penetrationEffect *= 2.1;
|
||||
context += QStringLiteral("FtDelay");
|
||||
} else if (detonationDistance<0)
|
||||
{
|
||||
charge.destructiveFactor *= 0.55;
|
||||
charge.penetrationEffect *= 0.55;
|
||||
context += QStringLiteral("FtProximity");
|
||||
} else {
|
||||
context += QStringLiteral("FtImpact");
|
||||
}
|
||||
|
||||
bool hitSuccess = m_building.hit(LtsUtils::QPoint3D(), LtsUtils::QPoint3D(), // pos and dir: default values are okay
|
||||
charge, &hitPosPreCalculated);
|
||||
|
||||
INFO_LOG(m_logger) << "onHitCes3D_Evaluation hitSuccess=" << hitSuccess;
|
||||
|
||||
result.rooms = m_building.roomStates();
|
||||
result.damageState = m_building.damageState();
|
||||
result.damagePercentNew = m_building.damagePercent();
|
||||
//add Values from function:
|
||||
result.chargeTypeId = chargeTypeId;
|
||||
result.originatorType = OriginatorType::CesHit;
|
||||
result.originatorId = aesId;
|
||||
|
||||
#ifdef LTS_DEBUG
|
||||
// write ShotResult.cvs
|
||||
dumpHitResult(hit, result, chargeOrg, charge, context);
|
||||
#endif // LTS_DEBUG
|
||||
|
||||
emit hitResult(result, m_contaminationStates, true);
|
||||
}
|
||||
|
||||
void Api::onFortifyFactorRequest(int originatorId, const QVector<FortifyInfo> &foritfyInfos)
|
||||
{
|
||||
|
||||
HitResult result;
|
||||
result.effectTimeMSec = QDateTime::currentMSecsSinceEpoch();
|
||||
result.originatorId = originatorId;
|
||||
result.originatorType = OriginatorType::ECC;
|
||||
result.damagePercentOld = m_building.damagePercent();
|
||||
|
||||
m_building.setFortifyInfo(foritfyInfos);
|
||||
result.rooms = m_building.roomStates();
|
||||
result.damageState = m_building.damageState();
|
||||
result.damagePercentNew = m_building.damagePercent();
|
||||
|
||||
emit hitResult(result, m_contaminationStates, true);
|
||||
|
||||
m_lastHitResult = result;
|
||||
}
|
||||
|
||||
void Api::onRelayStatesRequest(const QString &hostname, const QVector<RelayStateInfo> &relayStateInfos)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "onRelayStateRequest hostname=" << hostname
|
||||
<< " only hanlde in svcBuildings"
|
||||
<< " relayStateInfos.size()=" << relayStateInfos.size();
|
||||
}
|
||||
|
||||
void Api::sendOverrides()
|
||||
{
|
||||
const QMap<QString, QString> &segmentPropertyMap = m_building.segmentPropertyMap();
|
||||
QVector<BcuEffectState> effectStates;
|
||||
for (auto it = segmentPropertyMap.cbegin(); it != segmentPropertyMap.cend(); ++it)
|
||||
{
|
||||
QString hostname = it.key();
|
||||
QString properties = it.value();
|
||||
effectStates.clear();
|
||||
QJsonParseError parserError;
|
||||
const QJsonDocument doc(QJsonDocument::fromJson(properties.toUtf8(), &parserError));
|
||||
|
||||
if (parserError.error != QJsonParseError::NoError)
|
||||
continue;
|
||||
|
||||
QJsonObject docObj = QJsonObject(doc.object());
|
||||
|
||||
DEBUG_LOG(m_logger) << "sendOverrides hostname=" << hostname
|
||||
<< " properties=" << properties;
|
||||
|
||||
/////////////////////////////////////////
|
||||
/// \brief BCU-Flash
|
||||
///
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "sendOverrides hostname=" << hostname
|
||||
<< " properties=" << properties << "BCU-Flash";
|
||||
BcuEffectState bcuEffectState;
|
||||
bcuEffectState.id = 1; // Id aus effect_config.xml
|
||||
bcuEffectState.type = BcuEffectType::BET_BsmFlash;
|
||||
BcuEffectOverride eo = BcuEffectOverride::BEO_Auto;
|
||||
|
||||
QJsonObject overrideObj;
|
||||
QJsonObject flashObj;
|
||||
if (docObj.contains(QStringLiteral("Overrides")))
|
||||
{
|
||||
overrideObj = docObj[QStringLiteral("Overrides")].toObject();
|
||||
}
|
||||
|
||||
if (overrideObj.contains(QStringLiteral("flash")))
|
||||
{
|
||||
flashObj = docObj[QStringLiteral("flash")].toObject();
|
||||
eo = static_cast<BuildingControlUnit::BcuEffectOverride>(flashObj.value(QStringLiteral("flash")).toInt());
|
||||
}
|
||||
if (eo != BcuEffectOverride::BEO_Auto)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "bcuEffectState.effectOverride = eo" << eo;
|
||||
bcuEffectState.effectOverride = eo;
|
||||
emit newOverrides({}, {bcuEffectState});
|
||||
}
|
||||
}
|
||||
/////////////////////////////////////////
|
||||
|
||||
|
||||
QJsonObject overridesObj = docObj.value(QStringLiteral("Overrides")).toObject();
|
||||
QJsonArray arrEgcus = overridesObj.value(QStringLiteral("relays")).toArray();
|
||||
for (int i=0; i<arrEgcus.size(); ++i)
|
||||
{
|
||||
QJsonObject objState = arrEgcus[i].toObject();
|
||||
QStringList keys = objState.keys();
|
||||
QString relayIdString = keys.at(0);
|
||||
int relayId = relayIdString.toInt();
|
||||
if (!objState.contains(relayIdString))
|
||||
continue;
|
||||
BcuEffectOverride eo = static_cast<BuildingControlUnit::BcuEffectOverride>(objState.value(relayIdString).toInt());
|
||||
if (eo == BcuEffectOverride::BEO_Auto)
|
||||
continue;
|
||||
BuildingControlUnit::BcuEffectState bcuEffectState;
|
||||
bcuEffectState.id = relayId;
|
||||
bcuEffectState.type = BcuEffectType::BET_Relay;
|
||||
bcuEffectState.effectOverride = eo;
|
||||
effectStates.append(bcuEffectState);
|
||||
}
|
||||
|
||||
{
|
||||
BuildingControlUnit::BcuEffectState bcuEffectState;
|
||||
bcuEffectState.id = 1; // Id aus effect_config.xml
|
||||
bcuEffectState.type = BcuEffectType::BET_BackgroundSound;
|
||||
BcuEffectOverride eo = BcuEffectOverride::BEO_Auto;
|
||||
if (overridesObj.contains(QStringLiteral("sound")))
|
||||
eo = static_cast<BuildingControlUnit::BcuEffectOverride>(overridesObj.value(QStringLiteral("sound")).toInt());
|
||||
if (eo != BcuEffectOverride::BEO_Auto)
|
||||
{
|
||||
bcuEffectState.effectOverride = eo;
|
||||
effectStates.append(bcuEffectState);
|
||||
}
|
||||
}
|
||||
emit newOverrides(hostname,effectStates);
|
||||
}
|
||||
}
|
||||
|
||||
void Api::sendHitToVwm(const Hit &hit)
|
||||
{
|
||||
m_hitsSinceLastInit += hit;
|
||||
|
||||
INFO_LOG(m_logger) << " XXXXX sendHitToVwm, Incoming hit=" << hit
|
||||
<< " hit.chargeTypeId=" << hit.chargeTypeId
|
||||
<< " originatorId=" << hit.originatorId
|
||||
<< " typeOfHit=" << hit.typeOfHit;
|
||||
|
||||
HitResult result;
|
||||
result.sensorId = hit.sensorId;
|
||||
result.effectTimeMSec = hit.effectTimeMSec;
|
||||
result.originatorId = hit.originatorId;
|
||||
result.originatorType = hit.originatorType;
|
||||
result.damagePercentOld = m_building.damagePercent();
|
||||
switch (hit.originatorType)
|
||||
{
|
||||
case OriginatorType::CesHit:
|
||||
case OriginatorType::CesHit3D:
|
||||
case OriginatorType::DirectHit:
|
||||
{
|
||||
Charge charge, chargeOrg;
|
||||
charge = chargeFromChargeTypeId(hit.chargeTypeId); // we know the correct charge id
|
||||
if ( ( hit.originatorType == OriginatorType::CesHit)
|
||||
|| ( hit.originatorType == OriginatorType::CesHit3D))
|
||||
{
|
||||
// [GUEZE-2821] Building protects buildings
|
||||
charge.destructiveFactor = hit.destructiveFactor;
|
||||
charge.penetrationEffect = hit.penetrationFactor;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "charge=" << charge.chargeTypeId
|
||||
<< " destructiveFactor" << charge.destructiveFactor
|
||||
<< " penetrationEffect" << charge.penetrationEffect;
|
||||
chargeOrg = charge;
|
||||
result.chargeTypeId = hit.chargeTypeId;
|
||||
result.effectSoundId = charge.effectSoundId;
|
||||
|
||||
if ( charge.destructiveFactor == 0 // no effect on the building
|
||||
&& !charge.showHitLine)
|
||||
return;
|
||||
|
||||
if ((hit.originatorType == OriginatorType::CesHit) &&
|
||||
(hit.typeOfHit == TypeOfHit::OutsideBuilding))
|
||||
{
|
||||
|
||||
LtsUtils::QPoint3D dummyDist = hit.position - hit.direction;
|
||||
|
||||
INFO_LOG(m_logger) << " XXXX CES outside bulding, reduce charge: " << charge
|
||||
<< ", hit.position " << hit.position
|
||||
<< ", hit.direction " << hit.direction
|
||||
<< ", dummyDist " << dummyDist.length();
|
||||
charge.destructiveFactor *= 0.5;
|
||||
charge.penetrationEffect *= 0.5;
|
||||
INFO_LOG(m_logger) << " XXXX CES outside bulding, reduce charge: " << charge;
|
||||
}
|
||||
|
||||
if (!charge.isValid())
|
||||
{
|
||||
if (hit.originatorType == OriginatorType::CesHit)
|
||||
WARNING_LOG(m_logger) << "Charge with id " << hit.chargeTypeId
|
||||
<< " not configured - can not caluclate impact effect for this charge";
|
||||
else
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Direct charge with id " << hit.chargeTypeId
|
||||
<< " not configured - can not caluclate impact effect for this charge";
|
||||
emit unknownDirectHit(hit.sensorId);
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (!m_building.hit(hit.position, hit.direction, charge))
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Detected hit was outside of the building - ignored";
|
||||
break;
|
||||
}
|
||||
result.rooms = m_building.roomStates();
|
||||
result.damageState = m_building.damageState();
|
||||
result.damagePercentNew = m_building.damagePercent();
|
||||
|
||||
emit hitResult(result, m_contaminationStates, true);
|
||||
|
||||
#ifdef LTS_DEBUG
|
||||
// write ShotResult.cvs
|
||||
dumpHitResult(hit, result, chargeOrg, charge, QStringLiteral("default"));
|
||||
#endif // LTS_DEBUG
|
||||
|
||||
m_lastHitResult = result;
|
||||
break;
|
||||
}
|
||||
case OriginatorType::ECC:
|
||||
case OriginatorType::OC:
|
||||
{
|
||||
if (!hit.affectedRoomIds.isEmpty())
|
||||
{
|
||||
// destroy/init a special room from ECC
|
||||
m_building.setRoomState(hit.damageStateOverride, hit.affectedRoomIds);
|
||||
|
||||
result.rooms = m_building.roomStates();
|
||||
result.damageState = m_building.damageState();
|
||||
result.damagePercentNew = m_building.damagePercent();
|
||||
|
||||
emit hitResult(result, m_contaminationStates, true);
|
||||
|
||||
m_lastHitResult = result;
|
||||
break;
|
||||
}
|
||||
switch (hit.damageStateOverride)
|
||||
{
|
||||
case DamageState::NoDamage:
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Hit OC/ECC with NoDamage";
|
||||
m_building.init();
|
||||
|
||||
result.effectSoundId = Settings::effectSoundIdEccActivate();
|
||||
result.rooms = m_building.roomStates();
|
||||
result.damageState = DamageState::NoDamage;
|
||||
result.damagePercentNew = m_building.damagePercent();
|
||||
|
||||
emit hitResult(result, m_contaminationStates, true);
|
||||
|
||||
#ifdef LTS_DEBUG
|
||||
// write ShotResult.cvs
|
||||
dumpHitResult(hit, result, Charge(), Charge(), QStringLiteral("Reset by ECC/OC"));
|
||||
#endif // LTS_DEBUG
|
||||
|
||||
m_hitsSinceLastInit.clear();
|
||||
m_hitsSinceLastInit += hit;
|
||||
|
||||
m_lastHitResult = result;
|
||||
break;
|
||||
}
|
||||
case DamageState::Destroyed:
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Hit OC/ECC with Destroyed";
|
||||
const DamageState dsOld = m_building.damageState();
|
||||
|
||||
m_building.destroyAllRooms();
|
||||
|
||||
result.effectSoundId = Settings::effectSoundIdEccDestroy();
|
||||
result.rooms = m_building.roomStates();
|
||||
result.damageState = DamageState::Destroyed;
|
||||
result.damagePercentNew = m_building.damagePercent();
|
||||
|
||||
if (dsOld != DamageState::Destroyed)
|
||||
{
|
||||
emit hitResult(result, m_contaminationStates, true);
|
||||
|
||||
#ifdef LTS_DEBUG
|
||||
// write ShotResult.cvs
|
||||
dumpHitResult(hit, result, Charge(), Charge(), QStringLiteral("Destroyed by ECC/OC"));
|
||||
#endif // LTS_DEBUG
|
||||
}
|
||||
|
||||
m_lastHitResult = result;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
WARNING_LOG(m_logger) << "Invalid damage state override given: " << hit.damageStateOverride;
|
||||
result = HitResult();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case OriginatorType::Unknown:
|
||||
WARNING_LOG(m_logger) << "Unknown originator type given: " << hit.originatorType;
|
||||
result = HitResult();
|
||||
break;
|
||||
}
|
||||
StateStore::saveState(m_building, m_lastHitResult, m_contaminationStates);
|
||||
}
|
||||
|
||||
|
||||
const Charge Api::chargeFromChargeTypeId(int chargeTypeId) const
|
||||
{
|
||||
|
||||
if (chargeTypeId > 4000)
|
||||
{
|
||||
chargeTypeId %= 1000;
|
||||
chargeTypeId += 2000;
|
||||
}
|
||||
|
||||
for (auto i = m_chargeMap.cbegin(), end = m_chargeMap.cend(); i != end; ++i)
|
||||
{
|
||||
TRACE_LOG(m_logger) << "key=" << i.key() << " value=" << i.value();
|
||||
if ( chargeTypeId == i.value().id)
|
||||
return m_chargeMap.value(i.key());
|
||||
}
|
||||
|
||||
return m_chargeMap.value(chargeTypeId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
} // namespace VWM
|
||||
} // namespace BuildingControlUnit
|
||||
+98
@@ -0,0 +1,98 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Api for VWM
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLSA, 2013-03-05
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "vwm_building_room_geometry.h"
|
||||
#include <QObject>
|
||||
#include <logger.h>
|
||||
#include "vwm_building.h"
|
||||
#include "vwm_types.h"
|
||||
#include <VWM/buildingcontrolvwm_export.h>
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace VWM
|
||||
{
|
||||
|
||||
struct NearestWall
|
||||
{
|
||||
int roomId{0};
|
||||
WallElement wallElement;
|
||||
bool isValid() const { return roomId > 0; }
|
||||
};
|
||||
|
||||
class BUILDINGCONTROLVWM_EXPORT Api : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit Api(QObject *parent = nullptr);
|
||||
|
||||
bool init(const QString &chargesConfig,
|
||||
const QString &vulBuildingConfig,
|
||||
const BuildingBsmConfig &bsmConfig,
|
||||
const bool initBuilding);
|
||||
|
||||
const Building &building() const { return m_building; } // for test purposes
|
||||
const QVector<Hit> &hitsSinceLastInit() const { return m_hitsSinceLastInit; }
|
||||
const HitResult lastHitResult() const { return m_lastHitResult; }
|
||||
const QMap<int, ContaminationState> contaminationStates() const {return m_contaminationStates;}
|
||||
const QMap<int, Bsm> &bsmMap() const { return m_bsmMap; }
|
||||
void sendOverrides();
|
||||
const Charge chargeFromChargeTypeId(int chargeTypeId) const;
|
||||
|
||||
public Q_SLOTS:
|
||||
void onHitOptical(qint64 timeMSec,
|
||||
int sensorId,
|
||||
int originatorId,
|
||||
int chargeTypeId,
|
||||
int deposition1,
|
||||
int deposition2);
|
||||
void onHitOpticalOC(qint64 timeMSec,
|
||||
int sensorId,
|
||||
int originatorId,
|
||||
int chargeTypeId,
|
||||
DamageState damageState);
|
||||
void onHitEcc(int originatorId, DamageState damageState, const QVector<int> &roomIds);
|
||||
void onSetContaminationState(const std::vector<ContaminationState> &contaminationStates);
|
||||
void onResetContaminations();
|
||||
void onHitCes(const qint64 effectTimeMSec, const int chargeTypeId,
|
||||
const int destructiveFactor, const int penetrationFactor,
|
||||
const int aesId, const LtsUtils::QPoint3D &posImpact,
|
||||
const QString &properties);
|
||||
NearestWall findNearestWall(const LtsUtils::QPoint3D &detonationLocation, double &distanceOut, LtsUtils::QPoint3D &directionWallElementPointToDetonationOut);
|
||||
void onHitCes3D_Evaluation(const qint64 effectTimeMSec, const int chargeTypeId,
|
||||
const int destructiveFactor, const int penetrationFactor,
|
||||
const int aesId, const LtsUtils::QPoint3D &posImpact,
|
||||
const LtsUtils::QPoint3D &detonationLocation, const double detonationDistance,
|
||||
const QString &properties);
|
||||
void onFortifyFactorRequest(int originatorId, const QVector<FortifyInfo> &foritfyInfos);
|
||||
void onRelayStatesRequest(const QString &hostname, const QVector<RelayStateInfo> &relayStateInfos);
|
||||
void onSetEffectStatesRequest(const QString &hostname, const QVector<BcuEffectState> &effectStates);
|
||||
|
||||
void dumpHitResult(const Hit &hit, const HitResult &result, const Charge &chargeOrg, const Charge &charge, const QString &context);
|
||||
|
||||
Q_SIGNALS:
|
||||
void hitResult(const HitResult &result, const QMap <int, ContaminationState> &contaminationStates, bool playSound);
|
||||
void newOverrides( const QString &hostname, const QVector<BcuEffectState> &effectStates);
|
||||
void unknownDirectHit(int sensorId);
|
||||
private:
|
||||
void sendHitToVwm(const Hit &hit);
|
||||
private:
|
||||
QMap<int, Bsm> m_bsmMap;
|
||||
QMap<int, Charge> m_chargeMap;
|
||||
QVector<Hit> m_hitsSinceLastInit;
|
||||
HitResult m_lastHitResult;
|
||||
QMap <int, ContaminationState> m_contaminationStates; // key = aesId
|
||||
Building m_building;
|
||||
BuildingRoomGeometry m_buildingRoomGeometry;
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
} // namespace VWM
|
||||
} // namespace BuildingControlUnit
|
||||
@@ -0,0 +1,947 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Building VWM info
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLSA, 2017-01-15
|
||||
*/
|
||||
|
||||
#include "vwm_building.h"
|
||||
#include "vwm_math.h"
|
||||
#include <QSet>
|
||||
#include <QVector>
|
||||
#include <QLineF>
|
||||
#include <settings.h>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace VWM
|
||||
{
|
||||
static NGL::INGLLogger &logger()
|
||||
{
|
||||
return BuildingControlUnit::getLogger("VWM.Building");
|
||||
}
|
||||
|
||||
static inline bool isEffectNegligible(double effect)
|
||||
{
|
||||
return (effect < Settings::minimumRemainEffectThreshold());
|
||||
}
|
||||
|
||||
static inline bool isEffectNegligible(double RW, double ZF, double TF)
|
||||
{
|
||||
return isEffectNegligible(ZF * RW * TF);
|
||||
}
|
||||
|
||||
// effect on walls (inside the room hit when TF = 1.0, otherwise neighbour room), see chapter 3.4/3.5
|
||||
static inline double calcProtectionOfWallAfterHit(double SG_alt, double RW, double ZF, double TF)
|
||||
{
|
||||
const double SG_diff = ZF * RW * TF;
|
||||
if (isEffectNegligible(SG_diff))
|
||||
return SG_alt;
|
||||
return std::max(0.0, SG_alt - SG_diff);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// WallExclusionZoneBase
|
||||
//
|
||||
void WallExclusionZoneBase::setInitalProtection(double initialProtection, bool bResetProtection)
|
||||
{
|
||||
m_initialProtection = initialProtection;
|
||||
if (bResetProtection)
|
||||
m_protection = initialProtection;
|
||||
}
|
||||
|
||||
void WallExclusionZoneBase::updateProtection(const double RW, const double ZF, const double TF)
|
||||
{
|
||||
const double SG_alt = m_protection;
|
||||
const double SG_neu = calcProtectionOfWallAfterHit(SG_alt, RW, ZF, TF);
|
||||
m_protection = SG_neu;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Room
|
||||
//
|
||||
void Room::setFortifyFactor(double factorNew, bool bRecalcValues)
|
||||
{
|
||||
const double factorOld = m_fortifyFactor;
|
||||
if (qFuzzyIsNull(factorOld) || qFuzzyIsNull(factorNew))
|
||||
return;
|
||||
m_fortifyFactor = factorNew;
|
||||
if (bRecalcValues)
|
||||
{
|
||||
for (OuterWall &wall : m_outerWalls)
|
||||
{
|
||||
wall.setProtection(wall.protection() / factorOld * factorNew);
|
||||
wall.setInitalProtection(wall.initialProtection() / factorOld * factorNew, false);
|
||||
for (ExclusionZone &exZone : wall.exclusionZones())
|
||||
{
|
||||
exZone.setProtection(exZone.protection() / factorOld * factorNew);
|
||||
exZone.setInitalProtection(exZone.initialProtection() / factorOld * factorNew, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
double Room::damagePercent() const
|
||||
{
|
||||
if (m_outerWalls.isEmpty())
|
||||
return 0; // should never happen - see Building::init()
|
||||
|
||||
double currentProtection = 0.0;
|
||||
double initialProtection = 0.0;
|
||||
for (const OuterWall &wall : qAsConst(m_outerWalls))
|
||||
{
|
||||
currentProtection += wall.protection();
|
||||
initialProtection += wall.initialProtection();
|
||||
for (const ExclusionZone &exZone : qAsConst(wall.exclusionZones()))
|
||||
{
|
||||
currentProtection += exZone.protection();
|
||||
initialProtection += exZone.initialProtection();
|
||||
}
|
||||
}
|
||||
if (qFuzzyIsNull(initialProtection))
|
||||
return 100;
|
||||
return (1.0 - currentProtection / initialProtection) * 100.0;
|
||||
}
|
||||
|
||||
|
||||
double Room::calcRemainingEffect(const HitPosition &hitPos, const Charge &ammu) const
|
||||
{
|
||||
const double SG_alt = protectionForHitPosition(hitPos);
|
||||
const double ZF = ammu.destructiveFactor;
|
||||
const double WF = ammu.penetrationEffect;
|
||||
const double RW = calcRemainingEffect(SG_alt, ZF, WF);
|
||||
return RW;
|
||||
}
|
||||
|
||||
void Room::updateProtectionDirectHit(const HitPosition &hitPos, const Charge &ammu)
|
||||
{
|
||||
Q_ASSERT(hitPos.state != HitPosition::State::NoHit);
|
||||
|
||||
const double SG_alt = protectionForHitPosition(hitPos);
|
||||
const double ZF = ammu.destructiveFactor;
|
||||
// da RW und TF = 1.0 ist es die gleiche Formel für direkten treffer und sekundärwirkung auf andere elemente
|
||||
const double SG_neu = calcProtectionOfWallAfterHit(SG_alt, 1.0, ZF, 1.0);
|
||||
setProtectionForHitPosition(hitPos, SG_neu);
|
||||
}
|
||||
|
||||
static bool isDirectHitOuterWall(const HitPosition &hitPos, int roomId, int idxOw)
|
||||
{
|
||||
if (hitPos.state != HitPosition::State::OuterWall)
|
||||
return false;
|
||||
return hitPos.roomId == roomId && hitPos.outerWallIdx == idxOw;
|
||||
}
|
||||
|
||||
static bool isDirectHitExlusionZone(const HitPosition &hitPos, int roomId, int idxOw, int idxEz)
|
||||
{
|
||||
if (hitPos.state != HitPosition::State::ExclusionZone)
|
||||
return false;
|
||||
return hitPos.roomId == roomId && hitPos.outerWallIdx == idxOw && hitPos.exclusionZoneIdx == idxEz;
|
||||
}
|
||||
|
||||
void Room::updateProtectionIndirectHit(const HitPosition &hitPos, const Charge &ammu, double remainingEffect)
|
||||
{
|
||||
// same calculation as for neighbours when transitionFactor is set to 1.0
|
||||
updateProtectionNeighbourHit(hitPos, ammu, remainingEffect, 1.0);
|
||||
}
|
||||
|
||||
bool Room::updateProtectionNeighbourHit(const HitPosition &hitPos, const Charge &ammu, double remainingEffect, double transitionFactor)
|
||||
{
|
||||
const double ZF = ammu.destructiveFactor;
|
||||
const double RW = remainingEffect;
|
||||
const double TF = transitionFactor;
|
||||
|
||||
DEBUG_LOG(logger()) << "Effect for room " << m_id
|
||||
<< " (RW="<< RW << ", ZF=" << ZF << " , TF=" << TF << ") ; effect=" << RW*ZF*TF
|
||||
<< " -> damagePercent VOR= " << this->damagePercent();
|
||||
|
||||
if (isEffectNegligible(RW, ZF, TF))
|
||||
{
|
||||
DEBUG_LOG(logger()) << "Effect is Negligible for room " << m_id;
|
||||
|
||||
for (int idxOw = 0; idxOw < m_outerWalls.size(); ++idxOw)
|
||||
{
|
||||
OuterWall &ow = m_outerWalls[idxOw];
|
||||
DEBUG_LOG(logger()) << "room " << m_id << "[ow=" << idxOw
|
||||
<< "] new protection = " << ow.protection()
|
||||
<< " (" << ow.protectionPercent() << "%)";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
const char *hitReason = (hitPos.roomId == m_id ? "indirect hit" : "neighbour hit");
|
||||
|
||||
for (int idxOw = 0; idxOw < m_outerWalls.size(); ++idxOw)
|
||||
{
|
||||
OuterWall &ow = m_outerWalls[idxOw];
|
||||
if (!isDirectHitOuterWall(hitPos, m_id, idxOw))
|
||||
{
|
||||
ow.updateProtection(RW, ZF, TF);
|
||||
DEBUG_LOG(logger()) << "room " << m_id << "[ow=" << idxOw
|
||||
<< "] new protection = " << ow.protection()
|
||||
<< " (" << ow.protectionPercent() << "%) - " << hitReason;
|
||||
}
|
||||
|
||||
for (int idxEz = 0; idxEz < ow.exclusionZones().size(); ++idxEz)
|
||||
{
|
||||
if (!isDirectHitExlusionZone(hitPos, m_id, idxOw, idxEz))
|
||||
{
|
||||
ExclusionZone &ez = ow.exclusionZones()[idxEz];
|
||||
ez.updateProtection(RW, ZF, TF);
|
||||
DEBUG_LOG(logger()) << "room " << m_id << "[ow=" << idxOw
|
||||
<< "][ez=" << idxEz
|
||||
<< "] new protection = " << ez.protection()
|
||||
<< " (" << ez.protectionPercent() << "%) - " << hitReason;
|
||||
}
|
||||
}
|
||||
}
|
||||
DEBUG_LOG(logger()) << "Effect for room " << m_id << " -> damagePercent NACH = " << this->damagePercent();
|
||||
return true;
|
||||
}
|
||||
|
||||
double Room::protectionForHitPosition(const HitPosition &hitPos) const
|
||||
{
|
||||
const OuterWall &ow = m_outerWalls.at(hitPos.outerWallIdx);
|
||||
if (hitPos.state == HitPosition::State::OuterWall)
|
||||
return ow.protection();
|
||||
return ow.exclusionZones().at(hitPos.exclusionZoneIdx).protection();
|
||||
}
|
||||
|
||||
void Room::setProtectionForHitPosition(const HitPosition &hitPos, double SG_neu)
|
||||
{
|
||||
Q_ASSERT(hitPos.state != HitPosition::State::NoHit);
|
||||
|
||||
OuterWall &ow = m_outerWalls[hitPos.outerWallIdx];
|
||||
if (hitPos.state == HitPosition::State::OuterWall)
|
||||
{
|
||||
ow.setProtection(SG_neu);
|
||||
// // m_directHit = true; // 'moved' to Building::hit()
|
||||
DEBUG_LOG(logger()) << "room " << m_id << "[ow=" << hitPos.outerWallIdx
|
||||
<< "] new protection = " << ow.protection()
|
||||
<< " (" << ow.protectionPercent() << "%)"
|
||||
<< " - direct hit";
|
||||
}
|
||||
else
|
||||
{
|
||||
ExclusionZone &ez = ow.exclusionZones()[hitPos.exclusionZoneIdx];
|
||||
ez.setProtection(SG_neu);
|
||||
DEBUG_LOG(logger()) << "room " << m_id << "[ow=" << hitPos.outerWallIdx
|
||||
<< "][ez=" << hitPos.exclusionZoneIdx
|
||||
<< "] new protection = " << ez.protection()
|
||||
<< " (" << ez.protectionPercent() << "%)"
|
||||
<< " - direct hit";
|
||||
}
|
||||
}
|
||||
|
||||
// effect on the wall/exclusion zone which was hit, see chapter 3.2 vulnerability model document
|
||||
double Room::calcRemainingEffect(double SG_alt, double ZF, double WF)
|
||||
{
|
||||
// keine Schutzwirkung -> remainingEffect = 100%
|
||||
if (SG_alt < 0.0001)
|
||||
return 1.0;
|
||||
|
||||
if (ZF < 0.0001)
|
||||
return 0;
|
||||
|
||||
double D_Wand = 0.0;
|
||||
if (SG_alt < ZF * 0.95)
|
||||
D_Wand = ZF * 0.95 - SG_alt;
|
||||
const double D_Zufall = ZF * WF * 0.05 / SG_alt;
|
||||
double RW = 100.0 * (D_Wand + D_Zufall) / ZF;
|
||||
if (RW > 1.0)
|
||||
RW = 1.0;
|
||||
|
||||
return RW;
|
||||
}
|
||||
|
||||
//
|
||||
// Building
|
||||
//
|
||||
Building::Building()
|
||||
: m_lastHitPosition(HitPosition())
|
||||
, m_logger(BuildingControlUnit::getLogger("VWM.Building"))
|
||||
{}
|
||||
|
||||
int Building::checkPolygons()
|
||||
{
|
||||
int numberOfDuplicates = 0;
|
||||
for (const Room &room : qAsConst(m_rooms))
|
||||
{
|
||||
for (int owIdx = 0; owIdx < room.outerWalls().size(); ++owIdx)
|
||||
{
|
||||
const OuterWall &ow = room.outerWalls().at(owIdx);
|
||||
for (int elemIdx = 0; elemIdx < ow.elements().size(); ++elemIdx)
|
||||
{
|
||||
const WallElement &wallElement = ow.elements().at(elemIdx);
|
||||
numberOfDuplicates += checkDublicatePointsInPolygon(room.id(), owIdx, elemIdx, "QuterWall", wallElement);
|
||||
|
||||
/*
|
||||
const auto &points = wallElement;
|
||||
for (int i = 0; i < points.size() - 1; ++i)
|
||||
{
|
||||
const QLineF l1 = QLineF(points.at(i), points.at(i+1));
|
||||
for (int j = i + 1; j < points.size() - 1; ++j)
|
||||
{
|
||||
const QLineF l2 = QLineF(points.at(j), points.at(j+1));
|
||||
if (l1.intersect(l2, nullptr))
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Polygon lines " << i << "," << i+1 << " (" << l1
|
||||
<< ") and " << j << "," << j+1 << " (" << l2
|
||||
<< ") in room " << roomId << ", " << type << "[" << idx
|
||||
<< "], element[" << subIdx << "] are interesectiong each other!";
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
/*
|
||||
for (int exIdx = 0; exIdx < ow.exclusionZones().size(); ++exIdx)
|
||||
{
|
||||
const ExclusionZone &ez = ow.exclusionZones().at(exIdx);
|
||||
checkDublicatePointsInPolygon(room.id(), owIdx, exIdx, "exclusion zone", ez);
|
||||
}*/
|
||||
}
|
||||
}
|
||||
return numberOfDuplicates;
|
||||
}
|
||||
|
||||
int Building::cleanupPolygons()
|
||||
{
|
||||
int numberOfRemoved = 0;
|
||||
for (Room &room : m_rooms)
|
||||
{
|
||||
for (int owIdx = 0; owIdx < room.outerWalls().size(); ++owIdx)
|
||||
{
|
||||
OuterWall &ow = room.outerWalls()[owIdx];
|
||||
for (int elemIdx = 0; elemIdx < ow.elements().size(); ++elemIdx)
|
||||
{
|
||||
WallElement &wallElement = ow.elements()[elemIdx];
|
||||
numberOfRemoved += cleanupDublicatePointsInPolygon(room.id(), owIdx, elemIdx, "room", wallElement);
|
||||
|
||||
bool bMakePlanarDone = false;
|
||||
// make planes planar
|
||||
|
||||
MakePlanar makePlanar(wallElement); // just a reference
|
||||
|
||||
//try (keep bldg_3280 in mind -> final poly was reduced to 2 coordinate (cleanupDublicatePointsInPolygon , make planar, getCoordsForPlane/removeLinearDependency)
|
||||
QVector<LtsUtils::QPoint3D> candidate = makePlanar.calculate(&bMakePlanarDone);
|
||||
cleanupDublicatePointsInPolygon(room.id(), owIdx, elemIdx, "room", candidate);
|
||||
if (candidate.size() < 4)
|
||||
{
|
||||
NOTICE_LOG(m_logger) << "wall was made planar: Building '" << m_name << "' -> "
|
||||
<< " in room " << room.id() << " OuterWall[" << owIdx
|
||||
<< "], element[" << elemIdx << "] "
|
||||
<< " makePlanar and cleanupDublicatePointsInPolygon would generate short polygon, size=" << candidate.size();
|
||||
for (auto point : qAsConst(candidate))
|
||||
NOTICE_LOG(m_logger) << " point= " << point;
|
||||
|
||||
bMakePlanarDone = false;
|
||||
|
||||
} else {
|
||||
wallElement = candidate;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (bMakePlanarDone)
|
||||
NOTICE_LOG(m_logger) << "wall was made planar: Building '" << m_name << "' -> "
|
||||
<< " in room " << room.id() << " OuterWall[" << owIdx
|
||||
<< "], element[" << elemIdx << "] "
|
||||
<< " smallestDim=" << (int)makePlanar.getSmallestDim()
|
||||
<< " smallestRange=" << makePlanar.getSmallestRange();
|
||||
//
|
||||
// Bei Bldg 1193 (rev. 5032.55466)
|
||||
// ((( if (ratioOfSmallestAndBiggestDimension() >= 10.0
|
||||
// && getRange(m_smallestDim).range() < 0.10 )) )
|
||||
// OHNE makePlanar -> 7 HitPosition::State::OuterWall (vwm_math.cpp:539)
|
||||
// MIT makePlanar -> 8 HitPosition::State::OuterWall (vwm_math.cpp:539)
|
||||
// Neu: HitPosition::State::OuterWall, roomId = 2103, outerWallIndex = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
return numberOfRemoved;
|
||||
}
|
||||
int Building::cleanupDublicatePointsInPolygon(int roomId, int idx, int subIdx, const char *type, QVector<LtsUtils::QPoint3D> &points) const
|
||||
{
|
||||
QVector<int> idxToRemove;
|
||||
idxToRemove.reserve(points.size());
|
||||
|
||||
for (int i = 0; i < points.size(); ++i)
|
||||
{
|
||||
const auto &p1 = points.at(i);
|
||||
for (int j = i + 1; j < points.size(); ++j)
|
||||
{
|
||||
auto p2 = points.at(j);
|
||||
if (qFuzzyCompare(p1, p2))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Building '" << m_name << "' -> "
|
||||
<< "Polygon point " << i << " (" << p1 << ") and " << j << " (" << p2
|
||||
<< ") in room " << roomId << ", " << type << "[" << idx
|
||||
<< "], element[" << subIdx << "] are the same! -> REMOVE";
|
||||
if (!idxToRemove.contains(j))
|
||||
idxToRemove.push_back(j);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// std::sort works with QVector :-)
|
||||
std::sort(idxToRemove.begin(), idxToRemove.end(), std::greater<int>());
|
||||
|
||||
int numberOfRemoved = idxToRemove.size();
|
||||
|
||||
// remove from end/high to beginning/low :-)
|
||||
for (auto idxRemove : idxToRemove)
|
||||
points.removeAt(idxRemove);
|
||||
|
||||
return numberOfRemoved;
|
||||
}
|
||||
|
||||
Room Building::room(int roomId)
|
||||
{
|
||||
auto it = m_rooms.find(roomId);
|
||||
if (it == m_rooms.end())
|
||||
return {};
|
||||
return *it;
|
||||
}
|
||||
|
||||
// calculated values
|
||||
int Building::damagePercent() const
|
||||
{
|
||||
double roomDamagePercent = 0.0;
|
||||
for (const Room &room : m_rooms)
|
||||
roomDamagePercent += room.damagePercent();
|
||||
|
||||
return qRound(roomDamagePercent / m_rooms.size());
|
||||
}
|
||||
|
||||
QVector<HitRoom> Building::roomStates() const
|
||||
{
|
||||
QVector<HitRoom> ret;
|
||||
ret.reserve(m_rooms.size() / 2);
|
||||
for (const Room &room : m_rooms)
|
||||
{
|
||||
const int dmgPercent = qRound(room.damagePercent());
|
||||
// if ((dmgPercent > 0 && damageState() != DamageState::Destroyed) || !qFuzzyCompare(room.fortifyFactor(), 1.0))
|
||||
// {
|
||||
HitRoom hr;
|
||||
hr.roomId = room.id();
|
||||
hr.damagePercent = dmgPercent;
|
||||
hr.remainingEffectPercent = qRound(room.remainingEffect() * 100);
|
||||
hr.fortifyFactor = room.fortifyFactor();
|
||||
hr.directHit = room.isDirectHit();
|
||||
ret += hr;
|
||||
DEBUG_LOG(m_logger) << "HitRoom " << hr.roomId
|
||||
<< " damage: " << hr.damagePercent
|
||||
<< "%, remainEffect: " << hr.remainingEffectPercent << "%"
|
||||
<< ", remainingEffectChargeTypeId: " << hr.remainingEffectChargeTypeId << "%"
|
||||
<< ", fortifyFactor: " << hr.fortifyFactor
|
||||
<< ", isDirectHit:" << room.isDirectHit();
|
||||
// }
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
DamageState Building::damageState() const
|
||||
{
|
||||
if (Building::damagePercent() >= Settings::killThreshold())
|
||||
return DamageState::Destroyed;
|
||||
return DamageState::NoDamage;
|
||||
}
|
||||
|
||||
// effects on building
|
||||
void Building::init()
|
||||
{
|
||||
for (Room &room : m_rooms)
|
||||
initRoom(room);
|
||||
}
|
||||
|
||||
void Building::destroyAllRooms()
|
||||
{
|
||||
for (Room &room : m_rooms)
|
||||
destroyRoom(room);
|
||||
}
|
||||
|
||||
void Building::setRoomState(DamageState damageState, const QVector<int> &afffectedRooms)
|
||||
{
|
||||
for (const int roomId : afffectedRooms)
|
||||
{
|
||||
auto it = m_rooms.find(roomId);
|
||||
if (it == m_rooms.end())
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Could not find room with id " << roomId;
|
||||
continue;
|
||||
}
|
||||
if (damageState == DamageState::Destroyed)
|
||||
destroyRoom(it.value());
|
||||
else
|
||||
initRoom(it.value());
|
||||
}
|
||||
}
|
||||
|
||||
void Building::setFortifyInfo(const QVector<FortifyInfo> &foritfyInfos)
|
||||
{
|
||||
for (const FortifyInfo &info : foritfyInfos)
|
||||
{
|
||||
auto it = m_rooms.find(info.roomId);
|
||||
if (it == m_rooms.end())
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Could not find room with id " << info.roomId;
|
||||
continue;
|
||||
}
|
||||
Room &room = it.value();
|
||||
room.setFortifyFactor(info.fortifyFactor);
|
||||
}
|
||||
}
|
||||
|
||||
void Building::initRoom(Room &room) const
|
||||
{
|
||||
const double BGPL = m_buildingProtectionLevel;
|
||||
const double OWPL = m_outerWallProtectionLevel;
|
||||
const double EZPL = m_exclusionZoneProtectionLevel;
|
||||
|
||||
room.setRemainingEffect(0);
|
||||
room.setDirectHit(false);
|
||||
const double fortifyFactor = room.fortifyFactor();
|
||||
if (room.outerWalls().isEmpty())
|
||||
{
|
||||
// create a dummy wall for internal rooms
|
||||
room.outerWalls() += OuterWall();
|
||||
}
|
||||
for (OuterWall &ow : room.outerWalls())
|
||||
{
|
||||
if (ow.isDummyWall())
|
||||
{
|
||||
// see chapter 3.5
|
||||
ow.setInitalProtection(250 * fortifyFactor, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
const double OWPF = ow.protectiveFactor();
|
||||
const double SG_0_Wall = BGPL * OWPL * OWPF * fortifyFactor;
|
||||
ow.setInitalProtection(SG_0_Wall, true);
|
||||
|
||||
for (ExclusionZone &ez : ow.exclusionZones())
|
||||
{
|
||||
const double EZPF = ez.protectiveFactor();
|
||||
const double SG_0_EZ = BGPL * EZPL * EZPF * fortifyFactor;
|
||||
ez.setInitalProtection(SG_0_EZ, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Building::destroyRoom(Room &room)
|
||||
{
|
||||
room.setRemainingEffect(1); // 0..1
|
||||
for (OuterWall &ow : room.outerWalls())
|
||||
{
|
||||
ow.setProtection(0);
|
||||
for (ExclusionZone &ez : ow.exclusionZones())
|
||||
ez.setProtection(0);
|
||||
}
|
||||
}
|
||||
|
||||
bool Building::hit(const LtsUtils::QPoint3D &pos, const LtsUtils::QPoint3D &dir, Charge charge, HitPosition *preCalculatedHitPosition)
|
||||
{
|
||||
for (Room &room : m_rooms)
|
||||
room.setDirectHit(false);
|
||||
|
||||
if (preCalculatedHitPosition)
|
||||
{
|
||||
m_lastHitPosition = *preCalculatedHitPosition; // 3DWirksim
|
||||
} else {
|
||||
// hit position berechnen
|
||||
m_lastHitPosition = Math::getHitPosition(pos, dir, m_rooms);
|
||||
}
|
||||
|
||||
// Hack Unterirdisch:
|
||||
const bool bBelowGround = isLastHitPositionBelowGroundHack();
|
||||
if (bBelowGround)
|
||||
{
|
||||
INFO_LOG(m_logger) << " XXXX CES belowGround, reduce charge: " << charge;
|
||||
charge.destructiveFactor *= 0.25;
|
||||
charge.penetrationEffect *= 0.25;
|
||||
INFO_LOG(m_logger) << " XXXX CES belowGround, reduce charge: " << charge;
|
||||
}
|
||||
|
||||
|
||||
INFO_LOG(m_logger) << "XXXXX HitPosition: state=" << m_lastHitPosition.state
|
||||
<< ", m_name=" << m_name
|
||||
<< ", m_modelId=" << m_modelId
|
||||
<< ", roomId=" << m_lastHitPosition.roomId
|
||||
<< ", outerWallIndex=" << m_lastHitPosition.outerWallIdx
|
||||
<< ", exclusionZoneIndex=" << m_lastHitPosition.exclusionZoneIdx
|
||||
<< ", bBelowGround=" << bBelowGround;
|
||||
|
||||
// nicht getroffen -> return
|
||||
if (m_lastHitPosition.state == HitPosition::State::NoHit)
|
||||
return false;
|
||||
// zugehörigen Raum suchen
|
||||
Room &hitRoom = m_rooms[m_lastHitPosition.roomId];
|
||||
if (!hitRoom.isValid())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Internal error in hit calculation - could not find room with id " << m_lastHitPosition.roomId;
|
||||
return false;
|
||||
}
|
||||
|
||||
// GUEZE-1013 Kundenrückläufer Bldg 1158
|
||||
// 3 REF_MODs für Raum 101 @ Bldg 1158: 11001, 11022, 11029
|
||||
// Bei allen 3 wird die Trefferlinie in der 2D-Lage dargestellt.
|
||||
// Bei 11022, 11029 wird die BuildingHitLineInfo im Bldg-Viewer angezeigt.
|
||||
// Die BuildingHitLineInfo für 11001 fehlt allerdings!!
|
||||
// Grund: Bei 11022, 29 wird eine OuterWall vom VWM detektiert.
|
||||
// Bei 11001 hingegen ist es eine ExclusionZone.
|
||||
// Bei der Weiterleitung vom VWM gibt es in der Raumliste ein Flag 'm_directHit',
|
||||
// welches eingeführt wurde mit r43258
|
||||
// Wir setzen dieses Flag nun unabhängig davon, ob der Raum via
|
||||
// Outerwall oder ExclusionZone getroffen wurde:
|
||||
hitRoom.setDirectHit(true);
|
||||
|
||||
// Implementation laut Dokument:
|
||||
// wir zerstören hier die Nachbarräume mit dem remainingEffect. Es werden alle
|
||||
// Nachbarschaftsbeziehungen berückichtigt, Abbruch ist wenn isEffectNegligible() true zurück liefert
|
||||
// vorher werden alle Räume dem 'Verwandschaftsgrad' nach durchlaufen. D.h. erst alle direkt angrenzenden
|
||||
// Räume, dann alle, die an diesen angegrenzt sind usw. Der Effekt geht immer nur von Vater zu Kind, nie
|
||||
// von Kind zu Vater oder Kind zu Kind.
|
||||
|
||||
// alten Remaining Effekt entfernen
|
||||
for (Room &room : m_rooms)
|
||||
room.setRemainingEffect(0);
|
||||
|
||||
// Remaining Effect auf andere Gebäudeteile berechnen (dafür ist die alte protection (SG_alt) nötig)
|
||||
const double remainingEffect = hitRoom.calcRemainingEffect(m_lastHitPosition, charge);
|
||||
hitRoom.setRemainingEffect(remainingEffect);
|
||||
// neue protection für getroffenen Raum berechnen und setzen
|
||||
hitRoom.updateProtectionDirectHit(m_lastHitPosition, charge);
|
||||
// neue protection für die anderen Elemente des getroffenen Raumes berechnen
|
||||
hitRoom.updateProtectionIndirectHit(m_lastHitPosition, charge, remainingEffect);
|
||||
// neue protection für die Nachbarräume berechnen
|
||||
const QMap<int, NeighbourRoom> &neighbours = hitRoom.neighbours();
|
||||
QMap<int, NeighboursToCheck> neighboursToCheck;
|
||||
QSet<int> currentGradeNeighbours;
|
||||
for (const NeighbourRoom &neighbour : neighbours)
|
||||
{
|
||||
neighboursToCheck.insert(neighbour.id(), NeighboursToCheck(neighbour, hitRoom.remainingEffect()));
|
||||
currentGradeNeighbours.insert(neighbour.id());
|
||||
}
|
||||
QSet<int> lowerGradeNeighbours;
|
||||
lowerGradeNeighbours.insert(hitRoom.id());
|
||||
|
||||
// DEBUG_LOG(m_logger) << " XXXXX start recursive ; neighboursToCheck= " << toString(neighboursToCheck);
|
||||
auto ret = checkHitNeighbours(neighboursToCheck, charge, currentGradeNeighbours, lowerGradeNeighbours);
|
||||
while (!ret.isEmpty())
|
||||
{
|
||||
// DEBUG_LOG(m_logger) << " XXXXX recursive ; ret= " << toString(ret);
|
||||
ret = checkHitNeighbours(ret, charge, currentGradeNeighbours, lowerGradeNeighbours);
|
||||
// currentGradeNeighbours will contain the new neighbours for the next grade
|
||||
// lowerGradeNeighbours will contain all currently lower grade neighbours now
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Building::isLastHitPositionBelowGroundHack() const
|
||||
{
|
||||
// Hack:
|
||||
return
|
||||
(m_name.contains(QStringLiteral("BN_Kanaele"))) ||
|
||||
(m_name.contains(QStringLiteral("U_Bahn")) && m_lastHitPosition.roomId < 2300)
|
||||
;
|
||||
}
|
||||
|
||||
QMap<int, Building::NeighboursToCheck> Building::checkHitNeighbours(const QMap<int, NeighboursToCheck> &neighbours,
|
||||
const Charge &charge,
|
||||
QSet<int> ¤tGradeNeighbours,
|
||||
QSet<int> &lowerGradeNeighbours)
|
||||
{
|
||||
// DEBUG_LOG(m_logger) << " neighbours " << toString(neighbours);
|
||||
// DEBUG_LOG(m_logger) << " currentGradeNeighbours " << toString(currentGradeNeighbours);
|
||||
// DEBUG_LOG(m_logger) << " lowerGradeNeighbours " << toString(currentGradeNeighbours);
|
||||
|
||||
QMap<int, NeighboursToCheck> neighboursToCheck;
|
||||
QSet<int> newCurrentGradeNeighbours;
|
||||
|
||||
for (const NeighboursToCheck &neighbourRoom : neighbours)
|
||||
{
|
||||
const int neighbourRoomId = neighbourRoom.room.id();
|
||||
|
||||
if (lowerGradeNeighbours.contains(neighbourRoomId)) // this should not happen
|
||||
continue;
|
||||
|
||||
auto itRoom = m_rooms.find(neighbourRoomId);
|
||||
if (itRoom == m_rooms.end())
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Could not find room with id " << neighbourRoomId;
|
||||
continue;
|
||||
}
|
||||
|
||||
Room &neighbour = itRoom.value();
|
||||
|
||||
// REGG-5736: "Die Wirkung von der KPZ-Kanone muss ein Gebäude nahezu komplett zerstören. Diese Wirkung wird zur Zeit nicht erreicht."
|
||||
double TF = Settings::transitionMultiplier() * neighbourRoom.room.transitionFactor();
|
||||
// GUEZE-605 / GUEZE-707: ..aber begrenzen auf 1. Ein WEITER-leitungswert größer ist unlogisch
|
||||
if (TF > 1.0)
|
||||
TF = 1.0;
|
||||
|
||||
// hitPos is not needed here but internally we use the same calculation for updateProtectionIndirectHit() ...
|
||||
if (!neighbour.updateProtectionNeighbourHit(m_lastHitPosition, charge, neighbourRoom.remainEffect, TF))
|
||||
continue;
|
||||
|
||||
// there was an effect on this room -> set remainEffect and add all next grade neighbours to the list for the next check
|
||||
const double oldRe = neighbour.remainingEffect();
|
||||
neighbour.setRemainingEffect(neighbourRoom.remainEffect * TF);
|
||||
DEBUG_LOG(m_logger) << "room " << neighbourRoomId << " remaining effect old: "
|
||||
<< oldRe << " -> new: " << neighbour.remainingEffect();
|
||||
// check grade2 neighbours, remove all lower grade neighbours
|
||||
|
||||
for (const NeighbourRoom &grade2Neighbour : qAsConst(neighbour.neighbours()))
|
||||
{
|
||||
if (lowerGradeNeighbours.contains(grade2Neighbour.id()) ||
|
||||
currentGradeNeighbours.contains(grade2Neighbour.id()))
|
||||
continue;
|
||||
// [GUEZE-605] / [GUEZE-707]
|
||||
// Problem: 701 hat in Etage 6 diverse Nachbarräume: 601, 602,... 610.
|
||||
// 603 hat aber auch 602 und 604 als Nachbarn.
|
||||
// Bei solch einer Konstellation wurden Räume mehrfach (bis zu 12 mal) eingefügt.
|
||||
// Und dementsprechend die Zerstörung mehrfach berechnet und akkumuliert.
|
||||
// Bei Bldg 3101 wurde 601 getroffen (50%) und 106 wurde (durch 12-fache Berechnung) zu 100% zerstört (!!!)
|
||||
auto it = neighboursToCheck.find(grade2Neighbour.id());
|
||||
if (it == neighboursToCheck.end())
|
||||
{
|
||||
neighboursToCheck.insert(grade2Neighbour.id(), NeighboursToCheck(grade2Neighbour, neighbour.remainingEffect()));
|
||||
} else {
|
||||
// check remainingEffect and use maximum
|
||||
const NeighboursToCheck &curEntry = it.value();
|
||||
if (neighbour.remainingEffect() > curEntry.remainEffect)
|
||||
neighboursToCheck.insert(grade2Neighbour.id(), NeighboursToCheck(grade2Neighbour, neighbour.remainingEffect()));
|
||||
}
|
||||
|
||||
|
||||
|
||||
newCurrentGradeNeighbours.insert(grade2Neighbour.id());
|
||||
}
|
||||
}
|
||||
lowerGradeNeighbours += currentGradeNeighbours;
|
||||
currentGradeNeighbours = newCurrentGradeNeighbours;
|
||||
|
||||
return neighboursToCheck;
|
||||
}
|
||||
|
||||
QString Building::buildingProperties() const
|
||||
{
|
||||
return m_buildingProperties;
|
||||
}
|
||||
|
||||
void Building::setBuildingProperties(const QString &buildingProperties)
|
||||
{
|
||||
m_buildingProperties = buildingProperties;
|
||||
}
|
||||
|
||||
QString Building::segmentProperties(const QString &hostname) const
|
||||
{
|
||||
return m_segmentProperties.value(hostname);
|
||||
}
|
||||
|
||||
void Building::setSegmentProperties(const QString &hostname, const QString &properties)
|
||||
{
|
||||
m_segmentProperties.insert(hostname, properties);
|
||||
}
|
||||
|
||||
int Building::checkDublicatePointsInPolygon(int roomId, int idx, int subIdx, const char *type,
|
||||
const QVector<LtsUtils::QPoint3D> &points) const
|
||||
{
|
||||
int numberOfDuplicates = 0;
|
||||
for (int i = 0; i < points.size(); ++i)
|
||||
{
|
||||
const auto &p1 = points.at(i);
|
||||
for (int j = i + 1; j < points.size(); ++j)
|
||||
{
|
||||
const auto &p2 = points.at(j);
|
||||
if (qFuzzyCompare(p1, p2))
|
||||
{
|
||||
++numberOfDuplicates;
|
||||
WARNING_LOG(m_logger) << "Building '" << m_name << "' -> "
|
||||
<< "Polygon point " << i << " (" << p1 << ") and " << j << " (" << p2
|
||||
<< ") in room " << roomId << ", " << type << "[" << idx
|
||||
<< "], element[" << subIdx << "] are the same! (size=" << points.size() << ")";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (numberOfDuplicates > 0)
|
||||
for (auto point : points)
|
||||
WARNING_LOG(m_logger) << "Building '" << m_name << "' -> " << "point =" << point << " (same points)";
|
||||
return numberOfDuplicates;
|
||||
}
|
||||
|
||||
QString Building::toString(const QVector<Building::NeighboursToCheck> &cont)
|
||||
{
|
||||
QString str;
|
||||
for (auto item : cont)
|
||||
str += QString(QStringLiteral("%1;")).arg(item.room.id());
|
||||
return str;
|
||||
}
|
||||
QString Building::toString(const QMap<int, Building::NeighboursToCheck> &cont)
|
||||
{
|
||||
QString str;
|
||||
for (auto item : cont)
|
||||
str += QString(QStringLiteral("%1;")).arg(item.room.id());
|
||||
return str;
|
||||
}
|
||||
QString Building::toString(const QSet<int> &cont)
|
||||
{
|
||||
QString str;
|
||||
for (auto item : cont)
|
||||
str += QString(QStringLiteral("%1;")).arg(item);
|
||||
return str;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// class MakePlanar
|
||||
//
|
||||
MakePlanar::MakePlanar(const QVector<LtsUtils::QPoint3D> &poly)
|
||||
: m_poly(poly)
|
||||
{
|
||||
ranges.resize(3);
|
||||
}
|
||||
|
||||
QVector<LtsUtils::QPoint3D> MakePlanar::calculate(bool *bMakePlanarDone)
|
||||
{
|
||||
// Folgende Polygon hat eine Abweichung bei 17cm:
|
||||
// 2.859 - 2.689 = 0.17
|
||||
// static const QVector<LtsUtils::QPoint3D> polyBldg1131_201_3({ // sollte eigentlich waagerechte Wand darstellen
|
||||
// {0.000, 5.987, 2.689}, // idx=0
|
||||
// {0.000, 5.791, 2.695}, // idx=1 // idx=1 "stört"
|
||||
// {0.000, 0.170, 2.859}, // idx=2
|
||||
// {3.098, 0.170, 2.859}, // idx=3
|
||||
// {3.098, 5.791, 2.695}, // idx=4
|
||||
// {2.928, 5.987, 2.689} // idx=5
|
||||
// });
|
||||
|
||||
if (ratioOfSmallestAndBiggestDimension() >= 10.0
|
||||
&& getRange(m_smallestDim).range() < 0.20
|
||||
)
|
||||
{
|
||||
// const int numCoords = m_poly.size();
|
||||
makePlanar();
|
||||
if (bMakePlanarDone)
|
||||
{
|
||||
*bMakePlanarDone = true;
|
||||
// std::cout << " MakePlanar smallestRange=_" << getRange(m_smallestDim).range() << "_ ratio=" << m_ratio << " org-numCoords=" << numCoords << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
return m_poly;
|
||||
}
|
||||
|
||||
double MakePlanar::ratioOfSmallestAndBiggestDimension()
|
||||
{
|
||||
// m_poly describes an area. Maybe the area is not planar.
|
||||
// So for this use case, 4 items are required
|
||||
if (m_poly.size() < 4)
|
||||
return -1;
|
||||
|
||||
MyRange &rangeX = ranges[static_cast<int>(DIMENSION::X)];
|
||||
MyRange &rangeY = ranges[static_cast<int>(DIMENSION::Y)];
|
||||
MyRange &rangeZ = ranges[static_cast<int>(DIMENSION::Z)];
|
||||
|
||||
// Note: first() required at least an item:
|
||||
rangeX.min = m_poly.first().x(); rangeX.max = m_poly.first().x();
|
||||
rangeY.min = m_poly.first().y(); rangeY.max = m_poly.first().y();
|
||||
rangeZ.min = m_poly.first().z(); rangeZ.max = m_poly.first().z();
|
||||
for (const LtsUtils::QPoint3D &pnt : qAsConst(m_poly))
|
||||
{
|
||||
rangeX.min = std::min(rangeX.min, pnt.x());
|
||||
rangeX.max = std::max(rangeX.max, pnt.x());
|
||||
|
||||
rangeY.min = std::min(rangeY.min, pnt.y());
|
||||
rangeY.max = std::max(rangeY.max, pnt.y());
|
||||
|
||||
rangeZ.min = std::min(rangeZ.min, pnt.z());
|
||||
rangeZ.max = std::max(rangeZ.max, pnt.z());
|
||||
}
|
||||
|
||||
if (rangeY.range() < rangeX.range())
|
||||
m_smallestDim = DIMENSION::Y;
|
||||
if (rangeZ.range() < getRange(m_smallestDim).range())
|
||||
m_smallestDim = DIMENSION::Z;
|
||||
|
||||
if (rangeY.range() > rangeX.range())
|
||||
m_biggistDim = DIMENSION::Y;
|
||||
if (rangeZ.range() > getRange(m_biggistDim).range())
|
||||
m_biggistDim = DIMENSION::Z;
|
||||
|
||||
// avoid division by zero
|
||||
if (!qFuzzyIsNull(getRange(m_smallestDim).range()))
|
||||
m_ratio = getRange(m_biggistDim).range() / getRange(m_smallestDim).range();
|
||||
|
||||
return m_ratio; // could be inf / inifite
|
||||
}
|
||||
|
||||
void MakePlanar::makePlanar()
|
||||
{
|
||||
// choose new value:
|
||||
const double newValue = (getRange(m_smallestDim).min + getRange(m_smallestDim).max) / 2.0;
|
||||
|
||||
switch (m_smallestDim)
|
||||
{
|
||||
case DIMENSION::X:
|
||||
for (LtsUtils::QPoint3D &pnt_ref : m_poly)
|
||||
pnt_ref.rx() = newValue;
|
||||
break;
|
||||
case DIMENSION::Y:
|
||||
for (LtsUtils::QPoint3D &pnt_ref : m_poly)
|
||||
pnt_ref.ry() = newValue;
|
||||
break;
|
||||
case DIMENSION::Z:
|
||||
for (LtsUtils::QPoint3D &pnt_ref : m_poly)
|
||||
pnt_ref.rz() = newValue;
|
||||
break;
|
||||
case DIMENSION::Undefined:
|
||||
{ // empty
|
||||
}
|
||||
} // switch
|
||||
}
|
||||
|
||||
void wallElementToBottomLeftTopRight3D(const WallElement &wallElement,
|
||||
LtsUtils::QPoint3D &bottomLeftOut,
|
||||
LtsUtils::QPoint3D &topRightOut)
|
||||
{
|
||||
const LtsUtils::QPoint3D &frontItem = wallElement.front();
|
||||
bottomLeftOut = frontItem;
|
||||
topRightOut = frontItem;
|
||||
for (auto coord : qAsConst(wallElement))
|
||||
{
|
||||
if (coord.x() < bottomLeftOut.x())
|
||||
bottomLeftOut.setX(coord.x());
|
||||
if (coord.y() < bottomLeftOut.y())
|
||||
bottomLeftOut.setY(coord.y());
|
||||
if (coord.z() < bottomLeftOut.z())
|
||||
bottomLeftOut.setZ(coord.z());
|
||||
|
||||
if (coord.x() > topRightOut.x())
|
||||
topRightOut.setX(coord.x());
|
||||
if (coord.y() > topRightOut.y())
|
||||
topRightOut.setY(coord.y());
|
||||
if (coord.z() > topRightOut.z())
|
||||
topRightOut.setZ(coord.z());
|
||||
}
|
||||
}
|
||||
|
||||
LtsUtils::QPoint3D centerOfWallElement3D(const WallElement &wallElement)
|
||||
{
|
||||
LtsUtils::QPoint3D bottomLeftOut, topRightOut;
|
||||
wallElementToBottomLeftTopRight3D(wallElement, bottomLeftOut, topRightOut);
|
||||
|
||||
const LtsUtils::QPoint3D ¢er = (bottomLeftOut + topRightOut) / 2;
|
||||
return center;
|
||||
}
|
||||
|
||||
|
||||
} // namespace VWM
|
||||
} // namespace BuildingControlUnit
|
||||
@@ -0,0 +1,323 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Building VWM info
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLSA, 2017-01-15
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QString>
|
||||
#include <QMap>
|
||||
#include <QVector>
|
||||
#include <LtsUtilsCore/qpoint3d.h>
|
||||
#include <logger.h>
|
||||
#include "vwm_types.h"
|
||||
#include <VWM/buildingcontrolvwm_export.h>
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace VWM
|
||||
{
|
||||
//
|
||||
// class NeighbourRoom
|
||||
//
|
||||
class NeighbourRoom
|
||||
{
|
||||
public:
|
||||
void setId(int id) { m_id = id; }
|
||||
int id() const { return m_id; }
|
||||
|
||||
void setTransitionFactor(double transitionFactor) { m_transitionFactor = transitionFactor; }
|
||||
double transitionFactor() const { return m_transitionFactor; }
|
||||
|
||||
private:
|
||||
// static data from config
|
||||
int m_id = 0;
|
||||
double m_transitionFactor = 0;
|
||||
};
|
||||
|
||||
using WallElement = QVector<LtsUtils::QPoint3D>;
|
||||
using ExclusionZoneElement = QVector<LtsUtils::QPoint3D>;
|
||||
|
||||
// some helper functions
|
||||
void wallElementToBottomLeftTopRight3D(const WallElement &wallElement,
|
||||
LtsUtils::QPoint3D &bottomLeftOut,
|
||||
LtsUtils::QPoint3D &topRightOut);
|
||||
LtsUtils::QPoint3D centerOfWallElement3D(const WallElement &wallElement);
|
||||
|
||||
//
|
||||
// class WallExclusionZoneBase
|
||||
//
|
||||
class WallExclusionZoneBase
|
||||
{
|
||||
public:
|
||||
// from config
|
||||
void setProtectiveFactor(double protectiveFactor) { m_protectiveFactor = protectiveFactor; }
|
||||
double protectiveFactor() const { return m_protectiveFactor; }
|
||||
|
||||
// calculated from config
|
||||
void setInitalProtection(double initialProtection, bool bResetProtection);
|
||||
double initialProtection() const { return m_initialProtection; }
|
||||
double protectionPercent() const {
|
||||
if (m_initialProtection<=0.0)
|
||||
return 0.0; // avoid nan (not-a-number)
|
||||
return m_protection / m_initialProtection * 100;
|
||||
} // for debug purposes
|
||||
|
||||
// calculated on hit
|
||||
void updateProtection(const double RW, const double ZF, const double TF);
|
||||
void setProtection(double protection) { m_protection = protection; }
|
||||
double protection() const { return m_protection; }
|
||||
|
||||
protected:
|
||||
WallExclusionZoneBase() = default;
|
||||
|
||||
// static data from config
|
||||
double m_protectiveFactor = 0;
|
||||
// initial data (Wall: BGPL * OWPL * OWPF, ExclusionZone: BGPL * EZPL * EZPF)
|
||||
double m_initialProtection = 0;
|
||||
|
||||
// calculated data
|
||||
double m_protection = 0;
|
||||
};
|
||||
|
||||
//
|
||||
// class ExclusionZone
|
||||
//
|
||||
class ExclusionZone : public WallExclusionZoneBase
|
||||
{
|
||||
public:
|
||||
QVector<ExclusionZoneElement> &elements() { return m_elements; }
|
||||
const QVector<ExclusionZoneElement> &elements() const { return m_elements; }
|
||||
|
||||
private:
|
||||
QVector<ExclusionZoneElement> m_elements;
|
||||
};
|
||||
|
||||
//
|
||||
// class OuterWall
|
||||
//
|
||||
class OuterWall : public WallExclusionZoneBase
|
||||
{
|
||||
public:
|
||||
QVector<WallElement> &elements() { return m_elements; }
|
||||
const QVector<WallElement> &elements() const { return m_elements; }
|
||||
|
||||
QVector<ExclusionZone> &exclusionZones() { return m_exclusionZones; }
|
||||
const QVector<ExclusionZone> &exclusionZones() const { return m_exclusionZones; }
|
||||
|
||||
bool isDummyWall() const { return m_elements.isEmpty(); }
|
||||
private:
|
||||
QVector<ExclusionZone> m_exclusionZones;
|
||||
QVector<WallElement> m_elements;
|
||||
};
|
||||
|
||||
//
|
||||
// class Room
|
||||
//
|
||||
class Room
|
||||
{
|
||||
public:
|
||||
void setId(int id) { m_id = id; }
|
||||
int id() const { return m_id; }
|
||||
bool isValid() const { return m_id != 0; }
|
||||
bool isDirectHit() const { return m_directHit; }
|
||||
void setDirectHit(bool directHit) { m_directHit = directHit; }
|
||||
|
||||
QMap<int, NeighbourRoom> &neighbours() { return m_neighbours; }
|
||||
const QMap<int, NeighbourRoom> &neighbours() const { return m_neighbours; }
|
||||
|
||||
QVector<OuterWall> &outerWalls() { return m_outerWalls; }
|
||||
const QVector<OuterWall> &outerWalls() const { return m_outerWalls; }
|
||||
|
||||
// Verstärkte Räume
|
||||
void setFortifyFactor(double factorNew, bool bRecalcValues = true);
|
||||
double fortifyFactor() const { return m_fortifyFactor; }
|
||||
|
||||
// calculated values
|
||||
double damagePercent() const; // TODO: cache calculated value?
|
||||
void setRemainingEffect(double remainingEffect) { m_remainingEffect = remainingEffect; }
|
||||
double remainingEffect() const { return m_remainingEffect; }
|
||||
// effect calculation
|
||||
double calcRemainingEffect(const HitPosition &hitPos, const Charge &ammu) const;
|
||||
void updateProtectionDirectHit(const HitPosition &hitPos, const Charge &ammu);
|
||||
void updateProtectionIndirectHit(const HitPosition &hitPos, const Charge &ammu, double remainingEffect);
|
||||
// returns false when the calculated effect is too low for a real change
|
||||
bool updateProtectionNeighbourHit(const HitPosition &hitPos, const Charge &ammu, double remainingEffect, double transitionFactor);
|
||||
|
||||
// effects on Room
|
||||
void init();
|
||||
void destroy();
|
||||
|
||||
private:
|
||||
// static data from config
|
||||
int m_id = 0;
|
||||
double m_remainingEffect = 0;
|
||||
QMap<int, NeighbourRoom> m_neighbours;
|
||||
QVector<OuterWall> m_outerWalls;
|
||||
// dynamic data from excon
|
||||
double m_fortifyFactor = 1.0;
|
||||
bool m_directHit = false;
|
||||
|
||||
double protectionForHitPosition(const HitPosition &hitPos) const;
|
||||
void setProtectionForHitPosition(const HitPosition &hitPos, double SG_neu);
|
||||
static double calcRemainingEffect(double SG_alt, double ZF, double WF);
|
||||
};
|
||||
|
||||
// exported for test xml reader
|
||||
class BUILDINGCONTROLVWM_EXPORT Building
|
||||
{
|
||||
public:
|
||||
Building();
|
||||
|
||||
int cleanupPolygons();
|
||||
// used for xml file testing
|
||||
int checkPolygons();
|
||||
|
||||
QString name() const { return m_name; }
|
||||
void setName(const QString &name) { m_name = name; }
|
||||
|
||||
int modelId() const { return m_modelId; }
|
||||
void setModelId(int modelId) { m_modelId = modelId; }
|
||||
|
||||
double buildingProtectionLevel() const { return m_buildingProtectionLevel; }
|
||||
void setBuildingProtectionLevel(double buildingProtectionLevel) { m_buildingProtectionLevel = buildingProtectionLevel; }
|
||||
|
||||
int exclusionZoneProtectionLevel() const { return m_exclusionZoneProtectionLevel; }
|
||||
void setExclusionZoneProtectionLevel(int exclusionZoneProtectionLevel) { m_exclusionZoneProtectionLevel = exclusionZoneProtectionLevel; }
|
||||
|
||||
int outerWallProtectionLevel() const { return m_outerWallProtectionLevel; }
|
||||
void setOuterWallProtectionLevel(int outerWallProtectionLevel) { m_outerWallProtectionLevel = outerWallProtectionLevel; }
|
||||
|
||||
Room room(int roomId);
|
||||
QMap<int, Room> &rooms() { return m_rooms; }
|
||||
const QMap<int, Room> &rooms() const { return m_rooms; }
|
||||
|
||||
// calculated values
|
||||
int damagePercent() const;
|
||||
QVector<HitRoom> roomStates() const;
|
||||
DamageState damageState() const;
|
||||
|
||||
// effects on building
|
||||
void init();
|
||||
void destroyAllRooms();
|
||||
void setRoomState(DamageState damageState, const QVector<int> &afffectedRooms);
|
||||
void setFortifyInfo(const QVector<FortifyInfo> &foritfyInfos);
|
||||
bool hit(const LtsUtils::QPoint3D &pos, const LtsUtils::QPoint3D &dir, Charge charge, HitPosition *preCalculatedHitPosition = nullptr);
|
||||
const HitPosition &lastHitPosition() const { return m_lastHitPosition; }
|
||||
bool isLastHitPositionBelowGroundHack() const;
|
||||
|
||||
QString segmentProperties(const QString &hostname) const;
|
||||
void setSegmentProperties(const QString &hostname, const QString &properties);
|
||||
const QMap<QString, QString> segmentPropertyMap() const { return m_segmentProperties; }
|
||||
void clearSegmentProperties() { m_segmentProperties.clear(); }
|
||||
|
||||
QString buildingProperties() const;
|
||||
void setBuildingProperties(const QString &buildingProperties);
|
||||
|
||||
private:
|
||||
void initRoom(Room &room) const;
|
||||
static void destroyRoom(Room &room);
|
||||
int checkDublicatePointsInPolygon(int roomId, int idx, int subIdx, const char *type,
|
||||
const QVector<LtsUtils::QPoint3D> &points) const;
|
||||
int cleanupDublicatePointsInPolygon(int roomId, int idx, int subIdx, const char *type,
|
||||
QVector<LtsUtils::QPoint3D> &points) const;
|
||||
struct NeighboursToCheck
|
||||
{
|
||||
NeighbourRoom room;
|
||||
double remainEffect = 0;
|
||||
NeighboursToCheck() = default;
|
||||
NeighboursToCheck(const NeighbourRoom &r, double re)
|
||||
: room(r), remainEffect(re)
|
||||
{}
|
||||
};
|
||||
|
||||
// for debugging purpose
|
||||
static QString toString(const QVector<Building::NeighboursToCheck> &cont);
|
||||
static QString toString(const QMap<int, Building::NeighboursToCheck> &cont);
|
||||
static QString toString(const QSet<int> &cont);
|
||||
|
||||
QMap<int, NeighboursToCheck> checkHitNeighbours(const QMap<int, NeighboursToCheck> &neighbours,
|
||||
const Charge &charge,
|
||||
QSet<int> ¤tGradeNeighbours,
|
||||
QSet<int> &lowerGradeNeighbours);
|
||||
private:
|
||||
// static data from config
|
||||
QString m_name;
|
||||
int m_modelId{0};
|
||||
double m_buildingProtectionLevel{0.0};
|
||||
int m_exclusionZoneProtectionLevel{0};
|
||||
int m_outerWallProtectionLevel{0};
|
||||
QMap<int, Room> m_rooms;
|
||||
|
||||
QString m_buildingProperties;
|
||||
QMap<QString, QString> m_segmentProperties; // By Hostname;
|
||||
|
||||
HitPosition m_lastHitPosition; // for debug purposes
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
|
||||
//
|
||||
// class MakePlanar
|
||||
//
|
||||
|
||||
/*!
|
||||
* \brief The MakePlanar class takes points and makes them planar
|
||||
* "Polylines" of VWM (like bldg_1101.flt.VWM_Building.xml) are sometimes not planar.
|
||||
* That is difficult/impossible for the further steps
|
||||
* So here (or at getCoordsForPlane) we try to make (most) walls planar
|
||||
*/
|
||||
class BUILDINGCONTROLVWM_EXPORT MakePlanar
|
||||
{
|
||||
public:
|
||||
|
||||
// helper #1
|
||||
enum class DIMENSION
|
||||
{
|
||||
Undefined = -1,
|
||||
X = 0,
|
||||
Y = 1,
|
||||
Z = 2
|
||||
};
|
||||
|
||||
// helper #2
|
||||
struct MyRange
|
||||
{
|
||||
double min{0.0};
|
||||
double max{0.0};
|
||||
double range() const { return fabs(max - min); } // keep neg values in mind
|
||||
};
|
||||
|
||||
|
||||
// ctor
|
||||
explicit MakePlanar(const QVector<LtsUtils::QPoint3D> &poly);
|
||||
|
||||
QVector<LtsUtils::QPoint3D> calculate(bool *bMakePlanarDone = nullptr);
|
||||
|
||||
QVector<LtsUtils::QPoint3D> getPoly() const { return m_poly; }
|
||||
double getRatio() const { return m_ratio; }
|
||||
double getSmallestRange() const { return getRange(m_smallestDim).range(); }
|
||||
DIMENSION getSmallestDim() const { return m_smallestDim; }
|
||||
|
||||
protected:
|
||||
const MyRange &getRange(DIMENSION dim) const { return ranges[static_cast<int>(dim)]; }
|
||||
|
||||
double ratioOfSmallestAndBiggestDimension();
|
||||
void makePlanar();
|
||||
|
||||
private:
|
||||
QVector<LtsUtils::QPoint3D> m_poly;
|
||||
std::vector<MyRange> ranges;
|
||||
DIMENSION m_smallestDim{DIMENSION::X};
|
||||
DIMENSION m_biggistDim{DIMENSION::X};
|
||||
double m_ratio{0.0};
|
||||
}; // class MakePlanar
|
||||
|
||||
|
||||
} // namespace VWM
|
||||
} // namespace BuildingControlUnit
|
||||
|
||||
+203
@@ -0,0 +1,203 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Building VWM info
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLSA, 2017-01-15
|
||||
*/
|
||||
|
||||
#include "vwm_building_room_geometry.h"
|
||||
#include "bcu_xml_reader.h"
|
||||
|
||||
#include <LtsUtilsCore/qpoint3d.h>
|
||||
#include <QDebug>
|
||||
#include <algorithm>
|
||||
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace VWM
|
||||
{
|
||||
|
||||
BuildingRoomGeometry::BuildingRoomGeometry()
|
||||
: m_logger(BuildingControlUnit::getLogger("VWM.BuildingRoomGeometry"))
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
}
|
||||
|
||||
BuildingRoomGeometry::~BuildingRoomGeometry()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
}
|
||||
|
||||
bool BuildingRoomGeometry::init(const QDomElement &domRoot)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
|
||||
parse(domRoot);
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
QVector<int> BuildingRoomGeometry::pointIsInWhichRooms(const LtsUtils::QPoint3D &pointToFind)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START, pointToFind" << pointToFind
|
||||
<< ", m_roomOutlines.size() " << m_roomOutlines.size();
|
||||
|
||||
QVector<int> roomtIds;
|
||||
|
||||
QMapIterator<int, RoomOutlineData> it(m_roomOutlines);
|
||||
while (it.hasNext())
|
||||
{
|
||||
it.next();
|
||||
const int roomId = it.key();
|
||||
const RoomOutlineData &rod = it.value();
|
||||
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " check room " << roomId << " (check maxZ " << rod.maxZ << " ; minZ " << rod.minZ;
|
||||
if (m_logger.isDebugEnabled())
|
||||
qCritical() << " check room " << roomId << ", outline: " << rod.outline;
|
||||
|
||||
|
||||
if (rod.outline.containsPoint( {pointToFind.x(), pointToFind.y()}, Qt::OddEvenFill))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " within room " << roomId;
|
||||
|
||||
if ((rod.maxZ > pointToFind.z()) &&
|
||||
(pointToFind.z() > rod.minZ))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " found roomId: " << roomId
|
||||
<< " pointToFind: " << pointToFind.x() << " , " << pointToFind.y();
|
||||
roomtIds.append(roomId);
|
||||
}
|
||||
}
|
||||
} // while
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END, roomtIds.size() " << roomtIds.size();
|
||||
return roomtIds;
|
||||
}
|
||||
|
||||
static QDomElement getChildElement(const QDomElement &parent, const QString &childTag, bool bThrow = true)
|
||||
{
|
||||
const QDomElement ret = parent.firstChildElement(childTag);
|
||||
if (ret.isNull() && bThrow)
|
||||
throw BuildingControlUnit::XmlReaderException(QStringLiteral("Invalid XML Structure - no '%1' tag").arg(childTag));
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int getInteger(const QDomElement &element, const QString &attribute)
|
||||
{
|
||||
bool bOk = true;
|
||||
const int ret = element.attribute(attribute).toInt(&bOk);
|
||||
if (!bOk)
|
||||
throw BuildingControlUnit::XmlReaderException(QStringLiteral("Can not find attribute %1 in xml element %2 (line %3:%4)")
|
||||
.arg(attribute, element.tagName()).arg(element.lineNumber()).arg(element.columnNumber()));
|
||||
return ret;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
static inline T positionFromElement(const QDomElement &elem)
|
||||
{
|
||||
return T(elem.attribute(QStringLiteral("X")).toDouble(),
|
||||
elem.attribute(QStringLiteral("Y")).toDouble(),
|
||||
elem.attribute(QStringLiteral("Z")).toDouble());
|
||||
}
|
||||
|
||||
static inline bool checkRange(double d)
|
||||
{
|
||||
return (fabs(d) < 10000000);
|
||||
}
|
||||
static inline LtsUtils::QPoint3D positionFromElement(const QDomElement &elem)
|
||||
{
|
||||
bool bOkX, bOkY, bOkZ;
|
||||
auto ret (LtsUtils::QPoint3D(elem.attribute(QStringLiteral("X")).toDouble(&bOkX),
|
||||
elem.attribute(QStringLiteral("Y")).toDouble(&bOkY),
|
||||
elem.attribute(QStringLiteral("Z")).toDouble(&bOkZ)));
|
||||
if (!bOkX || !checkRange(ret.x()))
|
||||
throw BuildingControlUnit::XmlReaderException(QStringLiteral("invalid value for X: %1 (line %2:%3)")
|
||||
.arg(elem.attribute(QStringLiteral("X"))).arg(elem.lineNumber()).arg(elem.columnNumber()));
|
||||
if (!bOkY || !checkRange(ret.y()))
|
||||
throw BuildingControlUnit::XmlReaderException(QStringLiteral("invalid value for Y: %1 (line %2:%3)")
|
||||
.arg(elem.attribute(QStringLiteral("Y"))).arg(elem.lineNumber()).arg(elem.columnNumber()));
|
||||
if (!bOkZ || !checkRange(ret.z()))
|
||||
throw BuildingControlUnit::XmlReaderException(QStringLiteral("invalid value for Z: %1 (line %2:%3)")
|
||||
.arg(elem.attribute(QStringLiteral("Z"))).arg(elem.lineNumber()).arg(elem.columnNumber()));
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
bool BuildingRoomGeometry::parse(const QDomElement &domGroup)
|
||||
{
|
||||
NGL::INGLLogger &loggerParse = BuildingControlUnit::getLogger("VWM.BuildingRoomGeometry.parse");
|
||||
|
||||
QDomElement domGroup1 = getChildElement(domGroup, QStringLiteral("Group"));
|
||||
for ( ; !domGroup1.isNull(); domGroup1 = domGroup1.nextSiblingElement(domGroup1.tagName()))
|
||||
{
|
||||
const QDomElement nameElement = getChildElement(domGroup1, QStringLiteral("Name"), false);
|
||||
DEBUG_LOG(loggerParse) << " * nameElement: " << nameElement.text();
|
||||
|
||||
QDomElement domSwitch = getChildElement(domGroup1, QStringLiteral("Switch"), false);
|
||||
for ( ; !domSwitch.isNull(); domSwitch = domSwitch.nextSiblingElement(domSwitch.tagName()))
|
||||
{
|
||||
const QDomElement roomNameElement = getChildElement(domSwitch, QStringLiteral("Name"), false);
|
||||
DEBUG_LOG(loggerParse) << " ** roomNameElement: " << roomNameElement.text();
|
||||
|
||||
const int roomId = getInteger(getChildElement(domSwitch, QStringLiteral("SubId")), QStringLiteral("ID"));
|
||||
DEBUG_LOG(loggerParse) << " ** roomId: " << roomId;
|
||||
|
||||
QDomElement domGroup2 = getChildElement(domSwitch, QStringLiteral("Group"), false);
|
||||
for ( ; !domGroup2.isNull(); domGroup2 = domGroup2.nextSiblingElement(domGroup2.tagName()))
|
||||
{
|
||||
|
||||
const QDomElement &domBBMin = getChildElement(domGroup2, QStringLiteral("BBox_Min"));
|
||||
const QDomElement &domBBMax = getChildElement(domGroup2, QStringLiteral("BBox_Max"));
|
||||
const LtsUtils::QPoint3D &roomBBoxMin = positionFromElement(domBBMin);
|
||||
const LtsUtils::QPoint3D &roomBBoxMax = positionFromElement(domBBMax);
|
||||
|
||||
DEBUG_LOG(loggerParse) << " ** roomBBoxMin: " << roomBBoxMin;
|
||||
|
||||
QDomElement domGroup3 = getChildElement(domGroup2, QStringLiteral("Group"), false); // some bldgs does not have anmother group, e.g. 1104
|
||||
for ( ; !domGroup3.isNull(); domGroup3 = domGroup3.nextSiblingElement(domGroup3.tagName()))
|
||||
{
|
||||
const QDomElement domPoly = getChildElement(domGroup3, QStringLiteral("Polygon"), false);
|
||||
if (domPoly.isNull())
|
||||
continue;
|
||||
|
||||
// DEBUG_LOG(loggerParse) << " *** domPoly2.isNull() " << domPoly.isNull();
|
||||
|
||||
QDomElement vertexElem = domPoly.firstChildElement(QStringLiteral("Vertex"));
|
||||
|
||||
QPolygonF outlinePolygon;
|
||||
for (; !vertexElem.isNull(); vertexElem = vertexElem.nextSiblingElement(vertexElem.tagName()))
|
||||
{
|
||||
const QDomElement coordElem = vertexElem.firstChildElement(QStringLiteral("Coord"));
|
||||
if (coordElem.isNull())
|
||||
continue;
|
||||
|
||||
const LtsUtils::QPoint3D &coord = positionFromElement<LtsUtils::QPoint3D>(coordElem);
|
||||
outlinePolygon.append(coord.toPointF());
|
||||
DEBUG_LOG(loggerParse) << " **** coord = " << coord.x() << " , " << coord.y() << " , " << coord.z();
|
||||
} // for
|
||||
|
||||
RoomOutlineData rod;
|
||||
rod.minZ = roomBBoxMin.z();
|
||||
rod.maxZ = roomBBoxMax.z();
|
||||
rod.outline = outlinePolygon;
|
||||
m_roomOutlines.insert(roomId, rod);
|
||||
|
||||
DEBUG_LOG(loggerParse) << " *** insert roomId " << roomId << ", rod with " << outlinePolygon.size();
|
||||
|
||||
} // for
|
||||
} // for
|
||||
} // for
|
||||
} // for
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace VWM
|
||||
} // namespace BuildingControlUnit
|
||||
@@ -0,0 +1,57 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Building VWM info
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLSA, 2017-01-15
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QString>
|
||||
#include <QMap>
|
||||
#include <QPolygonF>
|
||||
#include <QDomElement>
|
||||
#include <LtsUtilsCore/qpoint3d.h>
|
||||
#include <VWM/buildingcontrolvwm_export.h>
|
||||
#include <logger.h>
|
||||
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace VWM
|
||||
{
|
||||
|
||||
struct BUILDINGCONTROLVWM_EXPORT RoomOutlineData
|
||||
{
|
||||
double minZ;
|
||||
double maxZ;
|
||||
QPolygonF outline;
|
||||
};
|
||||
|
||||
|
||||
class BUILDINGCONTROLVWM_EXPORT BuildingRoomGeometry
|
||||
{
|
||||
public:
|
||||
BuildingRoomGeometry();
|
||||
~BuildingRoomGeometry();
|
||||
|
||||
bool init(const QDomElement &domRoot);
|
||||
|
||||
QVector<int> pointIsInWhichRooms(const LtsUtils::QPoint3D &pointToFind);
|
||||
|
||||
private:
|
||||
bool parse(const QDomElement &domGroup);
|
||||
|
||||
|
||||
QMap<int, RoomOutlineData> m_roomOutlines;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
|
||||
|
||||
|
||||
} // namespace VWM
|
||||
} // namespace BuildingControlUnit
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Deposition calculation
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLSA, 2013-03-05
|
||||
*/
|
||||
|
||||
|
||||
#include "vwm_deposition.h"
|
||||
#include "vwm_math.h"
|
||||
#include <cmath>
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace VWM
|
||||
{
|
||||
|
||||
static double getDistPositionCode(char chDeposition)
|
||||
{
|
||||
double dist = 0.0;
|
||||
unsigned char absDeposition = static_cast<unsigned char>(chDeposition);
|
||||
|
||||
if (absDeposition > 127)
|
||||
absDeposition = 256 - absDeposition;
|
||||
|
||||
if (absDeposition < 28)
|
||||
dist = 0.1 * absDeposition;
|
||||
else if (absDeposition < 96)
|
||||
dist = exp(absDeposition / 27.1828);
|
||||
else
|
||||
{
|
||||
dist = 0.0;
|
||||
// ERROR_LOG(m_logger) << "ERROR: Invalid BSM-deposition";
|
||||
}
|
||||
|
||||
if (static_cast<unsigned char>(chDeposition) > 127)
|
||||
dist = -dist;
|
||||
|
||||
return dist;
|
||||
}
|
||||
|
||||
static double getAngle(double x, double y)
|
||||
{
|
||||
|
||||
if (qFuzzyIsNull(x) && qFuzzyIsNull(y))
|
||||
return 0.0;
|
||||
|
||||
double phi;
|
||||
if (!qFuzzyIsNull(x))
|
||||
{
|
||||
phi = atan(y / x);
|
||||
if (x < 0)
|
||||
{
|
||||
if (y > 0)
|
||||
phi += M_PI;
|
||||
else
|
||||
phi -= M_PI;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
phi = M_PI / 2.0;
|
||||
if (y < 0.0)
|
||||
phi = -phi;
|
||||
}
|
||||
|
||||
return phi;
|
||||
}
|
||||
|
||||
|
||||
LtsUtils::QPoint3D getDeposition(int deposition1, int deposition2, const LtsUtils::QPoint3D &bsmDirection)
|
||||
{
|
||||
LtsUtils::QPoint3D ret;
|
||||
// keine Ablage -> return
|
||||
if (deposition1 == 0 && deposition2 == 0)
|
||||
return ret;
|
||||
|
||||
const double alpha = 45.0;
|
||||
const double dyAlpha = cos(alpha * M_PI / 180.0);
|
||||
const double dzAlpha = sin(alpha * M_PI / 180.0);
|
||||
|
||||
const double dy1 = dyAlpha * getDistPositionCode(deposition1);
|
||||
const double dz1 = -dzAlpha * getDistPositionCode(deposition1);
|
||||
const double dy2 = -dyAlpha * getDistPositionCode(deposition2);
|
||||
const double dz2 = -dzAlpha * getDistPositionCode(deposition2);
|
||||
|
||||
ret.setY(dy1 + dy2);
|
||||
ret.setZ(dz1 + dz2);
|
||||
|
||||
const double x = bsmDirection.x();
|
||||
const double y = bsmDirection.y();
|
||||
const double z = bsmDirection.z();
|
||||
|
||||
const double phi = getAngle(x, y);
|
||||
|
||||
if (qFuzzyIsNull(z))
|
||||
{
|
||||
// INFO_LOG(m_logger) << "phi_1=" << 180.0 * phi / PI;
|
||||
ret = Math::rotateAroundZAxis(ret, -phi);
|
||||
}
|
||||
else
|
||||
{
|
||||
const double theta = getAngle(sqrt(x * x + y * y), z);
|
||||
// INFO_LOG(m_logger) << "phi_2=" << 180.0 * phi / PI << ", theta=" << 180.0 * theta / PI;
|
||||
// INFO_LOG(m_logger) << "pos0 = (" << posBsmDepositon.getPosition3DX()
|
||||
// << "," << posBsmDepositon.getPosition3DY()
|
||||
// << "," << posBsmDepositon.getPosition3DZ() << ")";
|
||||
ret = Math::rotateAroundYAxis(ret, theta);
|
||||
// INFO_LOG(m_logger) << "pos1 = (" << pos1.getPosition3DX()
|
||||
// << "," << pos1.getPosition3DY()
|
||||
// << "," << pos1.getPosition3DZ() << ")";
|
||||
ret = Math::rotateAroundZAxis(ret, -phi);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
} // namespace VWM
|
||||
} // namespace BuildingControlUnit
|
||||
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Deposition calculation
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLSA, 2013-03-05
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LtsUtilsCore/qpoint3d.h>
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace VWM
|
||||
{
|
||||
LtsUtils::QPoint3D getDeposition(int deposition1, int deposition2, const LtsUtils::QPoint3D &bsmDirection);
|
||||
|
||||
} // namespace VWM
|
||||
} // BuildingControlUnit
|
||||
+680
@@ -0,0 +1,680 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Math claculations for VWM
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Christian Ehrlicher, SLSE, 2017-01-24
|
||||
*/
|
||||
|
||||
#include "vwm_math.h"
|
||||
|
||||
#include <logger.h>
|
||||
|
||||
#include <cmath>
|
||||
|
||||
// [GUEZE-483] RPL Nr 756: Steilfeuer Mörser auf Gebäude
|
||||
// values take from xml file have 3 digits. Therefore 0.00001 is to small
|
||||
// use 0.002
|
||||
#define epsilon 0.002
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace VWM
|
||||
{
|
||||
namespace Math
|
||||
{
|
||||
|
||||
static NGL::INGLLogger &logger()
|
||||
{
|
||||
return BuildingControlUnit::getLogger("VWM.Math");
|
||||
}
|
||||
|
||||
LtsUtils::QPoint3D rotateAroundYAxis(const LtsUtils::QPoint3D &in, double phi)
|
||||
{
|
||||
LtsUtils::QPoint3D a1( cos(phi), 0, -sin(phi));
|
||||
LtsUtils::QPoint3D a2( 0, 1, 0);
|
||||
LtsUtils::QPoint3D a3( sin(phi), 0, cos(phi));
|
||||
|
||||
return LtsUtils::QPoint3D(LtsUtils::QPoint3D::dotProduct(a1, in),
|
||||
LtsUtils::QPoint3D::dotProduct(a2, in),
|
||||
LtsUtils::QPoint3D::dotProduct(a3, in));
|
||||
}
|
||||
|
||||
|
||||
LtsUtils::QPoint3D rotateAroundZAxis(const LtsUtils::QPoint3D &in, double phi)
|
||||
{
|
||||
LtsUtils::QPoint3D a1( cos(phi), sin(phi), 0);
|
||||
LtsUtils::QPoint3D a2(-sin(phi), cos(phi), 0);
|
||||
LtsUtils::QPoint3D a3( 0, 0, 1);
|
||||
|
||||
return LtsUtils::QPoint3D(LtsUtils::QPoint3D::dotProduct(a1, in),
|
||||
LtsUtils::QPoint3D::dotProduct(a2, in),
|
||||
LtsUtils::QPoint3D::dotProduct(a3, in));
|
||||
}
|
||||
|
||||
static inline double getDet2(double a11, double a12, double a21, double a22)
|
||||
{
|
||||
return a11 * a22 - a12 * a21;
|
||||
}
|
||||
|
||||
static inline double getDet3(const LtsUtils::QPoint3D &a1, const LtsUtils::QPoint3D &a2, const LtsUtils::QPoint3D &a3)
|
||||
{
|
||||
double sum = 0;
|
||||
sum += (a1.x() * a2.y() * a3.z() + a1.y() * a2.z() * a3.x() + a1.z() * a2.x() * a3.y());
|
||||
sum -= (a1.z() * a2.y() * a3.x() - a1.y() * a2.x() * a3.z() - a1.x() * a2.z() * a3.y());
|
||||
return sum;
|
||||
}
|
||||
|
||||
VwmPlane::VwmPlane(const LtsUtils::QPoint3D &pos, const LtsUtils::QPoint3D &vec1, const LtsUtils::QPoint3D &vec2)
|
||||
: m_pos(pos)
|
||||
, m_vec1(vec1 - pos)
|
||||
, m_vec2(vec2 - pos)
|
||||
{
|
||||
m_det.setX(getDet2(m_vec1.y(), m_vec1.z(), m_vec2.y(), m_vec2.z()));
|
||||
m_det.setY(getDet2(m_vec1.z(), m_vec1.x(), m_vec2.z(), m_vec2.x()));
|
||||
m_det.setZ(getDet2(m_vec1.x(), m_vec1.y(), m_vec2.x(), m_vec2.y()));
|
||||
|
||||
m_planeC = LtsUtils::QPoint3D::dotProduct(m_pos, m_det);
|
||||
}
|
||||
|
||||
bool VwmPlane::getPlaneEquation() const
|
||||
{
|
||||
if (qFuzzyIsNull(m_det.z()) && qFuzzyIsNull(m_det.x()) && qFuzzyIsNull(m_det.y()))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool VwmPlane::isPlaneLineIntersection(const LtsUtils::QPoint3D &vec) const
|
||||
{
|
||||
const double det = getDet3(vec, m_vec1, m_vec2);
|
||||
if (qFuzzyIsNull(det))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool VwmPlane::isPlaneLineOrthogonal(const LtsUtils::QPoint3D &dir) const
|
||||
{
|
||||
const double nv = LtsUtils::QPoint3D::dotProduct(m_det, dir);
|
||||
return (qFuzzyIsNull(nv));
|
||||
}
|
||||
|
||||
double VwmPlane::getPlaneLineSkalar(const LtsUtils::QPoint3D &pos, const LtsUtils::QPoint3D &dir) const
|
||||
{
|
||||
const double nv = LtsUtils::QPoint3D::dotProduct(m_det, dir);
|
||||
if (qFuzzyIsNull(nv))
|
||||
return 0;
|
||||
const double np = LtsUtils::QPoint3D::dotProduct(m_det, pos);
|
||||
return (m_planeC - np) / nv;
|
||||
}
|
||||
|
||||
LtsUtils::QPoint3D VwmPlane::getPlaneLineIntersection(const LtsUtils::QPoint3D &pos, const LtsUtils::QPoint3D &dir) const
|
||||
{
|
||||
const double lambda = getPlaneLineSkalar(pos, dir);
|
||||
|
||||
LtsUtils::QPoint3D ret (pos + (dir * lambda));
|
||||
return ret;
|
||||
}
|
||||
|
||||
double VwmPlane::distPlaneToPoint(const LtsUtils::QPoint3D &pos, const LtsUtils::QPoint3D &dir) const
|
||||
{
|
||||
const double f = m_det.length();
|
||||
const double dp = LtsUtils::QPoint3D::dotProduct(m_det, pos);
|
||||
double dist = (m_planeC - dp) / f;
|
||||
dist *= (LtsUtils::QPoint3D::dotProduct(m_det, dir) < 0) ? -1.0 : 1.0;
|
||||
|
||||
return dist;
|
||||
}
|
||||
|
||||
bool vecIsLinearlyDependent(const LtsUtils::QPoint3D &v1, const LtsUtils::QPoint3D &v2)
|
||||
{
|
||||
double lambda;
|
||||
|
||||
if (fabs(v1.x()) > epsilon)
|
||||
lambda = v2.x() / v1.x();
|
||||
|
||||
else if (fabs(v1.y()) > epsilon)
|
||||
lambda = v2.y() / v1.y();
|
||||
|
||||
else if (fabs(v1.z()) > epsilon)
|
||||
lambda = v2.z() / v1.z();
|
||||
else
|
||||
return true; // dependent
|
||||
|
||||
if ( (fabs(lambda*v1.x()-v2.x()) < epsilon)
|
||||
&& (fabs(lambda*v1.y()-v2.y()) < epsilon)
|
||||
&& (fabs(lambda*v1.z()-v2.z()) < epsilon))
|
||||
{
|
||||
return true; // dependent
|
||||
}
|
||||
|
||||
return false; // independent
|
||||
}
|
||||
|
||||
//
|
||||
// polyIsLinearlyDependent is replaced by getCoordsForPlane();
|
||||
// return value '0' can happen if isLinearlyDependent and as return at the end....
|
||||
//int polyIsLinearlyDependent(const QVector<LtsUtils::QPoint3D> &poly)
|
||||
//{
|
||||
// NGL::INGLLogger &l = logger();
|
||||
|
||||
// // Check, if vector != 0
|
||||
///* for (int i = 0; i < poly.size()-1; ++i)
|
||||
// {
|
||||
// LtsUtils::QPoint3D v1 = poly.at(i+1) - poly.at(i);
|
||||
// DEBUG_LOG(l) << "isLinearlyDependent=" << std::boolalpha << isLinearlyDependent
|
||||
// << " i=" << i
|
||||
// << " v1=" << v1.x() << "/" << v1.y() << "/" << v1.z();
|
||||
// if ( v1.x() * v1.x() + v1.y() * v1.y() + v1.z() * v1.z() > epsilon)
|
||||
// return i;
|
||||
|
||||
// }*/
|
||||
|
||||
|
||||
// // Check, if point is Linearly Dependent
|
||||
// for (int i = 0; i < poly.size()-2; ++i)
|
||||
// {
|
||||
// LtsUtils::QPoint3D v1 = poly.at(i+1) - poly.at(i);
|
||||
// LtsUtils::QPoint3D v2 = poly.at(i+2) - poly.at(i);
|
||||
// bool isLinearlyDependent = vecIsLinearlyDependent(v1, v2);
|
||||
// DEBUG_LOG(l) << "isLinearlyDependent=" << std::boolalpha << isLinearlyDependent
|
||||
// << " i=" << i
|
||||
// << " v1=" << v1.x() << "/" << v1.y() << "/" << v1.z()
|
||||
// << " v2=" << v2.x() << "/" << v2.y() << "/" << v2.z();
|
||||
// if (isLinearlyDependent)
|
||||
// return i;
|
||||
// }
|
||||
// return 0;
|
||||
//}
|
||||
|
||||
|
||||
/*
|
||||
[GUEZE-483] RPL Nr 756: Steilfeuer Mörser auf Gebäude
|
||||
Bei weiterer Betrachtung ist aufgefallen, das bei bldg_1104 AWES auf die Ecken
|
||||
des Bldgs NICHT zu einem Zerstörung führen - Fehler.
|
||||
Bei der Analyse ergeben sich folgende Erkenntnisse:
|
||||
- Der epsilon-Wert war auf 0.0001.
|
||||
Da aber die Werte aus den den XML-Dateien eine Auflösung von 3Stellen (mm)
|
||||
aufweisen, sind Rechenfehler auch in dieser Größenordnung zu erwarten.
|
||||
Der epsilon-Wert wird in dem Zuge auf 0.002 gesetzt.
|
||||
- vecIsLinearlyDependent
|
||||
Hier war der return-Value vertauscht -> korrigiert.
|
||||
- polyIsLinearlyDependent
|
||||
War missverständlich/fehleranfällig, da im Falle von isLinearlyDependent
|
||||
grundsätzlich auch '0' zurückgegeben werden kann. dies aber auch der return-Value
|
||||
am Ende der Funktion ist... Was bedeutet nun also '0'???
|
||||
- getCoordsForPlane
|
||||
wurde als Nachfolger von polyIsLinearlyDependent() eingeführt.
|
||||
Aus dem WallElement werden die ggf. vorhandenen linearen Abhänigkeiten entfernt.
|
||||
Der Aufrufer kann dann daraus eine Plane erstellen (Nutzung der 3 ersten Werte)
|
||||
- Der UnitTest 'VwmMathUnitTest' wurde erweitert:
|
||||
- Es werden einfache Gut- und Schlechtfälle wurden konstruiert.
|
||||
- Es werden realen Polygonzüge geprüft. (bldg 1104, Raum 401; bldg_salchau577...)
|
||||
*/
|
||||
QVector<LtsUtils::QPoint3D> getCoordsForPlane(const QVector<LtsUtils::QPoint3D> &poly)
|
||||
{
|
||||
NGL::INGLLogger &l = logger();
|
||||
|
||||
if (poly.size() < 3)
|
||||
return {};
|
||||
|
||||
QVector<int> idxToRemove;
|
||||
for (int i = 0; i < poly.size()-2; ++i)
|
||||
{
|
||||
const LtsUtils::QPoint3D &v1 = poly.at(i+1) - poly.at(i);
|
||||
const LtsUtils::QPoint3D &v2 = poly.at(i+2) - poly.at(i);
|
||||
bool isLinearlyDependent = vecIsLinearlyDependent(v1, v2);
|
||||
DEBUG_LOG(l) << "isLinearlyDependent=" << isLinearlyDependent
|
||||
<< " i=" << i
|
||||
<< " v1=" << v1.x() << "/" << v1.y() << "/" << v1.z()
|
||||
<< " v2=" << v2.x() << "/" << v2.y() << "/" << v2.z();
|
||||
if (isLinearlyDependent)
|
||||
idxToRemove.push_front(i+1);
|
||||
|
||||
} // for
|
||||
|
||||
QVector<LtsUtils::QPoint3D> ret = poly;
|
||||
for (auto idx : idxToRemove)
|
||||
ret.remove(idx);
|
||||
return ret;
|
||||
// Maybe there is a LinearlyDependency regarding beginning and and of vector.
|
||||
// Until now, this seems to be not relevant, since the first coordinates are taken.
|
||||
}
|
||||
|
||||
bool isPointInPolygon(const QVector<LtsUtils::QPoint3D> &poly, const LtsUtils::QPoint3D &pos)
|
||||
{
|
||||
NGL::INGLLogger &l = logger();
|
||||
double anglesum = 0.0;
|
||||
double vz = 1.0;
|
||||
LtsUtils::QPoint3D vn;
|
||||
|
||||
if (poly.size() < 3)
|
||||
return false;
|
||||
|
||||
for (int i = 0; i < poly.size(); ++i)
|
||||
{
|
||||
DEBUG_LOG(l) << "calculate point i=" << i;
|
||||
const int nextIdx1 = (i + 1) % poly.size();
|
||||
const int nextIdx2 = (i + 2) % poly.size();
|
||||
|
||||
const LtsUtils::QPoint3D &p1 = poly.at(i) - pos;
|
||||
const LtsUtils::QPoint3D &p2 = poly.at(nextIdx1) - pos;
|
||||
if (i == 0)
|
||||
vn = LtsUtils::QPoint3D::crossProduct(p1,p2);
|
||||
|
||||
const double dist1 = p1.length();
|
||||
const double dist2 = p2.length();
|
||||
if (qFuzzyIsNull(dist1 * dist2))
|
||||
{
|
||||
DEBUG_LOG(l) << "isPointInPolygon = false";
|
||||
return false;
|
||||
}
|
||||
|
||||
const double cosTheta = LtsUtils::QPoint3D::dotProduct(p1, p2) / (dist1 * dist2);
|
||||
anglesum += vz * acos(cosTheta);
|
||||
|
||||
const LtsUtils::QPoint3D &n = LtsUtils::QPoint3D::crossProduct(vn, p2);
|
||||
const LtsUtils::QPoint3D &p3 = poly.at(nextIdx2) - pos;
|
||||
const double dp = LtsUtils::QPoint3D::dotProduct(n, p3);
|
||||
|
||||
vz = (dp < 0) ? -1.0 : 1.0;
|
||||
}
|
||||
|
||||
const double delta = 0.01;
|
||||
const double sum = (M_PI * 2) - fabs(anglesum);
|
||||
bool result = -delta < sum && sum < delta;
|
||||
DEBUG_LOG(l) << "isPointInPolygon=" << std::boolalpha << result << " (sum=" << sum << ", anglesum=" << anglesum << ")"
|
||||
<< ", pos=" << pos;
|
||||
return result;
|
||||
}
|
||||
|
||||
static inline bool getHitPositionInternal(const QVector<LtsUtils::QPoint3D> &planePoints,
|
||||
const LtsUtils::QPoint3D &position,
|
||||
const LtsUtils::QPoint3D &direction,
|
||||
HitPosition &hitPos)
|
||||
{
|
||||
NGL::INGLLogger &l = logger();
|
||||
if (planePoints.size() < 3)
|
||||
{
|
||||
WARNING_LOG(l) << "Wall with fewer than 3 points - modelling error!";
|
||||
return false;
|
||||
}
|
||||
QVector<LtsUtils::QPoint3D> localPoly = getCoordsForPlane(planePoints);
|
||||
if (localPoly.size() < 3)
|
||||
{
|
||||
ERROR_LOG(l) << "planePoints are not sufficiant";
|
||||
for (auto coord : planePoints)
|
||||
ERROR_LOG(l) << "planePoints are not sufficiant: << " << coord;
|
||||
for (auto coord : qAsConst(localPoly))
|
||||
ERROR_LOG(l) << "localPoly are not sufficiant: << " << coord;
|
||||
return false;
|
||||
}
|
||||
|
||||
const VwmPlane vwmPlane(localPoly.at(0), localPoly.at(1), localPoly.at(2));
|
||||
for ( int i = 0; i < localPoly.size(); ++i)
|
||||
{
|
||||
DEBUG_LOG(l) << "vwmPlane at(" << i << ")=" << localPoly.at(i).x()
|
||||
<< "/" << localPoly.at(i).y()
|
||||
<< "/" << localPoly.at(i).z() ;
|
||||
}
|
||||
DEBUG_LOG(l) << " plane params: p1 = " << vwmPlane.pos()
|
||||
<< ", p2 = " << vwmPlane.vec1()
|
||||
<< ", p3 = " << vwmPlane.vec2()
|
||||
<< ", det = " << vwmPlane.det()
|
||||
<< ", C = " << vwmPlane.planeC()
|
||||
<< ", isVertical=" << vwmPlane.isVertical();
|
||||
|
||||
if (!vwmPlane.getPlaneEquation())
|
||||
return false;
|
||||
DEBUG_LOG(l) << " getPlaneEquation = true";
|
||||
|
||||
if (!vwmPlane.isPlaneLineIntersection(direction))
|
||||
return false;
|
||||
DEBUG_LOG(l) << " isPlaneLineIntersection = true";
|
||||
|
||||
const double lambda = vwmPlane.getPlaneLineSkalar(position, direction);
|
||||
if (lambda <= 0)
|
||||
return false;
|
||||
DEBUG_LOG(l) << " lambda = " << lambda;
|
||||
|
||||
const LtsUtils::QPoint3D pos = vwmPlane.getPlaneLineIntersection(position, direction);
|
||||
DEBUG_LOG(l) << "pos=" << pos.x() << "/" << pos.y() << "/" << pos.z()
|
||||
<< " position=" << position.x() << "/" << position.y() << "/" << position.z()
|
||||
<< " direction=" << direction.x() << "/" << direction.y() << "/" << direction.z();
|
||||
|
||||
if (!isPointInPolygon(planePoints, pos))
|
||||
return false;
|
||||
DEBUG_LOG(l) << " isPointInPolygon = true (pos=" << pos << ")";
|
||||
|
||||
// never negative since this will bailed out with getPlaneLineSkalar() above
|
||||
const double curDist = (pos - position).length();
|
||||
// const double curDist = vwmPlane.distPlaneToPoint(position, direction);
|
||||
// ERROR_LOG(l) << "l: " << curDist << " = " << (pos - position).length();
|
||||
DEBUG_LOG(l) << " distance = " << curDist;
|
||||
if (curDist > hitPos.distance)
|
||||
return false;
|
||||
hitPos.distance = curDist;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
HitPosition getHitPosition(const LtsUtils::QPoint3D &position, const LtsUtils::QPoint3D &direction, const QMap<int, Room> &rooms)
|
||||
{
|
||||
NGL::INGLLogger &l = logger();
|
||||
INFO_LOG(l) << "XXXXX Searching hit position for position " << position
|
||||
<< ", direction " << direction
|
||||
<< ", #rooms = " << rooms.size();
|
||||
HitPosition hitPos;
|
||||
|
||||
for (const Room &room : rooms)
|
||||
{
|
||||
DEBUG_LOG(l) << "****** roomId: " << room.id() << ", #walls = " << room.outerWalls().size();
|
||||
for (int idxOuterWall = 0; idxOuterWall < room.outerWalls().size(); ++idxOuterWall)
|
||||
{
|
||||
const OuterWall &wall = room.outerWalls().at(idxOuterWall);
|
||||
DEBUG_LOG(l) << " roomId: " << room.id() << ", wallIdx = " << idxOuterWall << ", #elements = " << wall.elements().size();
|
||||
for (int idxWallElement = 0; idxWallElement < wall.elements().size(); ++idxWallElement)
|
||||
{
|
||||
const WallElement &wallElement = wall.elements().at(idxWallElement);
|
||||
DEBUG_LOG(l) << " roomId: " << room.id() << ", wallIdx = " << idxOuterWall << ", wElementIdx = " << idxWallElement;
|
||||
if (!getHitPositionInternal(wallElement, position, direction, hitPos))
|
||||
continue;
|
||||
|
||||
DEBUG_LOG(l) << " nearest distance = " << hitPos.distance << " on outer wall: roomId: " << room.id() << ", wallIdx = " << idxOuterWall << ", wElementIdx = " << idxWallElement;
|
||||
hitPos.state = HitPosition::State::OuterWall;
|
||||
hitPos.roomId = room.id();
|
||||
hitPos.outerWallIdx = idxOuterWall;
|
||||
hitPos.exclusionZoneIdx = -1;
|
||||
|
||||
for (int idxExclusionZone = 0; idxExclusionZone < wall.exclusionZones().size(); ++idxExclusionZone)
|
||||
{
|
||||
const ExclusionZone &ez = wall.exclusionZones().at(idxExclusionZone);
|
||||
DEBUG_LOG(l) << " roomId: " << room.id() << ", wallIdxx = " << idxOuterWall << ", wElementIdx = " << idxWallElement
|
||||
<< " - exclusion zone element idx = " << idxExclusionZone << ", #elements = " << ez.elements().size();
|
||||
for (int idxExclusionZoneElement = 0; idxExclusionZoneElement < ez.elements().size(); ++idxExclusionZoneElement)
|
||||
{
|
||||
const ExclusionZoneElement &ezElement = ez.elements().at(idxExclusionZoneElement);
|
||||
DEBUG_LOG(l) << " roomId: " << room.id() << ", wallIdx = " << idxOuterWall << ", wElementIdx = " << idxWallElement
|
||||
<< " - exclusion zone element idx = " << idxExclusionZoneElement;
|
||||
if (!getHitPositionInternal(ezElement, position, direction, hitPos))
|
||||
continue;
|
||||
|
||||
hitPos.state = HitPosition::State::ExclusionZone;
|
||||
hitPos.exclusionZoneIdx = idxExclusionZone;
|
||||
|
||||
DEBUG_LOG(l) << " nearest distance = " << hitPos.distance << " on exclusion zone";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
INFO_LOG(l) << "XXXXX HitPosition: " << hitPos.state
|
||||
<< ", roomId = " << hitPos.roomId
|
||||
<< ", outerWallIndex = " << hitPos.outerWallIdx
|
||||
<< ", exclusionZoneIndex = " << hitPos.exclusionZoneIdx;
|
||||
return hitPos;
|
||||
}
|
||||
|
||||
// ThorstenMeyer: Beim Treffer eines BSMs wird die HitRoomID wie folgt bestimmt
|
||||
//1. Berechnung des Strahls S durch das BSM in Schußrichtung:
|
||||
// Die Richtung „vwmDir3D“ wird mit der Funktion übergeben:
|
||||
// getHitPosition(VwmPosition3D* vwmCoord,VwmPosition3D* vwmDir3D)
|
||||
|
||||
//2. Berechnung von 2 linear unabhängigen Vektoren durch die Differenzbildung von
|
||||
// Polygoneckpunkten einer OuterWall:
|
||||
// if (vwmPlaneOW.getIsLinearlyIndependent(…) // Achtung isLinearly_In_dependent vs isLinearlyDependent
|
||||
|
||||
//3. Berechnung der durch die 2 linear unabhängigen Vektoren aufgespannten Ebene E:
|
||||
// vwmPlaneOW.getPlaneEquation(…)
|
||||
|
||||
//4. Berechnung der Schnittpunktmenge des Strahls S und der Ebene E:
|
||||
// if (vwmPlaneOW.isPlaneLineIntersection(vwmDir3D))
|
||||
|
||||
//5. Überprüfung, ob die Schnittpunktmenge von S und E ein Punkt P ist:
|
||||
// if (vwmPlaneOW.getPlaneLineSkalar(vwmCoord,vwmDir3D) > 0)
|
||||
|
||||
//6. Im Fall #Schnittpunktmenge=1: Überprüfung, ob der Punkt P im Polygon liegt.
|
||||
// if (vwmPolygonOW->calcPointInPolygon(posOW))
|
||||
|
||||
//7. Im Fall „Punkt in Polygon“: Berechnung Abstand von BSM zum „Punkt im Polygon“.
|
||||
// dist = vwmPlaneOW.distPlaneToPoint(vwmCoord);
|
||||
|
||||
//8. Berechnung Abstände BSM zum „Punkt im Polygon“ für alle OuterWalls.
|
||||
|
||||
//9. Bestimmung OuterWall OW (getroffene Außenwand) mit dem kürzesten Abstand BSM zum Punkt
|
||||
// im OuterWall-Polygon.
|
||||
|
||||
//10. HitRoomID = Raumnummer des Raums, zu dem die OuterWall OW gehört.
|
||||
|
||||
HitPosition checkBsmPosition(const LtsUtils::QPoint3D &position, const LtsUtils::QPoint3D &bsmViewDirection, const QMap<int, Room> &rooms)
|
||||
{
|
||||
NGL::INGLLogger &l = logger();
|
||||
const LtsUtils::QPoint3D direction(bsmViewDirection * -1);
|
||||
INFO_LOG(l) << "XXXXX Searching nearest room for bsm position " << position
|
||||
<< ", bsmViewDirection " << bsmViewDirection
|
||||
<< ", hit direction " << direction
|
||||
<< ", #rooms = " << rooms.size();
|
||||
HitPosition hitPos;
|
||||
|
||||
for (const Room &room : rooms)
|
||||
{
|
||||
DEBUG_LOG(l) << "room[" << room.id() << "] #walls = " << room.outerWalls().size();
|
||||
for (int idxOuterWall = 0; idxOuterWall < room.outerWalls().size(); ++idxOuterWall)
|
||||
{
|
||||
const OuterWall &wall = room.outerWalls().at(idxOuterWall);
|
||||
DEBUG_LOG(l) << "room[" << room.id() << "]" << " wall[" << idxOuterWall << "] #elements = " << wall.elements().size();
|
||||
for (int idxWallElement = 0; idxWallElement < wall.elements().size(); ++idxWallElement)
|
||||
{
|
||||
const WallElement &wallElement = wall.elements().at(idxWallElement);
|
||||
DEBUG_LOG(l) << "room[" << room.id() << "]" << " wallElement[" << idxWallElement << "] #points = " << wallElement.size();
|
||||
if (wallElement.size() < 3)
|
||||
continue;
|
||||
|
||||
// fix wallElement regarding polyIsLinearlyDependent
|
||||
// [GUEZE-483] RPL Nr 756: Steilfeuer Mörser auf Gebäude
|
||||
const QVector<LtsUtils::QPoint3D> &localWallElement = getCoordsForPlane(wallElement);
|
||||
DEBUG_LOG(l) << "room[" << room.id() << "]" << " wallElement[" << idxWallElement << "] #points = " << localWallElement.size() << " after removing Linearly Dependent)";
|
||||
|
||||
if (localWallElement.size() < 3)
|
||||
{
|
||||
ERROR_LOG(l) << "localWallElement are not sufficiant";
|
||||
for (auto coord : wallElement)
|
||||
ERROR_LOG(l) << "wallElement are not sufficiant: << " << coord;
|
||||
for (auto coord : qAsConst(localWallElement))
|
||||
ERROR_LOG(l) << "localWallElement are not sufficiant: << " << coord;
|
||||
continue;
|
||||
}
|
||||
|
||||
for (auto pointOfWallElementLinear : qAsConst(localWallElement))
|
||||
DEBUG_LOG(l) << "room[" << room.id() << "]" << " wall[" << idxOuterWall << "] " << " wallElement[" << idxWallElement << "] #points = " << localWallElement.size() << ", pointOfWallElementLinear=" << pointOfWallElementLinear;
|
||||
|
||||
const VwmPlane vwmPlaneOW(localWallElement.at(0), localWallElement.at(1), localWallElement.at(2));
|
||||
DEBUG_LOG(l) << "room[" << room.id() << "]" << " wall[" << idxOuterWall << "]" << " wallElement[" << idxWallElement << "]"
|
||||
<< ", planeOW params: p1 = " << vwmPlaneOW.pos()
|
||||
<< ", p2 = " << vwmPlaneOW.vec1()
|
||||
<< ", p3 = " << vwmPlaneOW.vec2()
|
||||
<< ", det = " << vwmPlaneOW.det()
|
||||
<< ", C = " << vwmPlaneOW.planeC()
|
||||
<< ", vwmPlaneOW.isVertical=" << vwmPlaneOW.isVertical();
|
||||
|
||||
|
||||
|
||||
|
||||
if (!vwmPlaneOW.getPlaneEquation())
|
||||
continue;
|
||||
DEBUG_LOG(l) << " getPlaneEquation() = true";
|
||||
|
||||
if (!vwmPlaneOW.isPlaneLineIntersection(direction))
|
||||
continue;
|
||||
DEBUG_LOG(l) << " isPlaneLineIntersection() = true -> direction=" << direction;
|
||||
|
||||
// only check for orthogonal, do not check for correct direction (in contrast to getHitPosition() above)
|
||||
if (vwmPlaneOW.isPlaneLineOrthogonal(direction))
|
||||
continue;
|
||||
|
||||
|
||||
|
||||
const LtsUtils::QPoint3D posOW = vwmPlaneOW.getPlaneLineIntersection(position, direction);
|
||||
DEBUG_LOG(l) << " point to check: " << posOW;
|
||||
|
||||
if (!isPointInPolygon(localWallElement, posOW))
|
||||
continue;
|
||||
DEBUG_LOG(l) << " isPointInPolygon() = true";
|
||||
|
||||
const double curDistOW = vwmPlaneOW.distPlaneToPoint(position, direction);
|
||||
const double absDistOW = fabs(curDistOW);
|
||||
DEBUG_LOG(l) << " distance = " << curDistOW << " - room " << room.id();
|
||||
if (absDistOW > fabs(hitPos.distance))
|
||||
continue;
|
||||
hitPos.distance = curDistOW;
|
||||
hitPos.state = HitPosition::State::OuterWall;
|
||||
hitPos.roomId = room.id();
|
||||
hitPos.outerWallIdx = idxOuterWall;
|
||||
DEBUG_LOG(l) << " XXXXX nearest distance = " << curDistOW << " on outer wall in room " << room.id()
|
||||
<< "room[" << room.id() << "]" << " wall[" << idxOuterWall << "]" << " wallElement[" << idxWallElement << "]";
|
||||
// we don't care about exclusion zones since they should be on the same plane as the wall
|
||||
|
||||
} // for
|
||||
} // for
|
||||
} // for
|
||||
INFO_LOG(l) << "XXXXX HitPosition: " << hitPos.state
|
||||
<< ", roomId = " << hitPos.roomId
|
||||
<< ", outerWallIndex = " << hitPos.outerWallIdx
|
||||
<< ", exclusionZoneIndex = " << hitPos.exclusionZoneIdx;
|
||||
return hitPos;
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Intersection methods
|
||||
//
|
||||
|
||||
LtsUtils::QPoint3D getIntersectionInternal(
|
||||
const QVector<LtsUtils::QPoint3D> &planePoints, const LtsUtils::QPoint3D &position, const LtsUtils::QPoint3D &direction
|
||||
)
|
||||
{
|
||||
NGL::INGLLogger &l = logger();
|
||||
if (planePoints.size() < 3)
|
||||
{
|
||||
WARNING_LOG(l) << "Wall with fewer than 3 points - modelling error!";
|
||||
return invalidPosition();
|
||||
}
|
||||
const QVector<LtsUtils::QPoint3D> &localPoly = getCoordsForPlane(planePoints);
|
||||
|
||||
if (localPoly.size() < 3)
|
||||
{
|
||||
ERROR_LOG(l) << "planePoints are not sufficiant";
|
||||
for (auto coord : qAsConst(planePoints))
|
||||
ERROR_LOG(l) << "planePoints are not sufficiant: << " << coord;
|
||||
for (auto coord : qAsConst(localPoly))
|
||||
ERROR_LOG(l) << "localPoly are not sufficiant: << " << coord;
|
||||
return invalidPosition();
|
||||
}
|
||||
|
||||
const VwmPlane vwmPlane(localPoly.at(0), localPoly.at(1), localPoly.at(2));
|
||||
if (l.isDebugEnabled())
|
||||
{
|
||||
for ( int i = 0; i < localPoly.size(); ++i)
|
||||
DEBUG_LOG(l) << "vwmPlane at(" << i << ")=" << localPoly.at(i).x() << "/" << localPoly.at(i).y() << "/"
|
||||
<< localPoly.at(i).z();
|
||||
DEBUG_LOG(l) << "plane params: p1 = " << vwmPlane.pos() << ", p2 = " << vwmPlane.vec1() << ", p3 = " << vwmPlane.vec2()
|
||||
<< ", det = " << vwmPlane.det() << ", C = " << vwmPlane.planeC();
|
||||
} // if
|
||||
|
||||
if (!vwmPlane.getPlaneEquation())
|
||||
return invalidPosition();
|
||||
DEBUG_LOG(l) << "getPlaneEquation() = true";
|
||||
|
||||
if (!vwmPlane.isPlaneLineIntersection(direction))
|
||||
return invalidPosition();
|
||||
DEBUG_LOG(l) << "isPlaneLineIntersection() = true";
|
||||
|
||||
const double planeLineScalar = vwmPlane.getPlaneLineSkalar(position, direction);
|
||||
if (planeLineScalar <= 0)
|
||||
return invalidPosition();
|
||||
DEBUG_LOG(l) << "getPlaneLineSkalar() = " << planeLineScalar;
|
||||
|
||||
const LtsUtils::QPoint3D pos = vwmPlane.getPlaneLineIntersection(position, direction);
|
||||
|
||||
bool bIsPointInPolygon = isPointInPolygon(localPoly, pos);
|
||||
DEBUG_LOG(l) << "bIsPoinliotInPolygon = " << bIsPointInPolygon;
|
||||
|
||||
return bIsPointInPolygon ? pos : invalidPosition();
|
||||
}
|
||||
|
||||
|
||||
LtsUtils::QPoint3D intersection(const LtsUtils::QPoint3D &start, const LtsUtils::QPoint3D &end, const QMap<int, Room> &rooms)
|
||||
{
|
||||
NGL::INGLLogger &l = logger();
|
||||
DEBUG_LOG(l) << "Searching for intersection: start = " << start << ", end = " << end;
|
||||
|
||||
LtsUtils::QPoint3D intersectionPoint = invalidPosition();
|
||||
double distance = (end - start).length();
|
||||
const LtsUtils::QPoint3D direction = (end - start).normalized();
|
||||
|
||||
DEBUG_LOG(l) << "Searching for intersection: START"
|
||||
<< ", intersectionPoint = " << intersectionPoint
|
||||
<< ", distance = " << distance
|
||||
<< ", direction = " << direction;
|
||||
|
||||
int cnt = 0;
|
||||
int roomId4Debugging = 1;
|
||||
for (const Room &room : qAsConst(rooms))
|
||||
for (const OuterWall &outerWall : qAsConst(room.outerWalls()))
|
||||
for (const WallElement &wallElement : qAsConst(outerWall.elements()))
|
||||
{
|
||||
const LtsUtils::QPoint3D point = getIntersectionInternal(wallElement, start, direction);
|
||||
DEBUG_LOG(l) << "getIntersectionInternal:"
|
||||
<< " cnt = " << cnt++
|
||||
<< " room.id = " << room.id()
|
||||
<< " - point=" << point;
|
||||
if (point == invalidPosition())
|
||||
continue;
|
||||
const double dist = (point - start).length();
|
||||
if (dist < distance)
|
||||
{
|
||||
DEBUG_LOG(l) << "Intersection found for room " << room.id() << ": " << point;
|
||||
intersectionPoint = point;
|
||||
distance = dist;
|
||||
roomId4Debugging =room.id();
|
||||
} // if
|
||||
} // for
|
||||
|
||||
if (roomId4Debugging > 0)
|
||||
DEBUG_LOG(l) << "Searching for intersection: FOUND"
|
||||
<< ", intersectionPoint = " << intersectionPoint
|
||||
<< ", distance = " << distance
|
||||
<< ", direction = " << direction
|
||||
<< ", at roomId=" << roomId4Debugging;
|
||||
|
||||
return intersectionPoint;
|
||||
}
|
||||
|
||||
|
||||
bool hasIntersection(const LtsUtils::QPoint3D &start, const LtsUtils::QPoint3D &end, const QMap<int, Room> &rooms)
|
||||
{
|
||||
const double distance = (end - start).length();
|
||||
const LtsUtils::QPoint3D direction = (end - start).normalized();
|
||||
for (const Room &room : qAsConst(rooms))
|
||||
for (const OuterWall &outerWall : qAsConst(room.outerWalls()))
|
||||
for (const WallElement &wallElement : qAsConst(outerWall.elements()))
|
||||
{
|
||||
const LtsUtils::QPoint3D point = getIntersectionInternal(wallElement, start, direction);
|
||||
if (point == invalidPosition())
|
||||
continue;
|
||||
if ((start - point).length() > distance)
|
||||
continue;
|
||||
return true;
|
||||
} // for
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
LtsUtils::QPoint3D invalidPosition()
|
||||
{
|
||||
return {100000., 100000., -10000.};
|
||||
}
|
||||
|
||||
} // namespace Math
|
||||
} // namespace VWM
|
||||
} // namespace BuildingControlUnit
|
||||
@@ -0,0 +1,72 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Math claculations for VWM
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Christian Ehrlicher, SLSE, 2017-01-24
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <LtsUtilsCore/qpoint3d.h>
|
||||
#include <QVector>
|
||||
#include "vwm_building.h"
|
||||
#include "vwm_types.h"
|
||||
#include <VWM/buildingcontrolvwm_export.h>
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace VWM
|
||||
{
|
||||
namespace Math
|
||||
{
|
||||
class BUILDINGCONTROLVWM_EXPORT VwmPlane
|
||||
{
|
||||
public:
|
||||
VwmPlane(const LtsUtils::QPoint3D &pos, const LtsUtils::QPoint3D &vec1, const LtsUtils::QPoint3D &vec2);
|
||||
|
||||
bool getPlaneEquation() const;
|
||||
bool isPlaneLineIntersection(const LtsUtils::QPoint3D &vec) const;
|
||||
bool isPlaneLineOrthogonal(const LtsUtils::QPoint3D &dir) const;
|
||||
double getPlaneLineSkalar(const LtsUtils::QPoint3D &pos, const LtsUtils::QPoint3D &dir) const;
|
||||
LtsUtils::QPoint3D getPlaneLineIntersection(const LtsUtils::QPoint3D &pos, const LtsUtils::QPoint3D &dir) const;
|
||||
double distPlaneToPoint(const LtsUtils::QPoint3D &pos, const LtsUtils::QPoint3D &dir) const;
|
||||
|
||||
const LtsUtils::QPoint3D &pos() const { return m_pos; }
|
||||
const LtsUtils::QPoint3D &vec1() const { return m_vec1; }
|
||||
const LtsUtils::QPoint3D &vec2() const { return m_vec2; }
|
||||
const LtsUtils::QPoint3D &det() const { return m_det; }
|
||||
double planeC() const { return m_planeC; }
|
||||
|
||||
bool isVertical() const { return qFuzzyIsNull(LtsUtils::QPoint3D::dotProduct({0., 0., 1.}, LtsUtils::QPoint3D::crossProduct(m_vec1, m_vec2))); }
|
||||
|
||||
private:
|
||||
LtsUtils::QPoint3D m_pos;
|
||||
LtsUtils::QPoint3D m_vec1;
|
||||
LtsUtils::QPoint3D m_vec2;
|
||||
LtsUtils::QPoint3D m_det;
|
||||
double m_planeC{0.0};
|
||||
};
|
||||
|
||||
BUILDINGCONTROLVWM_EXPORT LtsUtils::QPoint3D invalidPosition();
|
||||
BUILDINGCONTROLVWM_EXPORT LtsUtils::QPoint3D rotateAroundYAxis(const LtsUtils::QPoint3D &in, double phi);
|
||||
BUILDINGCONTROLVWM_EXPORT LtsUtils::QPoint3D rotateAroundZAxis(const LtsUtils::QPoint3D &in, double phi);
|
||||
BUILDINGCONTROLVWM_EXPORT HitPosition getHitPosition(const LtsUtils::QPoint3D &position, const LtsUtils::QPoint3D &direction, const QMap<int, Room> &rooms);
|
||||
BUILDINGCONTROLVWM_EXPORT HitPosition checkBsmPosition(const LtsUtils::QPoint3D &position, const LtsUtils::QPoint3D &bsmViewDirection, const QMap<int, Room> &rooms);
|
||||
BUILDINGCONTROLVWM_EXPORT bool isPointInPolygon(const QVector<LtsUtils::QPoint3D> &poly, const LtsUtils::QPoint3D &pos); // for test purposes
|
||||
BUILDINGCONTROLVWM_EXPORT LtsUtils::QPoint3D intersection(const LtsUtils::QPoint3D &start, const LtsUtils::QPoint3D &end, const QMap<int, Room> &rooms);
|
||||
BUILDINGCONTROLVWM_EXPORT bool hasIntersection(const LtsUtils::QPoint3D &start, const LtsUtils::QPoint3D &end, const QMap<int, Room> &rooms);
|
||||
|
||||
BUILDINGCONTROLVWM_EXPORT bool vecIsLinearlyDependent(const LtsUtils::QPoint3D &v1, const LtsUtils::QPoint3D &v2);
|
||||
|
||||
/**
|
||||
* @brief getCoordsForPlane will check for lineareyDependencies and remove that values.
|
||||
* @param poly input polygon, most likly take from xml files of a building
|
||||
* @return reduced polygon
|
||||
*/
|
||||
BUILDINGCONTROLVWM_EXPORT QVector<LtsUtils::QPoint3D> getCoordsForPlane(const QVector<LtsUtils::QPoint3D> &poly);
|
||||
|
||||
|
||||
} // namespace Math
|
||||
} // namespace VWM
|
||||
} // namespace BuildingControlUnit
|
||||
@@ -0,0 +1,764 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Small unit test for math calculations in vwm
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Christian Ehrlicher, SLSE, 2016-01-30
|
||||
*/
|
||||
|
||||
#include <nglapplication/nglcoreapplication.h>
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
#include "vwm_math_unit_test.h"
|
||||
#include "vwm_math.h"
|
||||
#include "vwm_building.h" // MakePlanar
|
||||
|
||||
#include <QVector3D>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
NGLCoreApplication app(argc, argv);
|
||||
app.createLogger("BCU", 1);
|
||||
VwmMathUnitTest tc;
|
||||
return QTest::qExec(&tc, argc, argv);
|
||||
}
|
||||
|
||||
namespace QTest
|
||||
{
|
||||
template<>
|
||||
char *toString(const LtsUtils::QPoint3D &p)
|
||||
{
|
||||
std::ostringstream s; s << p;
|
||||
const std::string str = s.str();
|
||||
char *ret = new char[str.size() + 1];
|
||||
strcpy(ret, str.c_str());
|
||||
return ret;
|
||||
}
|
||||
|
||||
template<>
|
||||
char *toString(const BuildingControlUnit::VWM::HitPosition::State &s)
|
||||
{
|
||||
const std::string str = std::to_string(static_cast<int>(s));
|
||||
char *ret = new char[str.size() + 1];
|
||||
strcpy(ret, str.c_str());
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void VwmMathUnitTest::testRotation()
|
||||
{
|
||||
const LtsUtils::QPoint3D pIn(1, 2, 3);
|
||||
const LtsUtils::QPoint3D pRot1 = BuildingControlUnit::VWM::Math::rotateAroundYAxis(pIn, 0.12);
|
||||
const LtsUtils::QPoint3D pRot2 = BuildingControlUnit::VWM::Math::rotateAroundZAxis(pIn, 0.12);
|
||||
|
||||
const LtsUtils::QPoint3D pExp1 = LtsUtils::QPoint3D(0.6336720139871, 2.0000000000000, 3.0981381148505);
|
||||
const LtsUtils::QPoint3D pExp2 = LtsUtils::QPoint3D(1.2322330504317, 1.8659050644199, 3.0000000000000);
|
||||
std::ostringstream s1, s2;
|
||||
s1 << "Is: " << pRot1 << ", Expected: " << pExp1;
|
||||
s1 << "Is: " << pRot2 << ", Expected: " << pExp2;
|
||||
|
||||
QVERIFY2(qFuzzyCompare(pRot1, pExp1), s1.str().c_str());
|
||||
QVERIFY2(qFuzzyCompare(pRot2, pExp2), s2.str().c_str());
|
||||
}
|
||||
|
||||
// taken from real world: bldg_1104, room 401, wallIdx 52
|
||||
static const QVector<LtsUtils::QPoint3D> polyBldg1104_401_52({
|
||||
{11.187, 0.000, 10.280}, // dependent1
|
||||
{11.187, 0.400, 10.268}, // dependent1
|
||||
{11.187, 2.517, 10.204}, // dependent1
|
||||
{11.187, 4.362, 10.147}, // dependent1
|
||||
{ 0.000, 4.362, 10.147}, // dependent2
|
||||
{ 0.000, 0.403, 10.268}, // dependent2
|
||||
{ 0.000, 0.000, 10.280}, // dependent2
|
||||
{10.766, 0.000, 10.280}, // dependent3
|
||||
{10.787, 0.000, 10.280} // dependent3
|
||||
});
|
||||
|
||||
static const QVector<LtsUtils::QPoint3D> polyBldg1104_401_52_adapted01({
|
||||
{11.187, 0.000, 10.280},
|
||||
{11.187, 0.400, 10.268},
|
||||
{11.187, 2.517, 10.204}, // copied
|
||||
{11.187, 2.517, 10.204}, // copied
|
||||
{11.187, 2.517, 10.204}, // copied
|
||||
{11.187, 4.362, 10.147},
|
||||
{ 0.000, 4.362, 10.147},
|
||||
{ 0.000, 0.403, 10.268},
|
||||
{ 0.000, 0.000, 10.280},
|
||||
{10.766, 0.000, 10.280},
|
||||
{10.787, 0.000, 10.280}
|
||||
});
|
||||
|
||||
// taken from real world: bldg_salchau_577, room 201, wallIdx 1(?)
|
||||
static const QVector<LtsUtils::QPoint3D> polyBldg577_201_1({
|
||||
{0.000, 2.167, -0.180},
|
||||
{0.001, 4.506, -0.180},
|
||||
{0.001, 4.506, 2.278},
|
||||
{0.001, 4.506, 2.341},
|
||||
{0.001, 4.506, 2.520},
|
||||
{0.000, 4.506, 2.520}
|
||||
});
|
||||
|
||||
// taken from real world: bldg_salchau_577, room 201, wallIdx 5(?)
|
||||
static const QVector<LtsUtils::QPoint3D> polyBldg577_201_5({
|
||||
{0.001, 4.506, -0.180},
|
||||
{0.001, 6.233, -0.180},
|
||||
{0.001, 6.233, 2.520},
|
||||
{0.001, 4.506, 2.520},
|
||||
{0.001, 4.506, 2.278},
|
||||
{0.001, 4.506, 0.713}
|
||||
});
|
||||
|
||||
// taken from real world: bldg_1116, room 206, wallIdx 8(?)
|
||||
static const QVector<LtsUtils::QPoint3D> polyBldg1116_206_8({
|
||||
{21.226, 11.995, 6.431},
|
||||
{23.858, 11.995, 6.431},
|
||||
{24.038, 11.995, 6.431},
|
||||
{24.038, 11.995, 6.223},
|
||||
{23.858, 11.995, 6.223},
|
||||
{21.226, 11.995, 6.223}
|
||||
});
|
||||
|
||||
|
||||
// taken from real world: bldg_1116, room 206, wallIdx 8(?)
|
||||
static const QVector<LtsUtils::QPoint3D> polyBldg1116_206_9({
|
||||
{24.038, 11.995, 6.431},
|
||||
{23.858, 11.995, 6.431}, // dependent / will be removed
|
||||
{21.226, 11.995, 6.431},
|
||||
{21.226, 11.995, 6.449}
|
||||
});
|
||||
|
||||
static const QVector<LtsUtils::QPoint3D> polyBldg1116_206_X({
|
||||
{24.038, 11.815, 3.210}, // GUEZE-672: Kristina hat den Polygonzug händisch korrigiert: r 4672.
|
||||
{24.858, 5.896, 3.210},
|
||||
{24.038, 5.896, 6.393},
|
||||
{24.038, 6.076, 6.393},
|
||||
{24.038, 7.715, 5.513}
|
||||
});
|
||||
|
||||
|
||||
static const QVector<LtsUtils::QPoint3D> polyBldg3101_306_149({
|
||||
{10.905, 16.003, 5.480},
|
||||
{12.277, 16.003, 5.480}, // dependent / will be removed
|
||||
{17.839, 16.004, 5.480},
|
||||
{17.839, 16.004, 8.040},
|
||||
{10.905, 16.003, 8.040}
|
||||
});
|
||||
static const QVector<LtsUtils::QPoint3D> polyBldg3101_506_276({
|
||||
{10.905, 16.003, 10.990},
|
||||
{12.277, 16.003, 10.990}, // dependent / will be removed
|
||||
{17.839, 16.005, 10.990},
|
||||
{17.839, 16.005, 13.602},
|
||||
{10.905, 16.003, 13.602}
|
||||
});
|
||||
|
||||
static const QVector<LtsUtils::QPoint3D> polyBldg3102_402_210({
|
||||
{0.180, 9.676, 5.420},
|
||||
{0.525, 9.676, 5.420}, // dependent / will be removed
|
||||
{2.201, 9.676, 5.420},
|
||||
{2.201, 9.676, 7.910},
|
||||
{0.180, 9.676, 7.910},
|
||||
});
|
||||
|
||||
|
||||
static const QVector<LtsUtils::QPoint3D> polyBldgUBahn_303_333({
|
||||
{140.006, 3.988, -1.945},
|
||||
{140.006, 3.407, -1.945}, // dependent / will be removed
|
||||
{140.006, 0.594, -1.945},
|
||||
{140.006, 0.594, 0.545},
|
||||
{140.006, 3.988, 0.545},
|
||||
});
|
||||
|
||||
// BuildingControlTestVwmXml: Bldg1108
|
||||
// Polygon point 2 ((-0,15.979,0)) and 6 ((-0,15.979,0)) in room 2103, room[5], element[0] are the same! (Buildings/BuildingControlUnit/VWM/vwm_building.cpp:554)
|
||||
static const QVector<LtsUtils::QPoint3D> polyBldg1108_103_X({
|
||||
{-0.000, 15.979, 2.278}, // idx=0
|
||||
{-0.000, 15.979, 0.975}, // idx=1 // problem 1: linear dependent
|
||||
{-0.000, 15.979, 0.000}, // idx=2
|
||||
{ 0.180, 15.979, 0.000}, // idx=3
|
||||
{ 0.180, 15.979, 2.490}, // idx=4
|
||||
{-0.000, 15.979, 2.490}, // idx=5
|
||||
{-0.000, 15.979, 0.000} // idx=6 identical to idx=2 - problem???
|
||||
});
|
||||
|
||||
// BuildingControlTestVwmXml: Bldg3101
|
||||
static const QVector<LtsUtils::QPoint3D> polyBldg3101_510_309({
|
||||
{ 7.291, -0.225, 13.744}, // idx=0
|
||||
{10.726, -0.225, 13.744}, // idx=1
|
||||
{10.726, 4.462, 13.869}, // idx=2
|
||||
{ 7.291, 4.462, 13.869} // idx=3
|
||||
});
|
||||
// Bldg_3101, Room 608, wallIdx=1;
|
||||
static const QVector<LtsUtils::QPoint3D> polyBldg3101_608_387_Org({
|
||||
{10.726, 8.619, 16.787}, // idx=0
|
||||
{10.726, 8.716, 16.786}, // idx=1
|
||||
{ 7.291, 8.716, 16.786}, // idx=2
|
||||
{ 7.291, 8.619, 16.787}, // idx=3 // problem 1: linear dependent, wenn z gleich wäre...
|
||||
{ 7.291, 4.281, 16.717}, // idx=4
|
||||
{10.726, 4.281, 16.717} // idx=5
|
||||
});
|
||||
static const QVector<LtsUtils::QPoint3D> polyBldg3101_608_387_Z_Gleichgezogen({
|
||||
{10.726, 8.619, 16.786}, // idx=0
|
||||
{10.726, 8.716, 16.786}, // idx=1
|
||||
{ 7.291, 8.716, 16.786}, // idx=2
|
||||
{ 7.291, 8.619, 16.786}, // idx=3 // problem 1: linear dependent, wenn z gleich wäre...
|
||||
{ 7.291, 4.281, 16.786}, // idx=4
|
||||
{10.726, 4.281, 16.786} // idx=5
|
||||
});
|
||||
|
||||
static const QVector<LtsUtils::QPoint3D> polyBldg3101_608_387_Z_ROUNDED({
|
||||
{10.73, 8.62, 16.79}, // idx=0
|
||||
{10.73, 8.72, 16.79}, // idx=1
|
||||
{ 7.30, 8.72, 16.79}, // idx=2
|
||||
{ 7.39, 8.62, 16.79}, // idx=3 // problem 1: linear dependent, wenn z gleich wäre...
|
||||
{ 7.39, 4.28, 16.79}, // idx=4
|
||||
{10.73, 4.28, 16.79} // idx=5
|
||||
});
|
||||
|
||||
|
||||
static const QVector<LtsUtils::QPoint3D> polyBldg1103_205_5_ORG({
|
||||
{11.639, 6.026, 5.412}, // idx=0
|
||||
{11.639, 2.607, 5.513}, // idx=1 // problem: linear dependent -> wird erkannt
|
||||
{11.639, 1.690, 5.540}, // idx=2
|
||||
{14.659, 1.694, 5.539}, // idx=3
|
||||
{14.659, 6.026, 5.412} // idx=4
|
||||
});
|
||||
static const QVector<LtsUtils::QPoint3D> polyBldg1103_205_5_ROUNDED({
|
||||
{11.64, 6.03, 5.41}, // idx=0
|
||||
{11.64, 2.61, 5.51}, // idx=1 // problem: linear dependent -> wird erkannt
|
||||
{11.64, 1.69, 5.54}, // idx=2
|
||||
{14.66, 1.69, 5.54}, // idx=3
|
||||
{14.66, 6.03, 5.41} // idx=4
|
||||
});
|
||||
|
||||
// 2021-10:
|
||||
static const QVector<LtsUtils::QPoint3D> polyBldg1131_201_3({ // sollte eigentlich waagerechte Wand darstellen
|
||||
{0.000, 5.987, 2.689}, // idx=0
|
||||
{0.000, 5.791, 2.695}, // idx=1 // idx=1 "stört"
|
||||
{0.000, 0.170, 2.859}, // idx=2
|
||||
{3.098, 0.170, 2.859}, // idx=3
|
||||
{3.098, 5.791, 2.695}, // idx=4
|
||||
{2.928, 5.987, 2.689} // idx=5
|
||||
});
|
||||
|
||||
const LtsUtils::QPoint3D pIn(10.6477, 6.13499, 10000);
|
||||
|
||||
|
||||
void VwmMathUnitTest::testIsLinearlyDependent()
|
||||
{
|
||||
//
|
||||
// Pay attention to 'epsilon' defined at lib: (like #define epsilon 0.002)
|
||||
//
|
||||
bool bVecIsLinearlyDependent = false;
|
||||
|
||||
{
|
||||
// first 2 values are identical -> lamdba at vecIsLinearlyDependent could not be determined
|
||||
// check return value of that case:
|
||||
/*
|
||||
double lambda;
|
||||
...
|
||||
else if (fabs(v1.z()) > epsilon)
|
||||
lambda = v2.z() / v1.z();
|
||||
else
|
||||
return true; // dependent <- check this one
|
||||
*/
|
||||
const QVector<LtsUtils::QPoint3D> poly({{0.000, 0.000, 0.}, // dependent
|
||||
{0.000, 0.000, 0.},
|
||||
{1.000, 2.000, 0.}
|
||||
});
|
||||
const LtsUtils::QPoint3D &v1 = poly.at(1) - poly.at(0);
|
||||
const LtsUtils::QPoint3D &v2 = poly.at(2) - poly.at(0);
|
||||
bVecIsLinearlyDependent = BuildingControlUnit::VWM::Math::vecIsLinearlyDependent(v1, v2);
|
||||
QCOMPARE(bVecIsLinearlyDependent, true);
|
||||
}
|
||||
|
||||
{
|
||||
const QVector<LtsUtils::QPoint3D> poly({{0.000, 0.000, 0.}, // dependent
|
||||
{0.000, 1.000, 0.},
|
||||
{0.000, 2.000, 0.}
|
||||
});
|
||||
const LtsUtils::QPoint3D &v1 = poly.at(1) - poly.at(0);
|
||||
const LtsUtils::QPoint3D &v2 = poly.at(2) - poly.at(0);
|
||||
bVecIsLinearlyDependent = BuildingControlUnit::VWM::Math::vecIsLinearlyDependent(v1, v2);
|
||||
QCOMPARE(bVecIsLinearlyDependent, true);
|
||||
}
|
||||
{
|
||||
const QVector<LtsUtils::QPoint3D> poly({{0.000, 0.000, 0.}, // dependent
|
||||
{0.000, 1.000, 0.},
|
||||
{0.000, 2.000, 0.},
|
||||
{0.000, 3.000, 0.},
|
||||
{0.000, 4.000, 0.}
|
||||
});
|
||||
const LtsUtils::QPoint3D &v1 = poly.at(1) - poly.at(0);
|
||||
const LtsUtils::QPoint3D &v2 = poly.at(2) - poly.at(0);
|
||||
bVecIsLinearlyDependent = BuildingControlUnit::VWM::Math::vecIsLinearlyDependent(v1, v2);
|
||||
QCOMPARE(bVecIsLinearlyDependent, true);
|
||||
}
|
||||
{
|
||||
const QVector<LtsUtils::QPoint3D> &polyIN = polyBldg1104_401_52;
|
||||
const LtsUtils::QPoint3D &v1 = polyIN.at(1) - polyIN.at(0);
|
||||
const LtsUtils::QPoint3D &v2 = polyIN.at(2) - polyIN.at(0);
|
||||
bVecIsLinearlyDependent = BuildingControlUnit::VWM::Math::vecIsLinearlyDependent(v1, v2);
|
||||
QCOMPARE(bVecIsLinearlyDependent, true);
|
||||
}
|
||||
|
||||
{
|
||||
const QVector<LtsUtils::QPoint3D> &polyIN = polyBldg1104_401_52_adapted01;
|
||||
const LtsUtils::QPoint3D &v1 = polyIN.at(1) - polyIN.at(0);
|
||||
const LtsUtils::QPoint3D &v2 = polyIN.at(2) - polyIN.at(0);
|
||||
bVecIsLinearlyDependent = BuildingControlUnit::VWM::Math::vecIsLinearlyDependent(v1, v2);
|
||||
QCOMPARE(bVecIsLinearlyDependent, true);
|
||||
}
|
||||
|
||||
{
|
||||
const QVector<LtsUtils::QPoint3D> poly({{0.000, 0.000, 0.}, // _in_dependent
|
||||
{0.000, 1.000, 0.},
|
||||
{1.000, 1.000, 0.},
|
||||
{1.000, 2.000, 0.},
|
||||
{2.000, 2.000, 0.}
|
||||
});
|
||||
const LtsUtils::QPoint3D &v1 = poly.at(1) - poly.at(0);
|
||||
const LtsUtils::QPoint3D &v2 = poly.at(2) - poly.at(0);
|
||||
bVecIsLinearlyDependent = BuildingControlUnit::VWM::Math::vecIsLinearlyDependent(v1, v2);
|
||||
QCOMPARE(bVecIsLinearlyDependent, false);
|
||||
}
|
||||
}
|
||||
|
||||
void printPoly(QVector<LtsUtils::QPoint3D> value)
|
||||
{
|
||||
std::ostringstream stream;
|
||||
stream << "QVector<QPoint3D>(" << value.size() << "): ";
|
||||
for (LtsUtils::QPoint3D i : value)
|
||||
stream << i << ";";
|
||||
|
||||
std::cout << stream.str() << std::endl;
|
||||
}
|
||||
|
||||
void VwmMathUnitTest::getCoordsForPlane()
|
||||
{
|
||||
{
|
||||
const BuildingControlUnit::VWM::WallElement we({{0.000, 0.000, 0.}, // dependent
|
||||
{0.000, 1.000, 0.},
|
||||
{0.000, 2.000, 0.}
|
||||
});
|
||||
QVector<LtsUtils::QPoint3D> planeCoords = BuildingControlUnit::VWM::Math::getCoordsForPlane(we);
|
||||
QCOMPARE(planeCoords.size(), 2); // 2 since it´s dependent
|
||||
}
|
||||
{
|
||||
const BuildingControlUnit::VWM::WallElement we({{0.000, 0.000, 0.}, // _in_dependent
|
||||
{0.000, 1.000, 0.},
|
||||
{1.000, 1.000, 0.}
|
||||
});
|
||||
QVector<LtsUtils::QPoint3D> planeCoords = BuildingControlUnit::VWM::Math::getCoordsForPlane(we);
|
||||
QCOMPARE(planeCoords.size(), 3);
|
||||
}
|
||||
{
|
||||
const BuildingControlUnit::VWM::WallElement we({{0.000, 0.000, 0.}, // _in_dependent
|
||||
{0.000, 1.000, 0.},
|
||||
{1.000, 1.000, 0.},
|
||||
{1.000, 0.000, 0.}
|
||||
});
|
||||
QVector<LtsUtils::QPoint3D> planeCoords = BuildingControlUnit::VWM::Math::getCoordsForPlane(we);
|
||||
QCOMPARE(planeCoords.size(), 4);
|
||||
}
|
||||
{
|
||||
const QVector<LtsUtils::QPoint3D> &polyIN = polyBldg1104_401_52;
|
||||
QVector<LtsUtils::QPoint3D> planeCoords = BuildingControlUnit::VWM::Math::getCoordsForPlane(polyIN);
|
||||
std::cout << " IN: " << polyIN.size() << " RESULT: " << planeCoords.size() << std::endl;
|
||||
QCOMPARE(planeCoords.size(), 5); // using epsilon 0.002
|
||||
}
|
||||
{
|
||||
const QVector<LtsUtils::QPoint3D> &polyIN = polyBldg1104_401_52_adapted01;
|
||||
QVector<LtsUtils::QPoint3D> planeCoords = BuildingControlUnit::VWM::Math::getCoordsForPlane(polyIN);
|
||||
std::cout << " IN: " << polyIN.size() << " RESULT: " << planeCoords.size() << std::endl;
|
||||
QCOMPARE(planeCoords.size(), 5); // using epsilon 0.002
|
||||
}
|
||||
{
|
||||
const QVector<LtsUtils::QPoint3D> &polyIN = polyBldg577_201_1;
|
||||
// printPoly(polyIN);
|
||||
QVector<LtsUtils::QPoint3D> planeCoords = BuildingControlUnit::VWM::Math::getCoordsForPlane(polyIN);
|
||||
// printPoly(planeCoords);
|
||||
std::cout << " IN: " << polyIN.size() << " RESULT: " << planeCoords.size() << std::endl;
|
||||
QCOMPARE(planeCoords.size(), 3); // using epsilon 0.002
|
||||
}
|
||||
{
|
||||
const QVector<LtsUtils::QPoint3D> &polyIN = polyBldg577_201_5;
|
||||
// printPoly(polyIN);
|
||||
QVector<LtsUtils::QPoint3D> planeCoords = BuildingControlUnit::VWM::Math::getCoordsForPlane(polyIN);
|
||||
// printPoly(planeCoords);
|
||||
std::cout << " IN: " << polyIN.size() << " RESULT: " << planeCoords.size() << std::endl;
|
||||
QCOMPARE(planeCoords.size(), 5); // using epsilon 0.002
|
||||
}
|
||||
{
|
||||
const QVector<LtsUtils::QPoint3D> &polyIN = polyBldg1116_206_8;
|
||||
printPoly(polyIN);
|
||||
QVector<LtsUtils::QPoint3D> planeCoords = BuildingControlUnit::VWM::Math::getCoordsForPlane(polyIN);
|
||||
printPoly(planeCoords);
|
||||
std::cout << " IN: " << polyIN.size() << " RESULT: " << planeCoords.size() << std::endl;
|
||||
QCOMPARE(planeCoords.size(), 4); // using epsilon 0.002
|
||||
}
|
||||
{
|
||||
const QVector<LtsUtils::QPoint3D> &polyIN = polyBldg1116_206_9;
|
||||
printPoly(polyIN);
|
||||
QVector<LtsUtils::QPoint3D> planeCoords = BuildingControlUnit::VWM::Math::getCoordsForPlane(polyIN);
|
||||
printPoly(planeCoords);
|
||||
std::cout << " IN: " << polyIN.size() << " RESULT: " << planeCoords.size() << std::endl;
|
||||
QCOMPARE(planeCoords.size(), 3); // using epsilon 0.002
|
||||
}
|
||||
|
||||
{
|
||||
const QVector<LtsUtils::QPoint3D> &polyIN = polyBldg1116_206_X;
|
||||
printPoly(polyIN);
|
||||
QVector<LtsUtils::QPoint3D> planeCoords = BuildingControlUnit::VWM::Math::getCoordsForPlane(polyIN);
|
||||
printPoly(planeCoords);
|
||||
std::cout << " IN: " << polyIN.size() << " RESULT: " << planeCoords.size() << std::endl;
|
||||
QCOMPARE(planeCoords.size(), 5); // using epsilon 0.002
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
const QVector<LtsUtils::QPoint3D> &polyIN = polyBldg3101_306_149;
|
||||
printPoly(polyIN);
|
||||
QVector<LtsUtils::QPoint3D> planeCoords = BuildingControlUnit::VWM::Math::getCoordsForPlane(polyIN);
|
||||
printPoly(planeCoords);
|
||||
std::cout << " IN: " << polyIN.size() << " RESULT: " << planeCoords.size() << std::endl;
|
||||
QCOMPARE(planeCoords.size(), 4); // using epsilon 0.002
|
||||
}
|
||||
{
|
||||
const QVector<LtsUtils::QPoint3D> &polyIN = polyBldg3101_506_276;
|
||||
printPoly(polyIN);
|
||||
QVector<LtsUtils::QPoint3D> planeCoords = BuildingControlUnit::VWM::Math::getCoordsForPlane(polyIN);
|
||||
printPoly(planeCoords);
|
||||
std::cout << " IN: " << polyIN.size() << " RESULT: " << planeCoords.size() << std::endl;
|
||||
QCOMPARE(planeCoords.size(), 4); // using epsilon 0.002
|
||||
}
|
||||
|
||||
{
|
||||
const QVector<LtsUtils::QPoint3D> &polyIN = polyBldg3102_402_210;
|
||||
printPoly(polyIN);
|
||||
QVector<LtsUtils::QPoint3D> planeCoords = BuildingControlUnit::VWM::Math::getCoordsForPlane(polyIN);
|
||||
printPoly(planeCoords);
|
||||
std::cout << " IN: " << polyIN.size() << " RESULT: " << planeCoords.size() << std::endl;
|
||||
QCOMPARE(planeCoords.size(), 4); // using epsilon 0.002
|
||||
}
|
||||
|
||||
{
|
||||
const QVector<LtsUtils::QPoint3D> &polyIN = polyBldgUBahn_303_333;
|
||||
printPoly(polyIN);
|
||||
QVector<LtsUtils::QPoint3D> planeCoords = BuildingControlUnit::VWM::Math::getCoordsForPlane(polyIN);
|
||||
printPoly(planeCoords);
|
||||
std::cout << " IN: " << polyIN.size() << " RESULT: " << planeCoords.size() << std::endl;
|
||||
QCOMPARE(planeCoords.size(), 4); // using epsilon 0.002
|
||||
}
|
||||
|
||||
{
|
||||
const QVector<LtsUtils::QPoint3D> &polyIN = polyBldg1108_103_X;
|
||||
printPoly(polyIN);
|
||||
QVector<LtsUtils::QPoint3D> planeCoords = BuildingControlUnit::VWM::Math::getCoordsForPlane(polyIN);
|
||||
printPoly(planeCoords);
|
||||
std::cout << " IN: " << polyIN.size() << " RESULT: " << planeCoords.size() << std::endl;
|
||||
QCOMPARE(planeCoords.size(), 6); // using epsilon 0.002
|
||||
}
|
||||
|
||||
{
|
||||
const QVector<LtsUtils::QPoint3D> &polyIN = polyBldg3101_510_309;
|
||||
printPoly(polyIN);
|
||||
QVector<LtsUtils::QPoint3D> planeCoords = BuildingControlUnit::VWM::Math::getCoordsForPlane(polyIN);
|
||||
printPoly(planeCoords);
|
||||
std::cout << " IN: " << polyIN.size() << " RESULT: " << planeCoords.size() << std::endl;
|
||||
QCOMPARE(planeCoords.size(), 4); // using epsilon 0.002
|
||||
}
|
||||
|
||||
// polyBldg3101
|
||||
{
|
||||
const QVector<LtsUtils::QPoint3D> &polyIN = polyBldg3101_608_387_Org;
|
||||
printPoly(polyIN);
|
||||
QVector<LtsUtils::QPoint3D> planeCoords = BuildingControlUnit::VWM::Math::getCoordsForPlane(polyIN);
|
||||
printPoly(planeCoords);
|
||||
std::cout << " IN: " << polyIN.size() << " RESULT: " << planeCoords.size() << std::endl;
|
||||
QCOMPARE(planeCoords.size(), 6); // using epsilon 0.002
|
||||
}
|
||||
{
|
||||
const QVector<LtsUtils::QPoint3D> &polyIN = polyBldg3101_608_387_Z_Gleichgezogen;
|
||||
printPoly(polyIN);
|
||||
QVector<LtsUtils::QPoint3D> planeCoords = BuildingControlUnit::VWM::Math::getCoordsForPlane(polyIN);
|
||||
printPoly(planeCoords);
|
||||
std::cout << " IN: " << polyIN.size() << " RESULT: " << planeCoords.size() << std::endl;
|
||||
QCOMPARE(planeCoords.size(), 5); // using epsilon 0.002
|
||||
}
|
||||
|
||||
|
||||
// Aufgrund des Rundens auf cm kann scheinbar nicht mehr die lineare Abhängigkeit entfernt werden :-(
|
||||
{
|
||||
const QVector<LtsUtils::QPoint3D> &polyIN = polyBldg1103_205_5_ORG;
|
||||
printPoly(polyIN);
|
||||
QVector<LtsUtils::QPoint3D> planeCoords = BuildingControlUnit::VWM::Math::getCoordsForPlane(polyIN);
|
||||
printPoly(planeCoords);
|
||||
std::cout << " IN: " << polyIN.size() << " RESULT: " << planeCoords.size() << std::endl;
|
||||
QCOMPARE(planeCoords.size(), 4); // using epsilon 0.002
|
||||
}
|
||||
{
|
||||
const QVector<LtsUtils::QPoint3D> &polyIN = polyBldg1103_205_5_ROUNDED;
|
||||
printPoly(polyIN);
|
||||
QVector<LtsUtils::QPoint3D> planeCoords = BuildingControlUnit::VWM::Math::getCoordsForPlane(polyIN);
|
||||
printPoly(planeCoords);
|
||||
std::cout << " IN: " << polyIN.size() << " RESULT: " << planeCoords.size() << std::endl;
|
||||
QCOMPARE(planeCoords.size(), 5); // using epsilon 0.002
|
||||
}
|
||||
|
||||
//
|
||||
// 2021-11-03: MakePlanar is introduced
|
||||
//
|
||||
|
||||
// 2021-11-03:
|
||||
{
|
||||
const QVector<LtsUtils::QPoint3D> &polyIN = polyBldg1131_201_3;
|
||||
printPoly(polyIN);
|
||||
|
||||
// add makePlanar (is typically done at Building::cleanupPolygons()
|
||||
BuildingControlUnit::VWM::MakePlanar makePlanar(polyIN);
|
||||
QVector<LtsUtils::QPoint3D> planarPoly = makePlanar.calculate();
|
||||
|
||||
QVector<LtsUtils::QPoint3D> planeCoords = BuildingControlUnit::VWM::Math::getCoordsForPlane(planarPoly);
|
||||
printPoly(planeCoords);
|
||||
std::cout << " IN: " << polyIN.size() << " RESULT: " << planeCoords.size() << std::endl;
|
||||
QCOMPARE(planeCoords.size(), 5); // using epsilon 0.002
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void VwmMathUnitTest::testPlane()
|
||||
{
|
||||
QVector<LtsUtils::QPoint3D> poly({{3.629, 0, 2.53},
|
||||
{ 0, 0, 2.53},
|
||||
{ 0, 0, 0},
|
||||
{3.627, 0, 0}});
|
||||
|
||||
const LtsUtils::QPoint3D pIn(1, 0, 1);
|
||||
const LtsUtils::QPoint3D pOut(1, 0.2, 1);
|
||||
QVERIFY2(BuildingControlUnit::VWM::Math::isPointInPolygon(poly, pIn), "Point is not in polygon!");
|
||||
QVERIFY2(!BuildingControlUnit::VWM::Math::isPointInPolygon(poly, pOut), "Point is in polygon!");
|
||||
|
||||
|
||||
LtsUtils::QPoint3D p1(100, 100, 3);
|
||||
LtsUtils::QPoint3D p2( 2, 3, 4);
|
||||
LtsUtils::QPoint3D p3( 3, 4, 5);
|
||||
BuildingControlUnit::VWM::Math::VwmPlane plane(p1, p2, p3);
|
||||
QVERIFY2(plane.getPlaneEquation(), "Can not determine plane equation ...");
|
||||
QCOMPARE(plane.det(), LtsUtils::QPoint3D(-98,99,-1));
|
||||
QCOMPARE(plane.planeC(), 97.);
|
||||
|
||||
LtsUtils::QPoint3D vec(1, 0, 2);
|
||||
LtsUtils::QPoint3D pos(1, 3, 7);
|
||||
QVERIFY2(plane.isPlaneLineIntersection(vec), "no intersection - error!");
|
||||
QCOMPARE(plane.getPlaneLineSkalar(pos, vec), 0.95);
|
||||
QCOMPARE(plane.getPlaneLineIntersection(pos, vec), LtsUtils::QPoint3D(1.95,3,8.9));
|
||||
}
|
||||
|
||||
void VwmMathUnitTest::testBsmHit()
|
||||
{
|
||||
// what went wrong until now:
|
||||
// rotation direction of wall polygon affected distance calculation (direction of hit/bsm was not taken into account)
|
||||
// rotation direction of wall polygon affected point in polygon calculation (plane vectors were not moved to 0/0/0)
|
||||
|
||||
// clockwise
|
||||
const BuildingControlUnit::VWM::WallElement we1({{4.486, -0.003, 0.111},
|
||||
{0.000, 0.000, 0.111},
|
||||
{0.000, 0.000, 2.910},
|
||||
{4.486, -0.003, 2.910}});
|
||||
|
||||
// counter-clockwise
|
||||
const BuildingControlUnit::VWM::WallElement we2({{0.000, 0.000, 0.111},
|
||||
{4.486, -0.003, 0.111},
|
||||
{4.486, -0.003, 2.910},
|
||||
{0.000, 0.000, 2.910}});
|
||||
|
||||
BuildingControlUnit::VWM::OuterWall ow1;
|
||||
ow1.elements().push_back(we1);
|
||||
BuildingControlUnit::VWM::OuterWall ow2;
|
||||
ow2.elements().push_back(we2);
|
||||
|
||||
BuildingControlUnit::VWM::Room r1;
|
||||
r1.setId(41);
|
||||
r1.outerWalls().push_back(ow1);
|
||||
BuildingControlUnit::VWM::Room r2;
|
||||
r2.setId(42);
|
||||
r2.outerWalls().push_back(ow2);
|
||||
|
||||
const QMap<int, BuildingControlUnit::VWM::Room> rooms1({{r1.id(), r1}});
|
||||
const QMap<int, BuildingControlUnit::VWM::Room> rooms2({{r2.id(), r2}});
|
||||
|
||||
const LtsUtils::QPoint3D bsmPos1(2.344, +0.018, 2.799);
|
||||
const LtsUtils::QPoint3D bsmPos2(2.344, -0.018, 2.799);
|
||||
const LtsUtils::QPoint3D bsmDir1(0, +1, 0);
|
||||
const LtsUtils::QPoint3D bsmDir2(0, -1, 0);
|
||||
|
||||
// clockwise polygon: rooms1
|
||||
// counter-clockwise polygon: rooms2
|
||||
for (const auto &rooms : std::vector<QMap<int, BuildingControlUnit::VWM::Room>>({rooms1, rooms2}))
|
||||
{
|
||||
{
|
||||
// ok
|
||||
BuildingControlUnit::VWM::HitPosition hp1 = BuildingControlUnit::VWM::Math::checkBsmPosition(bsmPos1, bsmDir1, rooms);
|
||||
std::cout << hp1 << std::endl;
|
||||
QCOMPARE(hp1.state, BuildingControlUnit::VWM::HitPosition::State::OuterWall);
|
||||
QVERIFY2(hp1.distance > 0, "Distance must be greater zero");
|
||||
// does not hit since direction is wrong
|
||||
BuildingControlUnit::VWM::HitPosition hp2 = BuildingControlUnit::VWM::Math::checkBsmPosition(bsmPos1, bsmDir2, rooms);
|
||||
std::cout << hp2 << std::endl;
|
||||
QCOMPARE(hp2.state, BuildingControlUnit::VWM::HitPosition::State::OuterWall);
|
||||
QVERIFY2(hp2.distance < 0, "Distance must be smaller zero");
|
||||
// does not hit since position (y) behind wall
|
||||
BuildingControlUnit::VWM::HitPosition hp3 = BuildingControlUnit::VWM::Math::checkBsmPosition(bsmPos2, bsmDir1, rooms);
|
||||
std::cout << hp3 << std::endl;
|
||||
QCOMPARE(hp3.state, BuildingControlUnit::VWM::HitPosition::State::OuterWall);
|
||||
QVERIFY2(hp3.distance < 0, "Distance must be smaller zero");
|
||||
// does hit since direction and position is changed
|
||||
BuildingControlUnit::VWM::HitPosition hp4 = BuildingControlUnit::VWM::Math::checkBsmPosition(bsmPos2, bsmDir2, rooms);
|
||||
std::cout << hp4 << std::endl;
|
||||
QCOMPARE(hp4.state, BuildingControlUnit::VWM::HitPosition::State::OuterWall);
|
||||
QVERIFY2(hp4.distance > 0, "Distance must be greater zero");
|
||||
}
|
||||
{
|
||||
// hitDirection = bsmDirection * -1
|
||||
// ok
|
||||
BuildingControlUnit::VWM::HitPosition hp1 = BuildingControlUnit::VWM::Math::getHitPosition(bsmPos1, bsmDir1 * -1, rooms);
|
||||
std::cout << hp1 << std::endl;
|
||||
QCOMPARE(hp1.state, BuildingControlUnit::VWM::HitPosition::State::OuterWall);
|
||||
QVERIFY2(hp1.distance > 0, "Distance must be greater zero");
|
||||
// does not hit since direction is wrong
|
||||
BuildingControlUnit::VWM::HitPosition hp2 = BuildingControlUnit::VWM::Math::getHitPosition(bsmPos1, bsmDir2 * -1, rooms);
|
||||
std::cout << hp2 << std::endl;
|
||||
QCOMPARE(hp2.state, BuildingControlUnit::VWM::HitPosition::State::NoHit);
|
||||
// does not hit since position (y) behind wall
|
||||
BuildingControlUnit::VWM::HitPosition hp3 = BuildingControlUnit::VWM::Math::getHitPosition(bsmPos2, bsmDir1 * -1, rooms);
|
||||
std::cout << hp3 << std::endl;
|
||||
QCOMPARE(hp3.state, BuildingControlUnit::VWM::HitPosition::State::NoHit);
|
||||
// does hit since direction and position is changed
|
||||
BuildingControlUnit::VWM::HitPosition hp4 = BuildingControlUnit::VWM::Math::getHitPosition(bsmPos2, bsmDir2 * -1, rooms);
|
||||
std::cout << hp4 << std::endl;
|
||||
QCOMPARE(hp4.state, BuildingControlUnit::VWM::HitPosition::State::OuterWall);
|
||||
QVERIFY2(hp1.distance > 0, "Distance must be greater zero");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void VwmMathUnitTest::testSpecialCase()
|
||||
{
|
||||
// special: is 10.6477,6.13499 in polygon polyBldg3101_510_309???
|
||||
|
||||
LtsUtils::QPoint3D pIn(10.6477, 6.13499, 10000);
|
||||
|
||||
// [GUEZE-605] / [GUEZE-707]
|
||||
static const QVector<LtsUtils::QPoint3D> polyBldg3101_608_387_Simple({
|
||||
{10.726, 8.716, 16.786}, // idx=1
|
||||
{ 7.291, 8.716, 16.786}, // idx=2
|
||||
{ 7.291, 4.281, 16.786}, // idx=4
|
||||
{10.726, 4.281, 16.786} // idx=5
|
||||
});
|
||||
|
||||
// const QVector<LtsUtils::QPoint3D> &polygon = polyBldg3101_608_387_Simple;
|
||||
// const QVector<LtsUtils::QPoint3D> &polygon = polyBldg3101_608_387_Z_Gleichgezogen;
|
||||
// const QVector<LtsUtils::QPoint3D> &polygon = polyBldg3101_608_387_Org;
|
||||
const QVector<LtsUtils::QPoint3D> &polygon = polyBldg3101_608_387_Z_ROUNDED;
|
||||
|
||||
|
||||
pIn.setZ(16.786);
|
||||
QVERIFY2(BuildingControlUnit::VWM::Math::isPointInPolygon(polygon, pIn), "Point is not in polygon!");
|
||||
|
||||
QVERIFY2(BuildingControlUnit::VWM::Math::isPointInPolygon(polyBldg3101_608_387_Org, pIn), "Point is not in polygon!");
|
||||
|
||||
|
||||
// Searching nearest room for bsm position...
|
||||
const LtsUtils::QPoint3D position(10.6477, 6.13499, 10000);
|
||||
const LtsUtils::QPoint3D direction(0, 0, -1);
|
||||
|
||||
|
||||
BuildingControlUnit::VWM::Math::VwmPlane plane(polygon[0], polygon[1], polygon[2]);
|
||||
QVERIFY2(plane.getPlaneEquation(), "Can not determine plane equation ...");
|
||||
|
||||
QVERIFY2(plane.isPlaneLineIntersection(direction), "no intersection - error!");
|
||||
|
||||
// QVERIFY2(plane.isPlaneLineOrthogonal(direction), "not Orthogonal - error!");
|
||||
|
||||
|
||||
const LtsUtils::QPoint3D posOW = plane.getPlaneLineIntersection(position, direction);
|
||||
std::cout << " point to check: " << posOW.x() << std::endl;
|
||||
std::cout << " point to check: " << posOW.y() << std::endl;
|
||||
std::cout << " point to check: " << posOW.z() << std::endl;
|
||||
|
||||
QVERIFY2(BuildingControlUnit::VWM::Math::isPointInPolygon(polygon, posOW), "Point is not in polygon!");
|
||||
}
|
||||
|
||||
void VwmMathUnitTest::testSpecialCase2()
|
||||
{
|
||||
// special: is 10.6477,6.13499 in polygon polyBldg3101_510_309???
|
||||
|
||||
LtsUtils::QPoint3D pIn(10.6477, 6.13499, 10000);
|
||||
|
||||
QVector<LtsUtils::QPoint3D> polygon = polyBldg3101_608_387_Org;
|
||||
|
||||
pIn.setZ(16.786);
|
||||
QVERIFY2(BuildingControlUnit::VWM::Math::isPointInPolygon(polygon, pIn), "Point is not in polygon!");
|
||||
|
||||
QVERIFY2(BuildingControlUnit::VWM::Math::isPointInPolygon(polyBldg3101_608_387_Org, pIn), "Point is not in polygon!");
|
||||
|
||||
|
||||
// Searching nearest room for bsm position...
|
||||
const LtsUtils::QPoint3D position(10.6477, 6.13499, 10000);
|
||||
const LtsUtils::QPoint3D direction(0, 0, -1);
|
||||
|
||||
// Now the magic :
|
||||
BuildingControlUnit::VWM::MakePlanar makePlanar(polygon);
|
||||
polygon = makePlanar.calculate(); // now planar
|
||||
// : Now the magic
|
||||
|
||||
BuildingControlUnit::VWM::Math::VwmPlane plane(polygon[0], polygon[1], polygon[2]);
|
||||
QVERIFY2(plane.getPlaneEquation(), "Can not determine plane equation ...");
|
||||
|
||||
QVERIFY2(plane.isPlaneLineIntersection(direction), "no intersection - error!");
|
||||
|
||||
// QVERIFY2(plane.isPlaneLineOrthogonal(direction), "not Orthogonal - error!");
|
||||
|
||||
|
||||
const LtsUtils::QPoint3D posOW = plane.getPlaneLineIntersection(position, direction);
|
||||
std::cout << " point to check: " << posOW.x() << std::endl;
|
||||
std::cout << " point to check: " << posOW.y() << std::endl;
|
||||
std::cout << " point to check: " << posOW.z() << std::endl;
|
||||
|
||||
QVERIFY2(BuildingControlUnit::VWM::Math::isPointInPolygon(polygon, posOW), "Point is not in polygon!");
|
||||
}
|
||||
|
||||
//bool isLinearDependendCandiate
|
||||
bool isLinearDependend_QVector3D(const QVector3D &v1,
|
||||
const QVector3D &v2,
|
||||
const QVector3D &v3)
|
||||
{
|
||||
|
||||
float distance1 = v2.distanceToPoint(v1);
|
||||
float distance2 = v2.distanceToPoint(v3);
|
||||
float distanceAll = v1.distanceToPoint(v3);
|
||||
float abweichung = (distance1+distance2) - distanceAll;
|
||||
std::cout << "abweichung: " << abweichung << " - qFuzzyIsNull = " << std::boolalpha << qFuzzyIsNull(abweichung) << std::endl;
|
||||
|
||||
return qFuzzyIsNull(
|
||||
(v2.distanceToPoint(v1) + v2.distanceToPoint(v3)) - v1.distanceToPoint(v3) // distanceToPoint returns 'float'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void VwmMathUnitTest::testQVector3D()
|
||||
{
|
||||
QVector3D v1(1, 1, 0.0);
|
||||
QVector3D v2(1, 2, 0.003); // 0.003 -> ..IsNull=true ; 0.0035 -> ..IsNull=false
|
||||
QVector3D v3(1, 3, 0.0);
|
||||
|
||||
QCOMPARE(isLinearDependend_QVector3D(v1, v2, v3), true);
|
||||
|
||||
//
|
||||
v2.setZ(0.0035);
|
||||
QCOMPARE(isLinearDependend_QVector3D(v1, v2, v3), false);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Small unit test for math calculations in vwm
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Christian Ehrlicher, SLSE, 2016-01-30
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
|
||||
class VwmMathUnitTest : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
private Q_SLOTS:
|
||||
void testRotation();
|
||||
|
||||
void testIsLinearlyDependent();
|
||||
void getCoordsForPlane();
|
||||
|
||||
void testPlane();
|
||||
void testBsmHit();
|
||||
|
||||
void testSpecialCase();
|
||||
void testSpecialCase2();
|
||||
|
||||
void testQVector3D();
|
||||
|
||||
};
|
||||
@@ -0,0 +1,252 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Building State Store
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLSA, 2017-01-15
|
||||
*/
|
||||
#include "vwm_state_store.h"
|
||||
#include <logger.h>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonArray>
|
||||
#include <QString>
|
||||
#include <QFile>
|
||||
#include <QStandardPaths>
|
||||
#include <QDir>
|
||||
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace VWM
|
||||
{
|
||||
namespace StateStore
|
||||
{
|
||||
static NGL::INGLLogger &logger()
|
||||
{
|
||||
return BuildingControlUnit::getLogger("VWM.StateStore");
|
||||
}
|
||||
|
||||
static QJsonObject writeBuilding(const Building &building)
|
||||
{
|
||||
const QMap<int, Room> &rooms = building.rooms();
|
||||
QJsonArray arrRooms;
|
||||
for (auto it = rooms.begin(); it != rooms.end(); ++it)
|
||||
{
|
||||
QJsonArray arrOw;
|
||||
const Room &room = it.value();
|
||||
for (auto itW = room.outerWalls().begin(); itW != room.outerWalls().end(); ++itW)
|
||||
{
|
||||
QJsonArray arrEz;
|
||||
const OuterWall &ow = (*itW);
|
||||
for (auto itE = ow.exclusionZones().begin(); itE != ow.exclusionZones().end(); ++itE)
|
||||
{
|
||||
const ExclusionZone &ez = (*itE);
|
||||
arrEz.append(QJsonObject({{QStringLiteral("ExclusionZoneProtection"), ez.protection()}}));
|
||||
}
|
||||
arrOw.append(QJsonObject({{QStringLiteral("OuterWallProtection"), ow.protection()},
|
||||
{QStringLiteral("Ez"), arrEz}
|
||||
}));
|
||||
}
|
||||
arrRooms.append(QJsonObject({{QStringLiteral("OuterWalls"), arrOw},
|
||||
{QStringLiteral("room"), room.id()},
|
||||
{QStringLiteral("fortifyFactor"), room.fortifyFactor()},
|
||||
{QStringLiteral("remainingEffect"), room.remainingEffect()}}));
|
||||
}
|
||||
|
||||
const QMap<QString, QString> &egcuProperties = building.segmentPropertyMap();
|
||||
QJsonArray arrEgcuProperties;
|
||||
for (auto it = egcuProperties.begin(); it != egcuProperties.end(); ++it)
|
||||
{
|
||||
arrEgcuProperties.append(QJsonObject({{QStringLiteral("Hostname"), it.key()},
|
||||
{QStringLiteral("Properties"), it.value()}
|
||||
}));
|
||||
}
|
||||
return QJsonObject({{QStringLiteral("BuildingName"), building.name()},
|
||||
{QStringLiteral("Rooms"), arrRooms},
|
||||
{QStringLiteral("SegmentProperties"), arrEgcuProperties},
|
||||
{QStringLiteral("BuildingProperties"), building.buildingProperties()}});
|
||||
}
|
||||
|
||||
static inline QJsonObject writeHitResult(const HitResult &hitResult)
|
||||
{
|
||||
return QJsonObject({{QStringLiteral("sensorId"), hitResult.sensorId},
|
||||
{QStringLiteral("originatorId"), hitResult.originatorId},
|
||||
{QStringLiteral("originatorType"),static_cast<int>(hitResult.originatorType)},
|
||||
{QStringLiteral("chargeTypeId"), hitResult.chargeTypeId},
|
||||
{QStringLiteral("damagePercentOld"), hitResult.damagePercentOld},
|
||||
{QStringLiteral("damagePercentNew"), hitResult.damagePercentNew},
|
||||
{QStringLiteral("effectSoundId"), hitResult.effectSoundId},
|
||||
{QStringLiteral("effectTimeMSec"), hitResult.effectTimeMSec}});
|
||||
}
|
||||
|
||||
static inline QJsonArray writeContaminationStates(const QMap<int, ContaminationState> & contaminationStates )
|
||||
{
|
||||
QJsonArray contaminationArr;
|
||||
for (const auto &value : contaminationStates.values() )
|
||||
{
|
||||
QJsonArray roomArr;
|
||||
for (const auto & roomId : qAsConst(value.rooms))
|
||||
roomArr.append(QJsonValue(roomId));
|
||||
|
||||
contaminationArr.append(QJsonObject({ {QStringLiteral("aesId") , value.aesId},
|
||||
{QStringLiteral("rooms"), roomArr}}));
|
||||
}
|
||||
|
||||
return contaminationArr;
|
||||
}
|
||||
|
||||
static void readEz(const QJsonObject &json, int ezIndex, OuterWall &outerWall)
|
||||
{
|
||||
if (ezIndex >= outerWall.exclusionZones().size())
|
||||
return;
|
||||
|
||||
double protection = json[QStringLiteral("ExclusionZoneProtection")].toDouble();
|
||||
outerWall.exclusionZones()[ezIndex].setProtection(protection);
|
||||
}
|
||||
|
||||
static void readOw(const QJsonObject &json, OuterWall &outerWall)
|
||||
{
|
||||
int outerWallProtection = static_cast<int>( json[QStringLiteral("OuterWallProtection")].toDouble());
|
||||
outerWall.setProtection(outerWallProtection);
|
||||
QJsonArray ezArray = json[QStringLiteral("Ez")].toArray();
|
||||
for (int ezIndex = 0; ezIndex < ezArray.size(); ++ezIndex)
|
||||
{
|
||||
QJsonObject ezObject = ezArray[ezIndex].toObject();
|
||||
readEz(ezObject, ezIndex, outerWall);
|
||||
}
|
||||
}
|
||||
|
||||
static void readRoom(const QJsonObject &json, Building &building)
|
||||
{
|
||||
//QMap<int, Room> rooms = building.rooms();
|
||||
int id = json[QStringLiteral("room")].toInt();
|
||||
auto room = building.rooms().find(id);
|
||||
if (room == building.rooms().end())
|
||||
return;
|
||||
|
||||
room.value().setRemainingEffect(json[QStringLiteral("remainingEffect")].toDouble());
|
||||
room.value().setFortifyFactor(json[QStringLiteral("fortifyFactor")].toDouble());
|
||||
QJsonArray owArray = json[QStringLiteral("OuterWalls")].toArray();
|
||||
for (int owIndex = 0; owIndex < owArray.size(); ++owIndex)
|
||||
{
|
||||
if (owIndex >= room.value().outerWalls().size())
|
||||
break;
|
||||
QJsonObject owObject = owArray[owIndex].toObject();
|
||||
if (room.value().outerWalls().size() > owIndex)
|
||||
readOw(owObject, room.value().outerWalls()[owIndex]);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
static void readBuilding(const QJsonObject &json, Building &building)
|
||||
{
|
||||
//QString name = json[QStringLiteral("BuildingName")].toString();
|
||||
QJsonArray roomArray = json[QStringLiteral("Rooms")].toArray();
|
||||
for (int roomIndex = 0; roomIndex < roomArray.size(); ++roomIndex)
|
||||
{
|
||||
QJsonObject roomObject = roomArray[roomIndex].toObject();
|
||||
readRoom(roomObject, building);
|
||||
}
|
||||
building.clearSegmentProperties();
|
||||
QJsonArray segmentArray = json[QStringLiteral("SegmentProperties")].toArray();
|
||||
for (int segmentIndex = 0; segmentIndex < segmentArray.size(); ++segmentIndex)
|
||||
{
|
||||
QJsonObject segmentObject = segmentArray[segmentIndex].toObject();
|
||||
QString hostname = segmentObject[QStringLiteral("Hostname")].toString();
|
||||
QString properties = segmentObject[QStringLiteral("Properties")].toString();
|
||||
building.setSegmentProperties(hostname,properties);
|
||||
}
|
||||
building.setBuildingProperties(json[QStringLiteral("BuildingProperties")].toString());
|
||||
}
|
||||
|
||||
static void readHitResult(const QJsonObject &json, HitResult &hitResult)
|
||||
{
|
||||
hitResult.sensorId = json.value(QStringLiteral("sensorId")).toInt();
|
||||
hitResult.originatorId = json.value(QStringLiteral("originatorId")).toInt();
|
||||
hitResult.originatorType = static_cast<OriginatorType>(json.value(QStringLiteral("originatorType")).toInt());
|
||||
hitResult.chargeTypeId = json.value(QStringLiteral("chargeTypeId")).toInt();
|
||||
hitResult.damagePercentOld = json.value(QStringLiteral("damagePercentOld")).toInt();
|
||||
hitResult.damagePercentNew = json.value(QStringLiteral("damagePercentNew")).toInt();
|
||||
hitResult.effectSoundId = json.value(QStringLiteral("effectSoundId")).toInt();
|
||||
hitResult.effectTimeMSec = json.value(QStringLiteral("effectTimeMSec")).toDouble();
|
||||
}
|
||||
|
||||
static void readContaminationStates(const QJsonArray &jsArr, QMap<int, ContaminationState> &contaminationStates)
|
||||
{
|
||||
for (auto index : jsArr)
|
||||
{
|
||||
const QJsonObject &inObj = index.toObject();
|
||||
ContaminationState contStates;
|
||||
contStates.aesId = inObj[QStringLiteral("aesId")].toInt();
|
||||
const QJsonArray &idsArr = inObj[QStringLiteral("rooms")].toArray();
|
||||
|
||||
contStates.rooms.reserve(idsArr.count());
|
||||
for (const auto & id : idsArr)
|
||||
contStates.rooms.push_back(id.toInt());
|
||||
|
||||
contaminationStates.insert(contStates.aesId, contStates);
|
||||
}
|
||||
}
|
||||
|
||||
static QString getStateFilename(const QString &name)
|
||||
{
|
||||
// Linux: QStandardPaths::CacheLocation -> ~/.cache/BuildingControlUnit
|
||||
const QString folder = QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + QLatin1Char('/');
|
||||
if (!QDir(folder).exists())
|
||||
QDir().mkpath(folder);
|
||||
return folder + name;
|
||||
}
|
||||
|
||||
bool saveState(const Building &building, const HitResult &hitResult,const QMap <int, ContaminationState> &contaminationStates)
|
||||
{
|
||||
DEBUG_LOG(logger()) << "**********************";
|
||||
DEBUG_LOG(logger()) << "*** SAVE STATE *** "<< getStateFilename(building.name());
|
||||
DEBUG_LOG(logger()) << "**********************";
|
||||
QFile saveFile(getStateFilename(building.name()));
|
||||
|
||||
|
||||
if (!saveFile.open(QIODevice::WriteOnly))
|
||||
{
|
||||
WARNING_LOG(logger()) << "Couldn't open State file. " << getStateFilename(building.name());
|
||||
return false;
|
||||
}
|
||||
|
||||
QJsonObject saveObject;
|
||||
saveObject[QStringLiteral("Building")] = writeBuilding(building);
|
||||
saveObject[QStringLiteral("HitResult")] = writeHitResult(hitResult);
|
||||
saveObject[QStringLiteral("contaminationStates")] = writeContaminationStates(contaminationStates);
|
||||
|
||||
const QJsonDocument saveDoc(saveObject);
|
||||
saveFile.write(saveDoc.toJson());
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
bool loadState(Building &building, HitResult &hitResult, QMap <int, ContaminationState> &contaminationStates)
|
||||
{
|
||||
DEBUG_LOG(logger()) << "**********************";
|
||||
DEBUG_LOG(logger()) << "*** LOAD STATE *** "<< getStateFilename(building.name());
|
||||
DEBUG_LOG(logger()) << "**********************";
|
||||
QFile loadFile(getStateFilename(building.name()));
|
||||
|
||||
if (!loadFile.open(QIODevice::ReadOnly))
|
||||
{
|
||||
WARNING_LOG(logger()) << "Couldn't open State file. " << getStateFilename(building.name());
|
||||
return false;
|
||||
}
|
||||
|
||||
QByteArray saveData = loadFile.readAll();
|
||||
|
||||
QJsonDocument loadDoc(QJsonDocument::fromJson(saveData));
|
||||
|
||||
readBuilding(loadDoc.object().value(QStringLiteral("Building")).toObject(), building);
|
||||
readHitResult(loadDoc.object().value(QStringLiteral("HitResult")).toObject(), hitResult);
|
||||
readContaminationStates(loadDoc.object().value(QStringLiteral("contaminationStates")).toArray(), contaminationStates);
|
||||
|
||||
return true;
|
||||
}
|
||||
} // namespace StateStore
|
||||
} // namespace VWM
|
||||
} // namespace BuildingControlUnit
|
||||
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Sore actual Damage-State
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLSA, 2013-03-05
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "vwm_building.h"
|
||||
#include "vwm_types.h"
|
||||
#include <VWM/buildingcontrolvwm_export.h>
|
||||
#include <QMap>
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace VWM
|
||||
{
|
||||
namespace StateStore
|
||||
{
|
||||
BUILDINGCONTROLVWM_EXPORT bool saveState(const Building &building,
|
||||
const HitResult &hitResult,
|
||||
const QMap <int, ContaminationState> &contaminationStates);
|
||||
BUILDINGCONTROLVWM_EXPORT bool loadState(Building &building,
|
||||
HitResult &hitResult,
|
||||
QMap <int, ContaminationState> &contaminationStates);
|
||||
} // namespace StateStore
|
||||
} // namespace VWM
|
||||
} // namespace BuildingControlUnit
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Types used for VWM calculations
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLSA, 2013-03-05
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LtsUtilsCore/qpoint3d.h>
|
||||
#include <QMap>
|
||||
#include <QVector>
|
||||
#include <cstdint>
|
||||
#include <iostream>
|
||||
#include <bcu_types.h>
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace VWM
|
||||
{
|
||||
|
||||
struct Charge
|
||||
{
|
||||
int id = 0;
|
||||
int chargeTypeId = 0;
|
||||
int destructiveFactor = 0;
|
||||
int penetrationEffect = 0;
|
||||
int effectSoundId = 0;
|
||||
bool difcueLight = false;
|
||||
bool difcuePyro = false;
|
||||
bool showHitLine = true;
|
||||
|
||||
bool isValid() const
|
||||
{
|
||||
return id != 0;
|
||||
}
|
||||
};
|
||||
|
||||
inline std::ostream &operator<< (std::ostream &stream, const Charge &c)
|
||||
{
|
||||
stream << "id = " << c.id
|
||||
<< ", destructiveFactor = " << c.destructiveFactor
|
||||
<< ", penetrationEffect = " << c.penetrationEffect
|
||||
<< ", effectSoundId = " << c.effectSoundId
|
||||
<< ", difcueLight = " << c.difcueLight
|
||||
<< ", difcuePyro = " << c.difcuePyro;
|
||||
return stream;
|
||||
}
|
||||
|
||||
|
||||
// Incoming hit data
|
||||
struct Hit
|
||||
{
|
||||
int sensorId = 0; // for flash
|
||||
int originatorId = 0;
|
||||
OriginatorType originatorType = OriginatorType::Unknown;
|
||||
TypeOfHit typeOfHit = TypeOfHit::Unknown;
|
||||
int chargeTypeId = 0; // if indirect hit via central effect simulation we already have our internal id
|
||||
int destructiveFactor = 0;
|
||||
int penetrationFactor = 0;
|
||||
int64_t effectTimeMSec = 0;
|
||||
DamageState damageStateOverride = DamageState::Unknown;
|
||||
QVector<int> affectedRoomIds; // for ECC room destruction
|
||||
LtsUtils::QPoint3D position; // relative to building
|
||||
LtsUtils::QPoint3D direction;
|
||||
};
|
||||
inline std::ostream &operator<< (std::ostream &stream, const Hit &hit)
|
||||
{
|
||||
stream << "sensorId = " << hit.sensorId
|
||||
<< ", originatorId = " << hit.originatorId
|
||||
<< ", originatorType = " << hit.originatorType
|
||||
<< ", typeOfHit = " << hit.typeOfHit
|
||||
<< ", chargeTypeId = " << hit.chargeTypeId
|
||||
<< ", effectTimeMSec = " << hit.effectTimeMSec
|
||||
<< ", damageStateOverride = " << hit.damageStateOverride;
|
||||
|
||||
stream << ", affectedRoomIds = (";
|
||||
for (int id : qAsConst(hit.affectedRoomIds))
|
||||
stream << id << ",";
|
||||
stream << ")";
|
||||
|
||||
stream << ", position = " << hit.position
|
||||
<< ", direction = " << hit.direction;
|
||||
|
||||
return stream;
|
||||
}
|
||||
|
||||
// Internal hit data
|
||||
struct HitPosition
|
||||
{
|
||||
enum class State
|
||||
{
|
||||
NoHit,
|
||||
OuterWall,
|
||||
ExclusionZone
|
||||
} state = State::NoHit;
|
||||
|
||||
int roomId = 0;
|
||||
int outerWallIdx = -1;
|
||||
int exclusionZoneIdx = -1;
|
||||
double distance = +100000;
|
||||
};
|
||||
inline std::ostream &operator<< (std::ostream &stream, const HitPosition::State &state)
|
||||
{
|
||||
switch (state)
|
||||
{
|
||||
case HitPosition::State::NoHit: stream << "HitPosition::State::NoHit"; break;
|
||||
case HitPosition::State::OuterWall: stream << "HitPosition::State::OuterWall"; break;
|
||||
case HitPosition::State::ExclusionZone: stream << "HitPosition::State::ExclusionZone"; break;
|
||||
}
|
||||
return stream;
|
||||
}
|
||||
inline std::ostream &operator<< (std::ostream &stream, const HitPosition &hitPos)
|
||||
{
|
||||
stream << "state = " << hitPos.state
|
||||
<< ", roomId = " << hitPos.roomId
|
||||
<< ", outerWallIdx = " << hitPos.outerWallIdx
|
||||
<< ", exclusionZoneIdx = " << hitPos.exclusionZoneIdx
|
||||
<< ", distance = " << hitPos.distance;
|
||||
return stream;
|
||||
}
|
||||
|
||||
|
||||
} // namespace VWM
|
||||
} // namespace namespace BuildingControlUnit
|
||||
@@ -0,0 +1,346 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Read all xml config files
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLSA, 2013-03-05
|
||||
*/
|
||||
|
||||
|
||||
#include "vwm_xml_reader.h"
|
||||
#include "vwm_building_room_geometry.h"
|
||||
#include <logger.h>
|
||||
#include <QFile>
|
||||
#include <QDomDocument>
|
||||
#include <QSet>
|
||||
#include <bcu_xml_reader.h>
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace VWM
|
||||
{
|
||||
namespace XmlReader
|
||||
{
|
||||
|
||||
static NGL::INGLLogger &logger()
|
||||
{
|
||||
return BuildingControlUnit::getLogger("XmlReader");
|
||||
}
|
||||
|
||||
static Charge parseCharge(const QDomElement &domCharge)
|
||||
{
|
||||
Charge charge;
|
||||
charge.id = getTagText(domCharge, QStringLiteral("Id")).toInt();
|
||||
charge.chargeTypeId = getTagText(domCharge, QStringLiteral("ChargeTypeId")).toInt();
|
||||
charge.destructiveFactor = getTagText(domCharge, QStringLiteral("DestructiveFactor")).toInt();
|
||||
charge.penetrationEffect = getTagText(domCharge, QStringLiteral("PenetrationEffect")).toInt();
|
||||
charge.effectSoundId = getTagText(domCharge, QStringLiteral("EffectSound")).toInt();
|
||||
charge.difcueLight = getTagText(domCharge, QStringLiteral("DifcueLight")).toInt() != 0;
|
||||
charge.difcuePyro = getTagText(domCharge, QStringLiteral("DifcuePyro")).toInt() != 0;
|
||||
if (hasTagText(domCharge, QStringLiteral("showHitLine")))
|
||||
charge.showHitLine = getTagText(domCharge, QStringLiteral("showHitLine")).toInt() != 0;
|
||||
else
|
||||
charge.showHitLine = true;
|
||||
DEBUG_LOG(logger()) << "Charge: " << charge;
|
||||
//if (charge.destructiveFactor <= 0)
|
||||
// throw XmlReaderException(QStringLiteral("Destructive factor for charge %1 <= 0 which is not allowed!").arg(charge.id));
|
||||
//if (charge.penetrationEffect < 0)
|
||||
// throw XmlReaderException(QStringLiteral("Penetration effect for charge %1 < 0 which is not allowed!").arg(charge.id));
|
||||
return charge;
|
||||
}
|
||||
|
||||
bool readCharges(const QString &fn, QMap<int, Charge> &charges)
|
||||
{
|
||||
charges.clear();
|
||||
const QDomElement domRoot = readFile(fn, QStringLiteral("Charges"));
|
||||
if (domRoot.isNull())
|
||||
return false;
|
||||
|
||||
QDomElement domChargeType = domRoot.firstChildElement(QStringLiteral("Charge"));
|
||||
while (!domChargeType.isNull())
|
||||
{
|
||||
try
|
||||
{
|
||||
const Charge c = parseCharge(domChargeType);
|
||||
charges.insert(c.chargeTypeId, c);
|
||||
}
|
||||
catch (const XmlReaderException &ex)
|
||||
{
|
||||
QString errorString = QLatin1String("Error reading charge type: ") + QLatin1String(ex.what());
|
||||
ERROR_LOG(logger()) << errorString;
|
||||
return false;
|
||||
}
|
||||
domChargeType = domChargeType.nextSiblingElement(domChargeType.tagName());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static LtsUtils::QPoint3D getCoord3D(const QDomElement &domCoord)
|
||||
{
|
||||
LtsUtils::QPoint3D ret;
|
||||
ret.rx() = getTagText(domCoord, QStringLiteral("X")).toDouble();
|
||||
ret.ry() = getTagText(domCoord, QStringLiteral("Y")).toDouble();
|
||||
ret.rz() = getTagText(domCoord, QStringLiteral("Z")).toDouble();
|
||||
|
||||
// Ein Runden auf cm hat auch Nachteile:
|
||||
// So kommt es vor, das Polygone (in mm) um lineare Abhängigkeiten reduziert
|
||||
// werden können, aber wenn diese auf cm gerundet sind, nicht mehr!!!
|
||||
// Siehe Lts/Proxies/Buildings/BuildingControlUnit/VWM/vwm_math_unit_test.cpp
|
||||
/*static const QVector<LtsUtils::QPoint3D> polyBldg1103_205_5_ORG({
|
||||
{11.639, 6.026, 5.412}, // idx=0
|
||||
{11.639, 2.607, 5.513}, // idx=1 // problem: linear dependent -> wird erkannt
|
||||
{11.639, 1.690, 5.540}, // idx=2
|
||||
{14.659, 1.694, 5.539}, // idx=3
|
||||
{14.659, 6.026, 5.412} // idx=4
|
||||
});
|
||||
static const QVector<LtsUtils::QPoint3D> polyBldg1103_205_5_ROUNDED({
|
||||
{11.64, 6.03, 5.41}, // idx=0
|
||||
{11.64, 2.61, 5.51}, // idx=1 // problem: linear dependent -> wird erkannt
|
||||
{11.64, 1.69, 5.54}, // idx=2
|
||||
{14.66, 1.69, 5.54}, // idx=3
|
||||
{14.66, 6.03, 5.41} // idx=4
|
||||
});
|
||||
*/
|
||||
// ret.setX( roundf(ret.x() * 100) / 100 );
|
||||
// ret.setY( roundf(ret.y() * 100) / 100 );
|
||||
// ret.setZ( roundf(ret.z() * 100) / 100 );
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static NeighbourRoom parseNeighbourRoom(const QDomElement &domNeighbour)
|
||||
{
|
||||
NeighbourRoom ret;
|
||||
ret.setId(getTagText(domNeighbour, QStringLiteral("RoomId")).toInt());
|
||||
ret.setTransitionFactor(getTagText(domNeighbour, QStringLiteral("TransitionFactor")).toDouble());
|
||||
DEBUG_LOG(logger()) << " NeighbourRoom id=" << ret.id() << ", transitionFactor=" << ret.transitionFactor();
|
||||
return ret;
|
||||
}
|
||||
|
||||
static ExclusionZone parseExclusionZone(const QDomElement &domeExclusionZone)
|
||||
{
|
||||
ExclusionZone ret;
|
||||
QVector<LtsUtils::QPoint3D> poly;
|
||||
|
||||
ret.setProtectiveFactor(getTagText(domeExclusionZone, QStringLiteral("ExclusionZoneProtectiveFactor")).toInt());
|
||||
DEBUG_LOG(logger()) << " ExclusionZone protectiveFactor= " << ret.protectiveFactor();
|
||||
QDomElement domExclusionZoneElement = domeExclusionZone.firstChildElement(QStringLiteral("ExclusionZoneElement"));
|
||||
while (!domExclusionZoneElement.isNull())
|
||||
{
|
||||
poly.clear();
|
||||
QDomElement domPolygonPoint = domExclusionZoneElement.firstChildElement(QStringLiteral("PolygonPoint"));
|
||||
while (!domPolygonPoint.isNull())
|
||||
{
|
||||
poly += getCoord3D(domPolygonPoint);
|
||||
domPolygonPoint = domPolygonPoint.nextSiblingElement(domPolygonPoint.tagName());
|
||||
}
|
||||
ret.elements() += poly;
|
||||
domExclusionZoneElement = domExclusionZoneElement.nextSiblingElement(domExclusionZoneElement.tagName());
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
static OuterWall parseOuterWall(const QDomElement &domOuterWall)
|
||||
{
|
||||
OuterWall ret;
|
||||
QVector<LtsUtils::QPoint3D> poly;
|
||||
|
||||
// try {
|
||||
// }
|
||||
// catch (...)
|
||||
// {
|
||||
// ERROR_LOG(logger()) << " OuterWall protectiveFactor set to Default = 200 for bldg_3100";
|
||||
// ret.setProtectiveFactor(0);
|
||||
// }
|
||||
|
||||
ret.setProtectiveFactor(getTagText(domOuterWall, QStringLiteral("OuterWallProtectiveFactor")).toInt());
|
||||
|
||||
DEBUG_LOG(logger()) << " OuterWall protectiveFactor=" << ret.protectiveFactor();
|
||||
{
|
||||
DEBUG_LOG(logger()) << " OuterWallAreaElements:";
|
||||
QDomElement domPolygonPoints = domOuterWall.firstChildElement(QStringLiteral("OuterWallAreaElement"));
|
||||
while (!domPolygonPoints.isNull())
|
||||
{
|
||||
poly.clear();
|
||||
QDomElement domPolygonPoint = domPolygonPoints.firstChildElement(QStringLiteral("PolygonPoint"));
|
||||
while (!domPolygonPoint.isNull())
|
||||
{
|
||||
poly += getCoord3D(domPolygonPoint);
|
||||
domPolygonPoint = domPolygonPoint.nextSiblingElement(domPolygonPoint.tagName());
|
||||
}
|
||||
ret.elements() += poly;
|
||||
domPolygonPoints = domPolygonPoints.nextSiblingElement(domPolygonPoints.tagName());
|
||||
}
|
||||
}
|
||||
{
|
||||
QDomElement domExclusionZones = domOuterWall.firstChildElement(QStringLiteral("ExclusionZones"));
|
||||
QDomElement domExclusionZone = domExclusionZones.firstChildElement(QStringLiteral("ExclusionZone"));
|
||||
DEBUG_LOG(logger()) << " ExclusionZones:";
|
||||
while (!domExclusionZone.isNull())
|
||||
{
|
||||
ret.exclusionZones() += parseExclusionZone(domExclusionZone);
|
||||
domExclusionZone = domExclusionZone.nextSiblingElement(domExclusionZone.tagName());
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static Room parseRoom(const QDomElement &domRoom)
|
||||
{
|
||||
Room ret;
|
||||
|
||||
ret.setId(getTagText(domRoom, QStringLiteral("RoomId")).toInt());
|
||||
DEBUG_LOG(logger()) << "Parsing Room id=" << ret.id();
|
||||
{
|
||||
QDomElement domNeighbours = domRoom.firstChildElement(QStringLiteral("NeighborRooms"));
|
||||
QDomElement domNeighbour = domNeighbours.firstChildElement(QStringLiteral("NeighborRoom"));
|
||||
while (!domNeighbour.isNull())
|
||||
{
|
||||
const NeighbourRoom n = parseNeighbourRoom(domNeighbour);
|
||||
|
||||
auto itNeighbourRoom = ret.neighbours().find(n.id()); // for sanity
|
||||
if (itNeighbourRoom.value().id() == n.id())
|
||||
{
|
||||
WARNING_LOG(logger()) << "Room with id " << n.id()
|
||||
<< " listed twice neighbour of room " << ret.id();
|
||||
}
|
||||
|
||||
ret.neighbours().insert(n.id(), n);
|
||||
domNeighbour = domNeighbour.nextSiblingElement(domNeighbour.tagName());
|
||||
}
|
||||
}
|
||||
{
|
||||
QDomElement domOuterWalls = domRoom.firstChildElement(QStringLiteral("RoomOuterWalls"));
|
||||
QDomElement domOuterWall = domOuterWalls.firstChildElement(QStringLiteral("OuterWall"));
|
||||
while (!domOuterWall.isNull())
|
||||
{
|
||||
const OuterWall w = parseOuterWall(domOuterWall);
|
||||
ret.outerWalls() += w;
|
||||
domOuterWall = domOuterWall.nextSiblingElement(domOuterWall.tagName());
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool readBuilding(const QDomElement &domRoot, Building &cfg)
|
||||
{
|
||||
if (domRoot.isNull())
|
||||
return false;
|
||||
|
||||
cfg.rooms().clear();
|
||||
|
||||
try
|
||||
{
|
||||
cfg.setName(getTagText(domRoot, QStringLiteral("BuildingName")));
|
||||
cfg.setModelId(getTagText(domRoot, QStringLiteral("ModelId")).toInt());
|
||||
cfg.setBuildingProtectionLevel(getTagText(domRoot, QStringLiteral("BuildingProtectionLevel")).toDouble());
|
||||
cfg.setExclusionZoneProtectionLevel(getTagText(domRoot, QStringLiteral("ExclusionZoneProtectionLevel")).toInt());
|
||||
cfg.setOuterWallProtectionLevel(getTagText(domRoot, QStringLiteral("OuterWallProtectionLevel")).toInt());
|
||||
DEBUG_LOG(logger()) << "**********************";
|
||||
DEBUG_LOG(logger()) << "*** BUILDING: ***";
|
||||
DEBUG_LOG(logger()) << "**********************";
|
||||
|
||||
DEBUG_LOG(logger()) << "readBuilding name=" << cfg.name();
|
||||
DEBUG_LOG(logger()) << "readBuilding modelId=" << cfg.modelId();
|
||||
DEBUG_LOG(logger()) << "readBuilding buildingProtectionLevel=" << cfg.buildingProtectionLevel();
|
||||
DEBUG_LOG(logger()) << "readBuilding exclusionZoneProtectionLevel=" << cfg.exclusionZoneProtectionLevel();
|
||||
DEBUG_LOG(logger()) << "readBuilding outerWallProtectionLevel=" << cfg.outerWallProtectionLevel();
|
||||
|
||||
|
||||
QDomElement domRooms = domRoot.firstChildElement(QStringLiteral("Rooms"));
|
||||
QDomElement domRoom = domRooms.firstChildElement(QStringLiteral("Room"));
|
||||
while (!domRoom.isNull())
|
||||
{
|
||||
try
|
||||
{
|
||||
const Room r = parseRoom(domRoom);
|
||||
cfg.rooms().insert(r.id(), r);
|
||||
}
|
||||
catch (const XmlReaderException &ex)
|
||||
{
|
||||
QString errorString = QLatin1String("Error reading room config: ") + QLatin1String(ex.what());
|
||||
ERROR_LOG(logger()) << errorString;
|
||||
return false;
|
||||
}
|
||||
domRoom = domRoom.nextSiblingElement(domRoom.tagName());
|
||||
}
|
||||
}
|
||||
catch (const XmlReaderException &ex)
|
||||
{
|
||||
QString errorString = QLatin1String("Error reading BSMConfiguration: ") + QLatin1String(ex.what());
|
||||
ERROR_LOG(logger()) << errorString;
|
||||
return false;
|
||||
}
|
||||
|
||||
QMap<int, Room> rooms = cfg.rooms();
|
||||
QMap<int, Room>::iterator room = rooms.begin();
|
||||
while (room != rooms.end())
|
||||
{
|
||||
auto itNeighbourRoom = room.value().neighbours().find(room.value().id());
|
||||
if (room.value().id() == itNeighbourRoom.value().id())
|
||||
{
|
||||
WARNING_LOG(logger()) << "Room with id " << itNeighbourRoom.value().id()
|
||||
<< " was defined as neighbour of itself!";
|
||||
}
|
||||
|
||||
QMap<int, NeighbourRoom> &neighbours = room.value().neighbours();
|
||||
QMap<int, NeighbourRoom>::iterator neighbour = neighbours.begin();
|
||||
while (neighbour != neighbours.end())
|
||||
{
|
||||
auto itRoom = rooms.find(neighbour.value().id());
|
||||
if (neighbour.value().id() != itRoom.value().id())
|
||||
{
|
||||
WARNING_LOG(logger()) << "Could not find room with id " << neighbour.value().id()
|
||||
<< " which was defined as neighbour of room " << room.value().id();
|
||||
}
|
||||
++neighbour;
|
||||
}
|
||||
++room;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool readBuilding(const QString &fn, Building &cfg)
|
||||
{
|
||||
const QDomElement domRoot = readFile(fn, QStringLiteral("BuildingVulnerability"));
|
||||
return readBuilding(domRoot, cfg);
|
||||
}
|
||||
|
||||
bool readBuilding(const QByteArray &data, Building &cfg)
|
||||
{
|
||||
QDomDocument doc;
|
||||
QString errorMsg;
|
||||
int errorLine;
|
||||
int errorColumn;
|
||||
if (!doc.setContent(data, &errorMsg, &errorLine, &errorColumn))
|
||||
{
|
||||
ERROR_LOG(logger()) << "Line=" << errorLine << ", Column=" << errorColumn << ": " << errorMsg;
|
||||
return false;
|
||||
} // if
|
||||
const QDomElement domRoot = doc.documentElement();
|
||||
return readBuilding(domRoot, cfg);
|
||||
}
|
||||
|
||||
bool readBuildingGeometry(const QDomElement &domRoot, BuildingRoomGeometry &bldgGeometry)
|
||||
{
|
||||
if (domRoot.isNull())
|
||||
return false;
|
||||
|
||||
const QDomElement &domHdr = domRoot.firstChildElement(QStringLiteral("Header"));
|
||||
const QDomElement &domGroup = domHdr.firstChildElement(QStringLiteral("Group"));
|
||||
|
||||
return bldgGeometry.init(domGroup);
|
||||
}
|
||||
|
||||
bool readBuildingGeometry(const QString &fn, BuildingRoomGeometry &bldgGeometry)
|
||||
{
|
||||
const QDomElement domRoot = readFile(fn, QStringLiteral("STREIF"));
|
||||
return readBuildingGeometry(domRoot, bldgGeometry);
|
||||
}
|
||||
|
||||
} // namespace XmlReader
|
||||
} // namespace VWM
|
||||
} // namespace BuildingControlUnit
|
||||
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Read all xml config files
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLSA, 2013-03-05
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "vwm_building.h"
|
||||
#include "vwm_building_room_geometry.h"
|
||||
#include "vwm_types.h"
|
||||
#include <VWM/buildingcontrolvwm_export.h>
|
||||
#include <QMap>
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace VWM
|
||||
{
|
||||
namespace XmlReader
|
||||
{
|
||||
BUILDINGCONTROLVWM_EXPORT bool readCharges(const QString &fn, QMap<int, Charge> &charges);
|
||||
BUILDINGCONTROLVWM_EXPORT bool readBuilding(const QString &fn, Building &cfg);
|
||||
BUILDINGCONTROLVWM_EXPORT bool readBuilding(const QByteArray &data, Building &cfg);
|
||||
BUILDINGCONTROLVWM_EXPORT bool readBuildingGeometry(const QString &fn, BuildingRoomGeometry &bldgGeometry);
|
||||
} // namespace XmlReader
|
||||
} // namespace VWM
|
||||
} // namespace BuildingControlUnit
|
||||
Reference in new issue
Block a user