diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2013-04-11 10:40:47 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2013-04-11 10:40:47 +0200 |
commit | 53ef55410c7d5532151e9fba1ac5ab8eda553715 (patch) | |
tree | ab6b54850414d4f993156c7ef48a054058045657 /sources.h | |
parent | 4263a1a41029d159f72b4267c3c05d56438f75dc (diff) | |
download | vdr-53ef55410c7d5532151e9fba1ac5ab8eda553715.tar.gz vdr-53ef55410c7d5532151e9fba1ac5ab8eda553715.tar.bz2 |
Changed the sign of the satellite position value in cSource to reflect the standard of western values being negative
Diffstat (limited to 'sources.h')
-rw-r--r-- | sources.h | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: sources.h 2.4 2012/06/17 11:19:23 kls Exp $ + * $Id: sources.h 3.1 2013/04/11 10:23:16 kls Exp $ */ #ifndef __SOURCES_H @@ -31,8 +31,15 @@ public: cSource(char Source, const char *Description); ~cSource(); int Code(void) const { return code; } + int Position(void) { return Position(code); } + ///< Returns the orbital position of the satellite in case this is a DVB-S + ///< source (zero otherwise). The returned value is in the range -1800...+1800. + ///< A positive sign indicates a position east of Greenwich, while western + ///< positions have a negative sign. The absolute value is in "degrees * 10", + ///< which allows for a resolution of 1/10 of a degree. const char *Description(void) const { return description; } bool Parse(const char *s); + static int Position(int Code); static char ToChar(int Code) { return (Code & st_Mask) >> 24; } static cString ToString(int Code); static int FromString(const char *s); |