mirror of
http://172.16.0.230/r/SIF/TowerOptoSifAndSpectral.git
synced 2025-10-19 03:49:42 +08:00
23 lines
606 B
C
23 lines
606 B
C
//
|
|
// Created by xin on 25-5-8.
|
|
//
|
|
|
|
#ifndef SUNUPANDDOWN_H
|
|
#define SUNUPANDDOWN_H
|
|
struct SunInfo {
|
|
double sunrise_h; // 日出时间(小时)
|
|
double sunrise_m; // 日出时间(分钟)
|
|
double sunset_h; // 日落时间(小时)
|
|
double sunset_m; // 日落时间(分钟)
|
|
bool hasSunlight; // 是否有阳光
|
|
};
|
|
|
|
SunInfo calculateSunriseSunset(int year, int month, int day, double latitude, double longitude);
|
|
|
|
void calculateSunriseSunset(int year, int month, int day, double latitude, double longitude,
|
|
double &sunrise, double &sunset, bool &hasSunlight);
|
|
|
|
|
|
|
|
#endif //SUNUPANDDOWN_H
|