Making an Ultrasonic Anemometer Using Just 2 Ultrassonic Sensors (HC-SR04)

Hello! I have an arduino project in the making that consists in an anemometer using 2 ultrassonic sensors (HC-SR04) pointing at one another, and using an BME280 to get the current temperature to make some calculations for more accurate wind speed measurements. My goal is to make sure the values are decently accurate, considering that im only measuring the wind speed only in one axis (otherwise i would be using 4 sensors). It also sends the data into the arduino cloud easily.

Now, my problem reaches in the accurateness of the measurements. Me and my teacher are trying to understand if having the ultrasonic sensors aiming at one another would allow me to decently measure the wind speed (putting one sensor against the wind and the other in favor). Here's the code:

#include <ArduinoIoTCloud.h>
#include <Arduino_ConnectionHandler.h>
#include <WiFi.h>
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BME280.h>

// Wi-Fi Credentials
const char WIFI_SSID[] = "test";       // Wi-Fi Name
const char WIFI_PASSWORD[] = "test";  // Wi-Fi Password

// Variables synchronized with Arduino IoT Cloud
float temperature;
float humidity;
float pressure;
float windSpeed;
String beaufortCategory;

// Configuration for ultrasonic sensor 1
const int TriggerPin1 = 11;
const int EchoPin1 = 10;

// Configuration for ultrasonic sensor 2
const int TriggerPin2 = 11;
const int EchoPin2 = 12;

// Variables to store the time measured by the ultrasonic sensors
long Duration1 = 0;
long Duration2 = 0;

// Distance between the sensors (in meters)
const float DistanceBetweenSensors = 0.3; // 30 cm

// I2C Address for BME280 sensor
#define BME280_ADDRESS 0x76

// Creating an object for the BME280 sensor
Adafruit_BME280 bme;

// Function to calculate the distance (in cm) from the measured time
float Distance(long time) {
  return (((float)time * 0.034) / 2.0); // Conversion to centimeters
}

// Function to calculate the speed of sound using the thermodynamic formula
float calculateThermodynamicSoundSpeed(float temperature) {
  const float gamma = 1.4; // Specific heat ratio for dry air
  const float R = 8.314;   // Universal gas constant [J/(mol·K)]
  const float M = 0.0289644; // Molar mass of dry air [kg/mol]

  // Convert temperature from Celsius to Kelvin
  float temperatureK = temperature + 273.15;

  // Apply thermodynamic formula
  return sqrt((gamma * R * temperatureK) / M);
}

// Function to calculate wind speed
float calculateWindSpeed(float distance, long t1, long t2) {
  float t1_s = t1 * 1e-6; // Convert to seconds
  float t2_s = t2 * 1e-6; // Convert to seconds
  Serial.print("Sensor 1 time (t1_s): ");
  Serial.print(t1_s, 6); // Display 6 decimal places for higher precision
  Serial.println(" s");

  Serial.print("Sensor 2 time (t2_s): ");
  Serial.print(t2_s, 6); // Display 6 decimal places for higher precision
  Serial.println(" s");
  return (distance / 2.0) * (1.0 / t1_s - 1.0 / t2_s); // Wind speed formula
}

// Function to classify wind speed based on the Beaufort scale
String beaufortScale(float windSpeed) {
  if (abs(windSpeed) < 0.3) return "Calm";
  if (abs(windSpeed) < 1.6) return "Light Air";
  if (abs(windSpeed) < 3.4) return "Light Breeze";
  if (abs(windSpeed) < 5.5) return "Gentle Breeze";
  if (abs(windSpeed) < 7.9) return "Moderate Breeze";
  if (abs(windSpeed) < 10.7) return "Fresh Breeze";
  if (abs(windSpeed) < 13.8) return "Strong Breeze";
  if (abs(windSpeed) < 17.1) return "High Wind";
  if (abs(windSpeed) < 20.7) return "Gale";
  if (abs(windSpeed) < 24.4) return "Strong Gale";
  if (abs(windSpeed) < 28.4) return "Storm";
  if (abs(windSpeed) < 32.6) return "Violent Storm";
  return "Hurricane";
}

// Initialize the variables in IoT Cloud
void initProperties() {
  ArduinoCloud.addProperty(temperature, READ, 1 * SECONDS, NULL);
  ArduinoCloud.addProperty(humidity, READ, 1 * SECONDS, NULL);
  ArduinoCloud.addProperty(pressure, READ, 1 * SECONDS, NULL);
  ArduinoCloud.addProperty(windSpeed, READ, 1 * SECONDS, NULL);
  ArduinoCloud.addProperty(beaufortCategory, READ, 1 * SECONDS, NULL);
}

// Connection manager configuration
WiFiConnectionHandler ArduinoIoTPreferredConnection(WIFI_SSID, WIFI_PASSWORD);

