]> git.mxchange.org Git - flightgear.git/blobdiff - src/Time/sunsolver.hxx
Fix line endings
[flightgear.git] / src / Time / sunsolver.hxx
index 6ba4c4208d77d7fb78b4bad245c4e96aab24c212..b310fb8157ab4c9db22bb20db2da96d31623b111 100644 (file)
@@ -4,7 +4,7 @@
  *
  * Written by Curtis Olson, started September 2003.
  *
- * Copyright (C) 2003  Curtis L. Olson  - curt@flightgear.org
+ * Copyright (C) 2003  Curtis L. Olson  - http://www.flightgear.org/~curt
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
 #endif
 
 /**
- * Given the current unix time in seconds, calculate seconds to
- * highest sun angle.
+ * Given the current unix time in seconds, calculate seconds to the
+ * specified sun angle (relative to straight up.)  Also specify if we
+ * want the angle while the sun 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.
  */
-time_t fgTimeSecondsUntilNoon( time_t cur_time,
-                               double lon_rad,
-                               double lat_rad );
-
-
-/**
- * Given the current unix time in seconds, calculate seconds to lowest
- * sun angle.
- */
-time_t fgTimeSecondsUntilMidnight( time_t cur_time,
+time_t fgTimeSecondsUntilSunAngle( time_t cur_time,
                                    double lon_rad,
-                                   double lat_rad );
-
-/**
- * Given the current unix time in seconds, calculate seconds to dusk
- */
-time_t fgTimeSecondsUntilDusk( time_t cur_time,
-                               double lon_rad,
-                               double lat_rad );
-
+                                   double lat_rad,
+                                   double target_angle_deg,
+                                   bool ascending );
 
 /**
- * Given the current unix time in seconds, calculate seconds to dawn
+ * given a particular time expressed in side real time at prime
+ * meridian (GST), compute position on the earth (lat, lon) such that
+ * sun is directly overhead.  (lat, lon are reported in radians
  */
-time_t fgTimeSecondsUntilDawn( time_t cur_time,
-                               double lon_rad,
-                               double lat_rad );
-
-
+void fgSunPositionGST(double gst, double *lon, double *lat);
 
 #endif /* _SUNSOLVER_HXX */