You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
695 B

  1. // This file is available in electronic form at http://www.psa.es/sdg/sunpos.htm
  2. #ifndef __SUNPOS_H
  3. #define __SUNPOS_H
  4. // Declaration of some constants
  5. #define pi 3.14159265358979323846
  6. #define twopi (2*pi)
  7. #define rad (pi/180)
  8. #define dEarthMeanRadius 6371.01 // In km
  9. #define dAstronomicalUnit 149597890 // In km
  10. struct cTime
  11. {
  12. int iYear;
  13. int iMonth;
  14. int iDay;
  15. double dHours;
  16. double dMinutes;
  17. double dSeconds;
  18. };
  19. struct cLocation
  20. {
  21. double dLongitude;
  22. double dLatitude;
  23. };
  24. struct cSunCoordinates
  25. {
  26. double dZenithAngle;
  27. double dAzimuth;
  28. };
  29. void sunpos(cTime udtTime, cLocation udtLocation, cSunCoordinates *udtSunCoordinates);
  30. #endif