Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
target_pos.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2021 Freek van Tienen <freek.v.tienen@gmail.com>
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, see
18 * <http://www.gnu.org/licenses/>.
19 */
26#ifndef TARGET_POS_H
27#define TARGET_POS_H
28
29#include "std.h"
32
43
45 float heading;
46 float distance;
47 float height;
48};
49
59
60extern struct target_t target;
61extern void target_pos_init(void);
62extern void target_parse_target_pos(uint8_t *buf);
63extern bool target_get_pos(struct NedCoor_f *pos, float *heading);
64extern bool target_get_vel(struct NedCoor_f *vel);
65extern bool target_pos_set_current_offset(float unk);
66
67#endif
vector in Latitude, Longitude and Altitude
uint16_t foo
Definition main_demo5.c:58
Paparazzi floating point math for geodetic calculations.
vector in North East Down coordinates Units: meters
Paparazzi fixed point math for geodetic calculations.
bool target_get_pos(struct NedCoor_f *pos, float *heading)
Get the current target position (NED) and heading.
Definition target_pos.c:143
struct target_t target
Definition target_pos.c:65
float height
Target offset height.
Definition target_pos.h:47
float course
Ground course of the target [deg].
Definition target_pos.h:39
uint32_t recv_time
Time of when the target position message was received [msec].
Definition target_pos.h:35
void target_parse_target_pos(uint8_t *buf)
Receive a TARGET_POS message from the ground.
Definition target_pos.c:122
float ground_speed
Ground speed of the target [m/s].
Definition target_pos.h:38
float heading
Target offset heading.
Definition target_pos.h:45
struct LlaCoor_i lla
Lat, lon and altitude position of the target.
Definition target_pos.h:37
struct target_pos_t pos
The target position message.
Definition target_pos.h:51
float distance
Target offset distance.
Definition target_pos.h:46
uint32_t tow
Time of week of the target position measurement.
Definition target_pos.h:36
void target_pos_init(void)
Definition target_pos.c:100
bool integrate_z
Enable integration of the position in Z (Up) frame.
Definition target_pos.h:56
uint32_t rtk_timeout
RTK message timeout [msec].
Definition target_pos.h:54
float climb
Climb speed, z-up [m/s].
Definition target_pos.h:41
struct LlaCoor_i gps_lla
GPS LLA position.
Definition target_pos.h:57
struct target_offset_t offset
The target offset relative to ground heading.
Definition target_pos.h:52
bool valid
If the data of the target position is valid.
Definition target_pos.h:34
uint32_t target_pos_timeout
Ground target position message timeout [msec].
Definition target_pos.h:53
bool integrate_xy
Enable integration of the position in X-Y (North/East) frame.
Definition target_pos.h:55
bool target_get_vel(struct NedCoor_f *vel)
Get the current target velocity (NED)
Definition target_pos.c:192
float heading
Heading of the target [deg].
Definition target_pos.h:40
bool target_pos_set_current_offset(float unk)
Set the current measured distance and heading as offset.
Definition target_pos.c:210
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
float heading
Definition wedgebug.c:258