Para Juan
Diff: NAVDATA.h
- Revision:
- 11:c802de4a6b13
- Parent:
- 10:45e3c7f30950
--- a/NAVDATA.h Fri Jun 23 03:58:33 2017 +0000 +++ b/NAVDATA.h Sun Jul 30 15:38:25 2017 +0000 @@ -1,29 +1,7 @@ -/* NAVDATA Module Library - * Copyright (c) 2008-2010, sford - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ +/* NAVDATA Module Library*/ -/*############################################################################ -############################################################################## +/** NAVDATA manage and store last navigation data */ -*/ #include "mbed.h" #include <string> @@ -33,23 +11,19 @@ #ifndef MBED_NAVDATA_H #define MBED_NAVDATA_H -enum datavars{longitude_f=0, longitude_i, latitude_f, latitude_i, time_f, time_i, distance_p, speed_p, consumption_i, consumption_f, consumption_p, cons_mile_p, cons_hour_p, cons_interpolated, CANT_DATA_VARS }; // Contiene las variables de navegacion de inicio y fin del último período muestreado. (distance_p in nautic miles, speed_p in knots). 0-> real ; 1->interpolated; 2->smoothed; -1-> initial padding - // VER SI ES CORRECTO DELARARLA AQUI.. +enum datavars{longitude_f=0, longitude_i, latitude_f, latitude_i, time_f, time_i, distance_p, speed_p, consumption_i, consumption_f, consumption_p, cons_mile_p, cons_hour_p, cons_interpolated, CANT_DATA_VARS }; // Contiene las variables de navegacion de inicio y fin del último período muestreado. (distance_p in nautic miles, speed_p in knots). 0-> real ; 1->interpolated; 2->smoothed; -1-> initial padding. -/** NAVDATA manage and store last navigation data */ + class NAVDATA { private: - //float max_period_time; // Maximo tiempo aceptado entre muestras consecutivas para validar los períodos en horas (hh,hhhh). SETEAR en NAVDATA.cpp - - - double Klong, Klat, Ksen; //Default value is set to obtain distance in nautic miles and consumption in litres. int ZH; + public: int np_concat; // Cantidad máxima de períodos que combinan en uno solo a velocidad constante antes de almacenar los datos.(ver VCODATA::store_data); @@ -69,11 +43,9 @@ */ int rotate_data(double x, double y, double t, float c, int v_max); // Longitud, Latitud, Timestamp, Consumption, Velocidad Maxima; - - //float LAST_NAV_DATA[CANT_DATA_VARS]; // Arrays de datos de navegacion del último período. En caso de agregar variables, modificar enum datavars. - - double LAST_NAV_DATA[CANT_DATA_VARS]; + double LAST_NAV_DATA[CANT_DATA_VARS]; // Arrays de datos de navegacion del último período. En caso de agregar variables, modificar enum datavars. + }; #endif