solarsystem.functions module

solarsystem.functions.Planet_Sun(M, e, a, N, w, i)[source]

Helper Function. From planet’s trajectory elements to position around sun

Returns:position elements
Return type:tuple
solarsystem.functions.demical2arcs(num)[source]

Convert Demical view to Degrees and minutes.

Parameters:num (float) – degrees to be converted.
Returns:one string representation in degrees and minutes format.
Return type:str
solarsystem.functions.demical2clock(demicaltime)[source]

Convert demical time view to Hours, Minutes and Seconds.

Parameters:demicaltime (float) – time to be converted.
Returns:one string representation in hours, minutes format.
Return type:str
solarsystem.functions.demical2hms(degrees)[source]

Convert degrees to string representation of hours, minutes and seconds.

Parameters:degrees (float) – degrees to be converted.
Returns:one string representation in hours, minutes and seconds format.
Return type:str
solarsystem.functions.ecliptic2equatorial(xeclip, yeclip, zeclip, oblecl)[source]

Transform ecliptic to equatorial projection.

Parameters:
  • xeclip – value on x axis of ecliptic plane.
  • yeclip – value on y axis of ecliptic plane.
  • zeclip – value on z axis of ecliptic plane.
  • oblecl – obliquity of the ecliptic, approximately 23.4 degrees for earth
Returns:

x, y, z equatorial projection

Return type:

tuple

solarsystem.functions.equatorial2ecliptic(xequat, yequat, zequat, oblecl)[source]

Transform equatorial to ecliptic projection.

Parameters:
  • xequat – value on x axis of equatorial plane
  • yequat – value on y axis of equatorial plane
  • zequat – value on z axis of equatorial plane
  • oblecl – obliquity of the ecliptic, approximately 23.4 degrees for earth
Returns:

x, y, z ecliptic projection

Return type:

tuple

solarsystem.functions.normalize(degrees)[source]

set degrees always between 0 - 360

Parameters:degrees (float) – degrees to be adjusted
Returns:degrees between 0-360
Return type:float
solarsystem.functions.rectangular2spherical(x, y, z)[source]

Transform rectangular to spherical projection.

From rectangular(x,y,z) coordinates system to spherical (RA,Decl, r) or by replacing x with azimuth and y with altitude we can tranform horizontal coordinates to ecliptic (longitude, latitude).

Parameters:
  • x – value on x axis of a rectangular projection.
  • y – value on y axis of a rectangular projection.
  • z – value on z axis of a rectangular projection.
Returns:

RA, Decl, r spherical coordinate system.

Return type:

tuple

solarsystem.functions.spherical2rectangular(RA, Decl, r)[source]

Transform spherical to rectangular projection.

From spherical (RA,Decl) coordinates system to rectangular(x,y,z) or by replacing RA with longitude and Decl with latitude we can tranform ecliptic coordinates to horizontal (azimuth,altitude).

Parameters:
  • RA – Right Ascension.
  • Decl – Declination.
  • r – Distance in astronomical units.
Returns:

x, y, z rectangular coordinate system.

Return type:

tuple

solarsystem.functions.spherical_ecliptic2equatorial(long, lat, distance, oblecl)[source]

Transform eclipitc to spherical projection for given obliquity.

From spherical (RA, Decl, distance) coordinates system to eclipitc(long, lat, distance).

Parameters:
  • long – Longitude.
  • last – Latitude.
  • distance – Distance in astronomical units.
  • oblecl – obliquity (axial tilt).
Returns:

RA, Decl, distance spherical coordinate system.

Return type:

tuple

solarsystem.functions.spherical_equatorial2ecliptic(RA, Decl, distance, oblecl)[source]

Transform spherical to eclipitc projection for given obliquity.

From spherical (RA, Decl, distance) coordinates system to eclipitc(long, lat, distance).

Parameters:
  • RA – Right Ascension.
  • Decl – Declination.
  • distance – Distance in astronomical units.
  • oblecl – obliquity (axial tilt).
Returns:

long, lat, distance eclipitc coordinate system.

Return type:

tuple

solarsystem.functions.sun2planet(xeclip, yeclip, zeclip, x, y, z)[source]

Helper Function. From Hliocentric to Geocentric position

Returns:geocentric view of object.
Return type:tuple