-
Notifications
You must be signed in to change notification settings - Fork 4
Multilevel Wind Model
Wind data can be provided to calculate the wind speed and direction at the current altitude of the rocket.
This feature can be enabled by adding the DataFile
to the section WindModel
in the configuration ini
-file.
If no wind data is provided, the standard settings in the ork
file are used.
Wind data can be given in an additional text file, containing the following data in four columns separated by whitespace:
- Altitude (in m)
- Direction (in degree; where is the wind coming from, i.e., 0degree means northerly wind)
- Wind speed (in m/s)
- Direction standard deviation (in degree)
Add the path to this file to the WindModel
section to the key DataFile
The turbulence model used by OpenRocket won't be changed: The turbulence intensity set in the ork
file will be applied to calculate the standard deviation of the pink noise model, using the average windspeed interpolated at the current height by the data given in DataFile.
By default, the current wind speed + direction is calculated at the current altitude by using a linear interpolation separatly in North/East direction.
With the command line option w
or wind
you can let diana
visualize the wind data from the specified file, e.g.,
diana -w
creates the following figure
Use aviation aloft data, or wind predictions from, e.g., windy.com
- USA
- copy data from https://www.aviationweather.gov/windtemp/data?level=low&fcst=06®ion=sfo&layout=on&date=
- or alternatively AFTERNOON WINDS ALOFT FORECAST https://forecast.weather.gov/product.php?site=NWS&product=SRG&issuedby=REV
- or https://rucsoundings.noaa.gov/
- or could be downloaded automatically via https://api.weather.gov/products/types/FD8/locations/US7 and https://api.weather.gov/products/types/FD1/locations/US1
- Poland: https://awiacja.imgw.pl/en/airmet-2/#
- Worldwide: https://www.windy.com/39.984/-119.697?500h,39.592,-120.048,8,i:pressure
Another elegant way is using rocketpy. The following code snipped generates a compatible file from GFS forcast for the given time and location
from rocketpy import Environment
import datetime
import csv
tomorrow = datetime.date.today() + datetime.timedelta(days=1)
date_info = (tomorrow.year, tomorrow.month, tomorrow.day, 9) # Hour given in UTC time
print("Tomorrow's date:", date_info)
EnvGFS = Environment(railLength=6.1,
date=date_info,
latitude=-35.34692,
longitude=-117.80815 )
EnvGFS.setAtmosphericModel(type='Forecast', file='GFS')
EnvGFS.allInfo()
wind_alt = EnvGFS.height
wind_speed = EnvGFS.windSpeed(wind_alt)
print(wind_speed)
wind_direction = EnvGFS.windDirection(wind_alt)
print(wind_direction)
with open("wind_GFS.txt", 'w', newline='') as csvfile:
resultwriter = csv.writer(csvfile, delimiter=' ')
resultwriter.writerow(["# altitude (m)",
"wind direction (°)",
"wind speed (m/s)",
"direction std deviation (°)"])
for alt, direction, speed in zip(
wind_alt, wind_direction, wind_speed):
resultwriter.writerow([
"%.2f" % alt,
"%.2f" % direction,
"%.2f" % speed,
"%.2f" % 5.])