Calculates and plots the path used to create targeted shade, or formed by a fixed sunshade, for 24 hours on given date(s). Also records insolation for the same time periods.
It is used to calculate and visualise either:
- The path an airborne craft would need to follow to shade a specific point on the Earth's surface
- The path followed by shade cast from a fixed point in the air
It needs be supplied with an altitude in km, the location of a point on the Earth's surface, one-or-more dates, and a time-interval.
myPath = ShadePath(latitude, longitude,target_altitude,mode)
Where:
- target_altitude is an alitude in kilometeres, e.g. 12
- mode is 'mobile' or 'static'
- latitude and longitude in degrees specify a location on the Earth's surface
- In 'static' mode, this where a shade would be positioned
- In 'mobile' mode, this is the target point on the ground
myPath.runCircuits(dates,timezone_offset_string,interval)
Where:
- timezone_offset_string specifies the offset from UST at the target location, e.g. "-08:00"
- dates is a list of dates to include on the same plot, in standard form, e.g. "
['2023-06-01','2023-06-20']" - interval is the time interval used between plotting points on the path, in minutes
- 10 minutes makes a reasonably smooth plot
runCircuits populates a 'results' data frame on the ShadePath object (e.g. myPath.results), storing the calculated attributes at each time interval for each date, which contains the following key columns:
| column label | data type | description |
|---|---|---|
| datetime | datetime | UTC datetime |
| local-time | datetime | local datetime |
| aboveHorizon | boolean | 1 if the sun is above the horizon, 0 if it's below |
| solarAltitude | float | solar altitude angle in degrees |
| azimuth | float | solar azimuth angle in degrees |
| insolation | float | Insolation in W/m2 |
| chord | float | distance from the target to the point where the line reaches the given altitude |
| distance | float | chord distance adjusted to account for the curvature of the earth |
| shading-longitude | float | longitude in degrees, meaning dependent on mode |
| shading-latitude | float | latitude in degrees, meaning dependent on mode |
myMap = myPath.staticMap(line_colours,dot_colour)
Where:
- line_colours is a list of colours to be used for the paths for each date in the list of dates
- i.e. there should be the same number of colours as dates
- dot_colour is the colour to be used for
- the position of the shade in 'static' mode
- the position of the shading target in 'mobile' mode
Fixed attributes that could/should be parameters:
- Projection: Uses an azimuthal equidistant projection.
- Area around the target location: Uses 0.5 degrees range in latitude and longitude
Returns a Basemap object, although this is only needed if further map manipulation is required.
run-shade-path.py is an example script used to run Shade Path
It creates two plots for the same two dates, at the same fixed location on the Earth's surface:
- Path followed by a autonomous airborne sunshade targeting this location
- Shade cast by an airborne sunshade tethered at this location
Jupiter notebook demonstrating how to create a plot of insolation
Uses the following Python modules: