Paparazzi UAS  v5.2.2_stable-0-gd6b9f29
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
gps_sim.c
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2008-2011 The Paparazzi Team
3  *
4  * This file is part of paparazzi.
5  *
6  * paparazzi is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2, or (at your option)
9  * any later version.
10  *
11  * paparazzi is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with paparazzi; see the file COPYING. If not, write to
18  * the Free Software Foundation, 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  */
21 
22 #include "subsystems/gps.h"
23 
25 
26 
27 #if 0
28 void gps_feed_values(double utm_north, double utm_east, double utm_alt, double gspeed, double course, double climb) {
29  gps.utm_pos.north = CM_OF_M(utm_north);
30  gps.utm_pos.east = CM_OF_M(utm_east);
31  //TODO set height above ellipsoid properly
32  gps.hmsl = utm_alt * 1000.;
33  gps.gspeed = CM_OF_M(gspeed);
34  gps.course = EM7RAD_OF_RAD(RadOfDeg(course/10.));
35  gps.ned_vel.z = -climb*100.;
36  gps.fix = GPS_FIX_3D;
38 }
39 #endif
40 
41 void gps_impl_init(void) {
44 }
struct NedCoor_i ned_vel
speed NED in cm/s
Definition: gps.h:69
int32_t course
GPS course over ground in rad*1e7, [0, 2*Pi]*1e7 (CW/north)
Definition: gps.h:72
int32_t hmsl
height above mean sea level in mm
Definition: gps.h:67
#define CM_OF_M(_m)
uint8_t fix
status of fix
Definition: gps.h:78
#define GPS_FIX_3D
Definition: gps.h:43
void gps_impl_init(void)
GPS initialization.
Definition: gps_sim.c:41
#define FALSE
Definition: imu_chimu.h:141
int32_t z
Down.
int16_t gspeed
norm of 2d ground speed in cm/s
Definition: gps.h:70
#define GPS_FIX_NONE
Definition: gps.h:41
Device independent GPS code (interface)
int32_t north
in centimeters
bool_t gps_available
Is set to TRUE when a new REMOTE_GPS packet is received and parsed.
Definition: gps_sim.c:24
#define TRUE
Definition: imu_chimu.h:144
#define EM7RAD_OF_RAD(_r)
int32_t east
in centimeters
struct UtmCoor_i utm_pos
position in UTM (north,east: cm; alt: mm over ellipsoid)
Definition: gps.h:66
struct GpsState gps
global GPS state
Definition: gps.c:41