FlightGear next
bodysolver.hxx File Reference
#include <simgear/compiler.h>
#include <ctime>

Go to the source code of this file.

Functions

time_t fgTimeSecondsUntilBodyAngle (time_t cur_time, const SGGeod &loc, double target_angle_deg, bool ascending, bool sun_not_moon)
 Given the current unix time in seconds, calculate seconds to the specified solar system body angle (relative to straight up.) Also specify if we want the angle while the body is ascending or descending.
 
void fgBodyPositionGST (double gst, double &lon, double &lat, bool sun_not_moon)
 given a particular time expressed in side real time at prime meridian (GST), compute position on the earth (lat, lon) such that solar system body is directly overhead.
 

Function Documentation

◆ fgBodyPositionGST()

void fgBodyPositionGST ( double gst,
double & lon,
double & lat,
bool sun_not_moon )

given a particular time expressed in side real time at prime meridian (GST), compute position on the earth (lat, lon) such that solar system body is directly overhead.

(lat, lon are reported in radians)

Definition at line 53 of file bodysolver.cxx.

◆ fgTimeSecondsUntilBodyAngle()

time_t fgTimeSecondsUntilBodyAngle ( time_t cur_time,
const SGGeod & loc,
double target_angle_deg,
bool ascending,
bool sun_not_moon )

Given the current unix time in seconds, calculate seconds to the specified solar system body angle (relative to straight up.) Also specify if we want the angle while the body is ascending or descending.

For instance noon is when the sun angle is 0 (or the closest it can get.) Dusk is when the sun angle is 90 and descending. Dawn is when the sun angle is 90 and ascending.

Given the current unix time in seconds, calculate seconds to the specified solar system body angle (relative to straight up.) Also specify if we want the angle while the body is ascending or descending.

For instance noon is when the sun angle is 0 (or the closest it can get.) Dusk is when the sun angle is 90 and descending. Dawn is when the sun angle is 90 and ascending.

Definition at line 123 of file bodysolver.cxx.