[WiP] Added Cloud configuration check for proxy and setting up (if required)

This commit is contained in:
Quentin WEPHRE
2025-10-08 17:51:27 +02:00
parent 46a3c444dd
commit 49ce327722
6 changed files with 369 additions and 26 deletions

View File

@@ -0,0 +1,43 @@
import math
# Given values
V_LL_AB = 135 # Line-to-line voltage AB in Volts
V_LL_BC = 0 # Line-to-line voltage BC in Volts
V_LL_CA = 135 # Line-to-line voltage CA in Volts
I_A = 0.1 # Current in phase A in Amperes
I_B = 0 # Current in phase B in Amperes
I_C = 0 # Current in phase C in Amperes
cos_phi_A = 0.98 # Power factor for phase A
cos_phi_B = 1 # Power factor for phase B
cos_phi_C = 1 # Power factor for phase C
# Calculate phase voltage from line-to-line voltage
V_ph = V_LL_AB / math.sqrt(3)
# Power calculations for each phase
# Phase A
P_A = V_ph * I_A * cos_phi_A
Q_A = V_ph * I_A * math.sqrt(1 - cos_phi_A**2) if I_A > 0 else 0
# Phase B
P_B = V_ph * I_B * cos_phi_B
Q_B = V_ph * I_B * math.sqrt(1 - cos_phi_B**2) if I_B > 0 else 0
# Phase C
P_C = V_ph * I_C * cos_phi_C
Q_C = V_ph * I_C * math.sqrt(1 - cos_phi_C**2) if I_C > 0 else 0
# Total power calculations
P_total = P_A + P_B + P_C
Q_total = Q_A + Q_B + Q_C
# Output the results
print(f"Phase Voltage (V_ph): {V_ph:.2f} V")
print(f"Active Power (P_A): {P_A:.2f} W")
print(f"Reactive Power (Q_A): {Q_A:.2f} VAR")
print(f"Active Power (P_B): {P_B:.2f} W")
print(f"Reactive Power (Q_B): {Q_B:.2f} VAR")
print(f"Active Power (P_C): {P_C:.2f} W")
print(f"Reactive Power (Q_C): {Q_C:.2f} VAR")
print(f"Total Active Power (P_total): {P_total:.2f} W")
print(f"Total Reactive Power (Q_total): {Q_total:.2f} VAR")

View File

@@ -0,0 +1,55 @@
#!/bin/bash
for i in $(seq -w 1 57); do
# Expand matching folders
matches=( ${i}cube-* )
# Case 1: no match (literal string left)
if [ "${matches[0]}" = "${i}cube-*" ]; then
echo "❌ No folder found for prefix ${i}cube-xxxxx"
continue
fi
# Case 2: more than one match
if [ "${#matches[@]}" -ne 1 ]; then
echo "⚠️ Multiple folders found for prefix ${i}cube-xxxxx: ${matches[*]}"
continue
fi
folder="${matches[0]}"
echo "✅ Found folder: $folder"
dataset_dir="$folder/SMALL_DATASET"
if [ -d "$dataset_dir" ]; then
echo " SMALL_DATASET exists"
# Count CSV files
csv_count=$(find "$dataset_dir" -maxdepth 1 -type f -name "*.csv" | wc -l)
if [ "$csv_count" -eq 4 ]; then
echo " ✅ Found 4 CSV files"
else
echo " ⚠️ Found $csv_count CSV files (expected 4)"
fi
else
echo " ❌ SMALL_DATASET folder missing"
fi
dataset_dir="$folder/MEDIUM_DATASET"
if [ -d "$dataset_dir" ]; then
echo " MEDIUM_DATASET exists"
# Count CSV files
csv_count=$(find "$dataset_dir" -maxdepth 1 -type f -name "*.csv" | wc -l)
if [ "$csv_count" -eq 2 ]; then
echo " ✅ Found 2 CSV files"
else
echo " ⚠️ Found $csv_count CSV files (expected 2)"
fi
else
echo " ❌ MEDIUM_DATASET folder missing"
fi
done