Combustion API Reference
combustion
Provides functions to determine if a planet is in combustion.
CombustFunction
Callable combustion function for Skyfield's find_discrete.
Source code in ndastro_engine/combustion.py
__call__(t)
Return True if the planet is combust at the given time.
Source code in ndastro_engine/combustion.py
__init__(planet_name, latitude, longitude, orb)
Initialize a new instance of the combustion function.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
planet_name
|
str
|
The name of the planet to check (Skyfield code). |
required |
latitude
|
float
|
The latitude of the observation location. |
required |
longitude
|
float
|
The longitude of the observation location. |
required |
orb
|
float
|
Combustion orb in degrees. |
required |
Source code in ndastro_engine/combustion.py
find_combust_periods(start_date, end_date, planet_name, latitude, longitude)
Calculate combustion periods for a planet within a specified date range.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start_date
|
datetime
|
The start date of the period to check. |
required |
end_date
|
datetime
|
The end date of the period to check. |
required |
planet_name
|
str
|
The name of the planet to check (Skyfield code). |
required |
latitude
|
float
|
The latitude of the observation location. |
required |
longitude
|
float
|
The longitude of the observation location. |
required |
Returns:
| Type | Description |
|---|---|
list[tuple[datetime, datetime]]
|
List of (start, end) datetimes representing combustion periods. |
Source code in ndastro_engine/combustion.py
is_planet_in_combust(check_date, planet_name, latitude, longitude)
Check if a planet is combust on a specific date.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
check_date
|
datetime
|
The date to check for combustion. |
required |
planet_name
|
str
|
The name of the planet to check (Skyfield code). |
required |
latitude
|
float
|
The latitude of the observation location. |
required |
longitude
|
float
|
The longitude of the observation location. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
A tuple containing a boolean indicating if the planet is combust, |
datetime | None
|
the start datetime of the combustion period, and the end datetime of the combustion period. |
datetime | None
|
If the planet is not combust, the start and end datetimes will be None. |