Repo created
This commit is contained in:
parent
4af19165ec
commit
68073add76
12458 changed files with 12350765 additions and 2 deletions
22
libs/base/sunrise_sunset.hpp
Normal file
22
libs/base/sunrise_sunset.hpp
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#pragma once
|
||||
|
||||
#include <ctime>
|
||||
#include <string>
|
||||
|
||||
enum class DayTimeType
|
||||
{
|
||||
Day,
|
||||
Night,
|
||||
PolarDay,
|
||||
PolarNight
|
||||
};
|
||||
|
||||
std::string DebugPrint(DayTimeType type);
|
||||
|
||||
/// Helpers which calculates 'is day time' without a time calculation error.
|
||||
/// @param timeUtc - utc time
|
||||
/// @param latitude - latutude, -90...+90 degrees
|
||||
/// @param longitude - longitude, -180...+180 degrees
|
||||
/// @returns day time type for a specified date for a specified location
|
||||
/// @note throws RootException if gmtime returns nullptr
|
||||
DayTimeType GetDayTime(time_t timeUtc, double latitude, double longitude);
|
||||
Loading…
Add table
Add a link
Reference in a new issue