rasProject_01 / weSweetHome
R. 240
process control / RasPi software by weinert-automation
|
A console program to fetch local weather data. More...
#include "sysBasic.h"
#include "we1wire.h"
#include <sys/file.h>
#include <signal.h>
#include <errno.h>
#include <getopt.h>
#include "weUtil.h"
#include "sweetHome.h"
#include "sweetHomeLocal.h"
#include <curl/curl.h>
#include <dirent.h>
Data Structures | |
struct | memAlloc_t |
Structure for allocated, re-allocatable memory. More... | |
Variables | |
char const | prgNamPure [] |
The pure program name. More... | |
char const | prgSVNdat [] |
The complete SVN date string. More... | |
char const | prgSVNrev [] |
The complete SVN revision string. More... | |
A console program to fetch local weather data.
Revision history
Program functions
This program gets one or two JSON pages from open weather map and parses them for sunset sunrise (this day, this location) and cloudiness (dto. forecast from now.
The current and next day sunrise and sunset are calculated approximately by a cosine algorithm using integer lookup tables (no float arithmetic).
Additionally it determines the 1-wire sensors present and reveals their real location in the file system.
Library usage
The program uses the curl library to fetch data from internet.
Local build and compile on a Raspberry: g++ getLocalWeaterData.c -o getLocalWeatherData -lcurl
Cross-compile by:
or by:
program by:
char const prgNamPure[] |
The pure program name.
To be provided in the application's / program's source.
char const prgSVNrev[] |
The complete SVN revision string.
To be provided in the application's / program's source.
char const prgSVNdat[] |
The complete SVN date string.
To be provided in the application's / program's source.