Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
search_map.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2026 Gautier Hattenberger <gautier.hattenberger@enac.fr>
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 */
20
26#ifndef SEARCH_MAP_H
27#define SEARCH_MAP_H
28
29#include "std.h"
31
32#ifndef SEARCH_MAP_SIZE
33#define SEARCH_MAP_SIZE 51
34#endif
35
43
44
50extern void search_map_init(struct search_map_t *map, struct NedCoor_f pos, float res);
51
57extern void search_map_init_from_wp(struct search_map_t *map, uint8_t wp_id, float res);
58
62extern void search_map_reset(struct search_map_t *map);
63
70extern bool search_map_update(struct search_map_t *map, float data, struct NedCoor_f pos);
71
78extern float search_map_get_barycenter(struct search_map_t *map, float threshold, struct NedCoor_f *pos);
79
85extern void search_map_update_wp(struct search_map_t *map, float threshold, uint8_t wp_id);
86
87#endif // SEARCH_MAP_H
88
Paparazzi floating point math for geodetic calculations.
vector in North East Down coordinates Units: meters
#define SEARCH_MAP_SIZE
Definition search_map.h:33
void search_map_init_from_wp(struct search_map_t *map, uint8_t wp_id, float res)
init map from waypoint
Definition search_map.c:50
void search_map_reset(struct search_map_t *map)
reset map
Definition search_map.c:58
float res
map resolution in m/cell
Definition search_map.h:41
void search_map_update_wp(struct search_map_t *map, float threshold, uint8_t wp_id)
update waypoint position from map
Definition search_map.c:135
float search_map_get_barycenter(struct search_map_t *map, float threshold, struct NedCoor_f *pos)
get weighted center of the data, expected to be the search position
Definition search_map.c:79
struct NedCoor_f center
center of the map
Definition search_map.h:40
void search_map_init(struct search_map_t *map, struct NedCoor_f pos, float res)
init map
Definition search_map.c:38
bool search_map_update(struct search_map_t *map, float data, struct NedCoor_f pos)
update map with new data
Definition search_map.c:67
float grid[SEARCH_MAP_SIZE][SEARCH_MAP_SIZE]
data
Definition search_map.h:39
map for detection
Definition search_map.h:38
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.