Files
TowerOptoSifAndSpectral/othersoft/TemperatureControler/src/sunfunction/sunupanddown.h

23 lines
606 B
C
Raw Normal View History

//
// Created by xin on 25-5-8.
//
#ifndef SUNUPANDDOWN_H
#define SUNUPANDDOWN_H
struct SunInfo {
double sunrise_h; // <20>ճ<EFBFBD>ʱ<EFBFBD>Сʱ<D0A1><CAB1>
double sunrise_m; // <20>ճ<EFBFBD>ʱ<EFBFBD><EFBFBD><E4A3A8><EFBFBD>ӣ<EFBFBD>
double sunset_h; // <20><><EFBFBD><EFBFBD>ʱ<EFBFBD>Сʱ<D0A1><CAB1>
double sunset_m; // <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><E4A3A8><EFBFBD>ӣ<EFBFBD>
bool hasSunlight; // <20>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
};
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