Satellite Observers Workbench. NOT yet complete, just published for forum posters to \"cherry pick\" pieces of code as requiered as an example.

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers utils.h Source File

utils.h

00001 /****************************************************************************
00002  *    Copyright 2010 Andy Kirkham, Stellar Technologies Ltd
00003  *    
00004  *    This file is part of the Satellite Observers Workbench (SOWB).
00005  *
00006  *    SOWB is free software: you can redistribute it and/or modify
00007  *    it under the terms of the GNU General Public License as published by
00008  *    the Free Software Foundation, either version 3 of the License, or
00009  *    (at your option) any later version.
00010  *
00011  *    SOWB is distributed in the hope that it will be useful,
00012  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *    GNU General Public License for more details.
00015  *
00016  *    You should have received a copy of the GNU General Public License
00017  *    along with SOWB.  If not, see <http://www.gnu.org/licenses/>.
00018  *
00019  *    $Id: main.cpp 5 2010-07-12 20:51:11Z ajk $
00020  *    
00021  ***************************************************************************/
00022 
00023 #ifndef UTILS_H
00024 #define UTILS_H
00025 
00026 #include "gps.h"
00027 
00028 char ascii2bin(char c);
00029 uint32_t hex2bin(char *s, int len);
00030 uint32_t dec2bin(char *s, int len);
00031 
00032 char bin2ascii(char c);
00033 char * bin2hex(uint32_t d, int len, char *s);
00034 
00035 char strcsum(char *s);
00036 char strcsuml(char *s, int len);
00037 
00038 char strsum(char *s);
00039 char strsuml(char *s, int len);
00040 
00041 void date_AsString(GPS_TIME *t, char *s);
00042 void time_AsString(GPS_TIME *t, char *s);
00043 
00044 void gps_get_coord_AsString(char *s, int type);
00045 
00046 void double2dms(char *s, double d);
00047 void printDouble(char *s, double d);
00048 char * printDouble_3_1(char *s, double d);
00049 char * printDouble_3_2(char *s, double d);
00050 
00051 void printBuffer(char *s, int len);
00052 #endif