Para Juan

Dependents:   SNOCC_V1 SNOCC_V2

Committer:
gstedile
Date:
Sun Mar 19 20:59:13 2017 +0000
Revision:
0:9370c06bf7f3
Child:
1:48e2f1194609
Para Juanma

Who changed what in which revision?

UserRevisionLine numberNew contents of line
gstedile 0:9370c06bf7f3 1 /* mbed FLUX SENSOR Module Library
gstedile 0:9370c06bf7f3 2 * Copyright (c) 2008-2010, sford
gstedile 0:9370c06bf7f3 3 *
gstedile 0:9370c06bf7f3 4 * Permission is hereby granted, free of charge, to any person obtaining a copy
gstedile 0:9370c06bf7f3 5 * of this software and associated documentation files (the "Software"), to deal
gstedile 0:9370c06bf7f3 6 * in the Software without restriction, including without limitation the rights
gstedile 0:9370c06bf7f3 7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
gstedile 0:9370c06bf7f3 8 * copies of the Software, and to permit persons to whom the Software is
gstedile 0:9370c06bf7f3 9 * furnished to do so, subject to the following conditions:
gstedile 0:9370c06bf7f3 10 *
gstedile 0:9370c06bf7f3 11 * The above copyright notice and this permission notice shall be included in
gstedile 0:9370c06bf7f3 12 * all copies or substantial portions of the Software.
gstedile 0:9370c06bf7f3 13 *
gstedile 0:9370c06bf7f3 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
gstedile 0:9370c06bf7f3 15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
gstedile 0:9370c06bf7f3 16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
gstedile 0:9370c06bf7f3 17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
gstedile 0:9370c06bf7f3 18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
gstedile 0:9370c06bf7f3 19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
gstedile 0:9370c06bf7f3 20 * THE SOFTWARE.
gstedile 0:9370c06bf7f3 21 */
gstedile 0:9370c06bf7f3 22
gstedile 0:9370c06bf7f3 23 /*############################################################################
gstedile 0:9370c06bf7f3 24 ##############################################################################
gstedile 0:9370c06bf7f3 25
gstedile 0:9370c06bf7f3 26 EDITAR ESTE HEADER PARA QUE SE ADAPTE AL SENSOR
gstedile 0:9370c06bf7f3 27
gstedile 0:9370c06bf7f3 28 */
gstedile 0:9370c06bf7f3 29
gstedile 0:9370c06bf7f3 30 /* BORRAR ESTO
gstedile 0:9370c06bf7f3 31
gstedile 0:9370c06bf7f3 32 #include "mbed.h"
gstedile 0:9370c06bf7f3 33 #include <string>
gstedile 0:9370c06bf7f3 34
gstedile 0:9370c06bf7f3 35 #ifndef MBED_GPS_H
gstedile 0:9370c06bf7f3 36 #define MBED_GPS_H
gstedile 0:9370c06bf7f3 37
gstedile 0:9370c06bf7f3 38 /** A GPS interface for reading from a Globalsat EM-406 GPS Module */
gstedile 0:9370c06bf7f3 39
gstedile 0:9370c06bf7f3 40 /* BORRAR ESTO
gstedile 0:9370c06bf7f3 41
gstedile 0:9370c06bf7f3 42
gstedile 0:9370c06bf7f3 43 class GPS {
gstedile 0:9370c06bf7f3 44 public:
gstedile 0:9370c06bf7f3 45
gstedile 0:9370c06bf7f3 46 BORRAR ESTO */
gstedile 0:9370c06bf7f3 47
gstedile 0:9370c06bf7f3 48 /** Create the GPS interface, connected to the specified serial port
gstedile 0:9370c06bf7f3 49 */
gstedile 0:9370c06bf7f3 50
gstedile 0:9370c06bf7f3 51 /* BORRAR ESTO
gstedile 0:9370c06bf7f3 52
gstedile 0:9370c06bf7f3 53 GPS(PinName tx, PinName rx);
gstedile 0:9370c06bf7f3 54
gstedile 0:9370c06bf7f3 55 BORRAR ESTO */
gstedile 0:9370c06bf7f3 56
gstedile 0:9370c06bf7f3 57 /** Sample the incoming GPS data, returning whether there is a lock
gstedile 0:9370c06bf7f3 58 *
gstedile 0:9370c06bf7f3 59 * @return 1 if there was a lock when the sample was taken (and therefore .longitude and .latitude are valid), else 0
gstedile 0:9370c06bf7f3 60 */
gstedile 0:9370c06bf7f3 61
gstedile 0:9370c06bf7f3 62
gstedile 0:9370c06bf7f3 63 /* BORRAR ESTO
gstedile 0:9370c06bf7f3 64
gstedile 0:9370c06bf7f3 65
gstedile 0:9370c06bf7f3 66 int sample();
gstedile 0:9370c06bf7f3 67
gstedile 0:9370c06bf7f3 68 BORRAR ESTO */
gstedile 0:9370c06bf7f3 69
gstedile 0:9370c06bf7f3 70 /** The longitude (call sample() to set) */
gstedile 0:9370c06bf7f3 71
gstedile 0:9370c06bf7f3 72 /* BORRAR ESTO
gstedile 0:9370c06bf7f3 73
gstedile 0:9370c06bf7f3 74 float longitude;
gstedile 0:9370c06bf7f3 75
gstedile 0:9370c06bf7f3 76 BORRAR ESTO */
gstedile 0:9370c06bf7f3 77
gstedile 0:9370c06bf7f3 78 /** The latitude (call sample() to set) */
gstedile 0:9370c06bf7f3 79
gstedile 0:9370c06bf7f3 80 /* BORRAR ESTO
gstedile 0:9370c06bf7f3 81
gstedile 0:9370c06bf7f3 82 float latitude;
gstedile 0:9370c06bf7f3 83
gstedile 0:9370c06bf7f3 84 BORRAR ESTO */
gstedile 0:9370c06bf7f3 85
gstedile 0:9370c06bf7f3 86
gstedile 0:9370c06bf7f3 87
gstedile 0:9370c06bf7f3 88 /** The speed in knots (call sample() to set) */ // Esta variable la agrego para disponer de la velocidad.
gstedile 0:9370c06bf7f3 89
gstedile 0:9370c06bf7f3 90 /* BORRAR ESTO
gstedile 0:9370c06bf7f3 91
gstedile 0:9370c06bf7f3 92
gstedile 0:9370c06bf7f3 93 float speed;
gstedile 0:9370c06bf7f3 94
gstedile 0:9370c06bf7f3 95
gstedile 0:9370c06bf7f3 96
gstedile 0:9370c06bf7f3 97 char msg[256]; // Cambio de ambito de privado a publico esta variable para poder imprimirla
gstedile 0:9370c06bf7f3 98 string mensajes; // Agrego variables miembro publicas para debbuging
gstedile 0:9370c06bf7f3 99 string mensaje1;
gstedile 0:9370c06bf7f3 100 string mensaje2;
gstedile 0:9370c06bf7f3 101 string mensaje3;
gstedile 0:9370c06bf7f3 102 string mensaje4;
gstedile 0:9370c06bf7f3 103
gstedile 0:9370c06bf7f3 104
gstedile 0:9370c06bf7f3 105 private:
gstedile 0:9370c06bf7f3 106 float trunc(float v);
gstedile 0:9370c06bf7f3 107 void getline();
gstedile 0:9370c06bf7f3 108
gstedile 0:9370c06bf7f3 109 Serial _gps;
gstedile 0:9370c06bf7f3 110 // char msg[256];
gstedile 0:9370c06bf7f3 111
gstedile 0:9370c06bf7f3 112 };
gstedile 0:9370c06bf7f3 113
gstedile 0:9370c06bf7f3 114 #endif
gstedile 0:9370c06bf7f3 115 BORRAR ESTO */