Hello everyone, I found a Martian weather csv file. I was wondering if it is possible to change ladybugs logic that the site is located on Earth with those or Mars:
import astropy.units as u
from astropy.constants import R_mars, R_sun
def mars_parameters():
-
axial tilt of Mars in degrees*
-
axial_tilt = 25.19*
-
orbital radius of Mars in kilometers*
-
orbital_radius = (1.523679 * u.AU).to(u.km)*
-
orbital period of Mars in Earth days*
-
orbital_period = 686.97 * u.day*
-
length of a year on Mars in Earth days*
-
year_length = 365.24 * u.day*
-
return axial_tilt, orbital_radius, orbital_period, year_length*
# Get the parameters for Mars
axial_tilt, orbital_radius, orbital_period, year_length = mars_parameters()
print(f"Axial tilt of Mars: {axial_tilt} degrees")
print(f"Orbital radius of Mars: {orbital_radius.value} kilometers")
print(f"Orbital period of Mars: {orbital_period.value} days")
print(f"Year length on Mars: {year_length.value} days")
or maybe
import numpy as np
def position_of_planet(time, axial_tilt, orbital_radius, orbital_period, year_length):
-
Calculate the position of the planet in its orbit*
- theta = 2 * np.pi * time / orbital_period*
-
-
Determine the x, y, and z coordinates of the planet*
- x = orbital_radius * np.cos(theta)*
- y = orbital_radius * np.sin(theta) * np.cos(axial_tilt)*
- z = orbital_radius * np.sin(theta) * np.sin(axial_tilt)*
-
- return x, y, z*
# Constants for Mars
axial_tilt = 25.19
orbital_radius = 1.52
orbital_period = 1.88
year_length = 686.98
# Determine the position of Mars relative to the Sun at a given time
time = 100 # in days
x, y, z = position_of_planet(time, axial_tilt, orbital_radius, orbital_period, year_length)
print(“The position of Mars relative to the Sun is ({:.2f}, {:.2f}, {:.2f})”.format(x, y, z))
meaning that if ladybug default is set with Mars location and stats all I need to do is import an epw or a list of values to the ladybug component with coordinates and it will work?