Skip to content

Martin-Morrey/shade-path

Repository files navigation

Shade Path

Description

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.

Usage

Initiate the ShadePath object

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

Traverse a Path (runCircuits)

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

Results

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 labeldata typedescription
datetimedatetimeUTC datetime
local-timedatetimelocal datetime
aboveHorizonboolean1 if the sun is above the horizon, 0 if it's below
solarAltitudefloatsolar altitude angle in degrees
azimuthfloatsolar azimuth angle in degrees
insolationfloatInsolation in W/m2
chordfloatdistance from the target to the point where the line reaches the given altitude
distancefloatchord distance adjusted to account for the curvature of the earth
shading-longitude floatlongitude in degrees, meaning dependent on mode
shading-latitudefloatlatitude in degrees, meaning dependent on mode

Create a Map of the Path (staticMap)

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.

Examples of Use

run-shade-path.py

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:

  1. Path followed by a autonomous airborne sunshade targeting this location
  2. Shade cast by an airborne sunshade tethered at this location

insolation_plots.ipynb

Jupiter notebook demonstrating how to create a plot of insolation

Dependencies

Uses the following Python modules:

About

Plotting shade cast by an airborne object tethered at a specific location, or the path and object would need to fly to target shade at a particular location

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages