00001 #ifndef _BICAM_H_
00002 #define _BICAM_H_
00003
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #include <signal.h>
00024
00025
00026
00027 #include <errno.h>
00028 #include "XPort.h"
00029 #include "NMEA.h"
00030 #include "Utils.h"
00031 #include "qnx_port.h"
00032 #include "BicamConsts.h"
00033
00034
00035
00036
00037
00050 class BicamTrigger{
00051 private:
00052 protected:
00054 XPort *xport;
00056 unsigned int cameraSelectMask;
00058 unsigned int cameraOnMask;
00060 unsigned int cameraOffMask;
00061
00062 public:
00063 BicamTrigger();
00064 BicamTrigger(XPort *pXPort,
00065 unsigned int selMask,
00066 unsigned int camOnMask,
00067 unsigned int camOffMask);
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079 BicamTrigger(unsigned int selMask,
00080 unsigned int camOnMask,
00081 unsigned int camOffMask);
00082
00083 ~BicamTrigger();
00084 XPort *connect(char *host,
00085 int gpioIPPort,
00086 unsigned int dirMask,
00087 unsigned int dirValues,
00088 unsigned int levelMask,
00089 unsigned int levelValues);
00090
00091 int configure(XPort *pXPort,
00092 unsigned int selMask,
00093 unsigned int camOnMask,
00094 unsigned int camOffMask);
00095 XPort *getXPort();
00096 void setXPort(XPort *);
00097 int triggerCamera();
00098 unsigned int getCamOnMask();
00099 unsigned int getCamOffMask();
00100 unsigned int getCamSelectMask();
00101 void setCamOnMask(unsigned int mask);
00102 void setCamOffMask(unsigned int mask);
00103 void setCamSelectMask(unsigned int mask);
00104
00105 };
00106
00119 class BicamGPS{
00120 private:
00121 protected:
00123 XPort *xport;
00127 GPGGA gpgga;
00131 GPRMC gprmc;
00133 double latitude;
00135 double longitude;
00137 double altitude;
00139 boolean initialized;
00140 int initNMEA();
00141 int degrees(double value);
00142 double decimalMinutes(double value);
00143 public:
00144 BicamGPS();
00145 BicamGPS(XPort *pXPort);
00146 BicamGPS(char *host, int serialIPPort);
00147 ~BicamGPS();
00148 int configure(XPort *pXPort);
00149 GPGGA *getGPGGA();
00150 GPRMC *getGPRMC();
00151 XPort *getXPort();
00152 void setXPort(XPort *xp);
00153 XPort *connect(char *host, int serialIPPort);
00154 int initialize();
00155 int writeNMEA();
00156 int update(time_t timaVal,double lat, double lon, double alt);
00157 double getLat();
00158 double getLon();
00159 double getAlt();
00160 };
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216
00217
00218
00219
00220
00221
00222
00223
00224 #endif