aqhome-react: added code to determine sunset/sunrise times.
This commit is contained in:
49
apps/aqhome-react/suntimes.h
Normal file
49
apps/aqhome-react/suntimes.h
Normal file
@@ -0,0 +1,49 @@
|
||||
/****************************************************************************
|
||||
* This file is part of the project AqHome.
|
||||
* AqHome (c) by 2024 Martin Preuss, all rights reserved.
|
||||
*
|
||||
* The license for this file can be found in the file COPYING which you
|
||||
* should have received along with this file.
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef AQHOMEREACT_SUNTIMES_H
|
||||
#define AQHOMEREACT_SUNTIMES_H
|
||||
|
||||
|
||||
#include "./aqhome_react.h"
|
||||
|
||||
#include <gwenhywfar/gwendate.h>
|
||||
#include <gwenhywfar/gwentime.h>
|
||||
|
||||
|
||||
/**
|
||||
* Returns the sunrise time on the provided day and location.
|
||||
*
|
||||
* You can get the location by just clicking on a position on your chosen map website (e.g. "G'maps").
|
||||
*
|
||||
* @return time of sunrise for the given date and location
|
||||
* @param date date for which to calculate
|
||||
* @param lat latitude of the location to calculate for (positive for east)
|
||||
* @param lng longitude of the location to calculate for (positive for north)
|
||||
*/
|
||||
GWEN_TIME *AQHomeReact_GetSunriseTimeForDateAndLoc(const GWEN_DATE *date, double lat, double lng);
|
||||
|
||||
|
||||
/**
|
||||
* Returns the sunset time on the provided day and location.
|
||||
*
|
||||
* You can get the location by just clicking on a position on your chosen map website (e.g. "G'maps").
|
||||
*
|
||||
* @return time of sunset for the given date and location
|
||||
* @param date date for which to calculate
|
||||
* @param lat latitude of the location to calculate for (positive for east)
|
||||
* @param lng longitude of the location to calculate for (positive for north)
|
||||
*/
|
||||
GWEN_TIME *AQHomeReact_GetSunsetTimeForDateAndLoc(const GWEN_DATE *date, double lat, double lng);
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user