void setup() {
  // Initialize serial communication
  Serial.begin(9600);
  while (!Serial);

  // Configure the pins for ultrasonic sensors
  pinMode(TriggerPin1, OUTPUT);
  pinMode(EchoPin1, INPUT);
  pinMode(TriggerPin2, OUTPUT);
  pinMode(EchoPin2, INPUT);

  // Initialize the BME280 sensor
  if (!bme.begin(BME280_ADDRESS)) {
    Serial.println("Failed to initialize BME280 sensor. Check connections.");
    while (1); // Infinite loop in case of critical error
  }

  // Initialize IoT Cloud
  initProperties();
  ArduinoCloud.begin(ArduinoIoTPreferredConnection);

  Serial.println("Setup completed!");
}

void loop() {
  // Update IoT Cloud
  ArduinoCloud.update();

  // Read data from ultrasonic sensors
  digitalWrite(TriggerPin1, LOW);
  delayMicroseconds(2);
  digitalWrite(TriggerPin1, HIGH);
  delayMicroseconds(10);
  digitalWrite(TriggerPin1, LOW);
  Duration1 = pulseIn(EchoPin1, HIGH);

  digitalWrite(TriggerPin2, LOW);
  delayMicroseconds(2);
  digitalWrite(TriggerPin2, HIGH);
  delayMicroseconds(10);
  digitalWrite(TriggerPin2, LOW);
  Duration2 = pulseIn(EchoPin2, HIGH);

  // Calculate distances measured by the sensors
  float Distance1_cm = Distance(Duration1);
  float Distance2_cm = Distance(Duration2);

  // Read data from the BME280 sensor
  temperature = bme.readTemperature();
  humidity = bme.readHumidity();
  pressure = bme.readPressure() / 100.0F;

  // Calculate sound speed and wind speed
  float soundSpeedThermodynamic = calculateThermodynamicSoundSpeed(temperature);
  windSpeed = calculateWindSpeed(DistanceBetweenSensors, Duration1, Duration2);

  // Classify wind speed using the Beaufort scale
  beaufortCategory = beaufortScale(windSpeed);

  // Display sensor readings and calculations
  Serial.print("Sensor 1 Distance = ");
  Serial.print(Distance1_cm, 3);
  Serial.println(" cm");

  Serial.print("Sensor 2 Distance = ");
  Serial.print(Distance2_cm, 3);
  Serial.println(" cm");

  long TimeDifference = Duration1 - Duration2;
  Serial.print("Time Difference = ");
  Serial.print(TimeDifference);
  Serial.println(" microseconds");

  Serial.print("Temperature: ");
  Serial.print(temperature);
  Serial.print(" °C | Humidity: ");
  Serial.print(humidity);
  Serial.print(" % | Pressure: ");
  Serial.print(pressure);
  Serial.println(" hPa");

  Serial.print("Sound Speed (Thermodynamic): ");
  Serial.print(soundSpeedThermodynamic);
  Serial.println(" m/s");

  Serial.print("Wind Speed: ");
  Serial.print(windSpeed);
  Serial.print(" m/s (");
  Serial.print(beaufortCategory);
  Serial.println(")");

  Serial.println("---------------------------");

  delay(3000);
}

Output:
19:01:11.573 -> Connection to "test" failed (i turned off the cloud for now)
19:01:11.573 -> Retrying in "500" milliseconds
19:01:12.560 -> Sensor 1 time (t1_s): 0.000780 s
19:01:12.560 -> Sensor 2 time (t2_s): 0.000000 s
19:01:12.592 -> Sensor 1 Distance = 13.260 cm
19:01:12.592 -> Sensor 2 Distance = 0.000 cm
19:01:12.592 -> Time Difference = 780 microseconds
19:01:12.592 -> Temp: 17.86 °C | Humidity: 65.40 % | Pressure: 983.03 hPa
19:01:12.592 -> Sound Speed (Thermodynamic): 341.97 m/s
19:01:12.592 -> Wind Speed: inf m/s (Hurricane)

And here's the project so far:

(The sensors are 31cm apart)

As you can see, i have both of the sensor's triggers on the same pin, with the goal of making sure both of the measurements occur exactly at the same time, but i have not been able to achieve it. The first sensor only reads half the distance it should (reads 13-15, should read 30-29) and the second one doesnt even work anymore. Separating the triggers as i did in the beginning allows the project to work, but even with a commercial anemometer in hand i can't prove it works even with decent wind happening, as the readings are too off from the commercial one.

Basicly, i wanted to know if someone has as idea on how to put both the sensors working rightfully using the same trigger, because i believe that could be the problem in making it more accurate.

Kind regards and thanks for any help!

PS: My english is not the best, if i didnt tackle something important let me know pls