50#define MAP_WIFI_MAX_LEVELS 8
70 double origin_x, origin_y;
92map_t *map_alloc(
void);
95void map_free(map_t *map);
98map_cell_t *map_get_cell(map_t *map,
double ox,
double oy,
double oa);
101int map_load_occ(map_t *map,
const char *filename,
double scale,
int negate);
107void map_update_cspace(map_t *map,
double max_occ_dist);
114double map_calc_range(map_t *map,
double ox,
double oy,
double oa,
double max_range);
121void map_draw_occ(map_t *map,
struct _rtk_fig_t *fig);
124void map_draw_cspace(map_t *map,
struct _rtk_fig_t *fig);
127void map_draw_wifi(map_t *map,
struct _rtk_fig_t *fig,
int index);
134#define MAP_WXGX(map, i) (map->origin_x + ((i)-map->size_x / 2) * map->scale)
135#define MAP_WYGY(map, j) (map->origin_y + ((j)-map->size_y / 2) * map->scale)
138#define MAP_GXWX(map, x) (floor((x - map->origin_x) / map->scale + 0.5) + map->size_x / 2)
139#define MAP_GYWY(map, y) (floor((y - map->origin_y) / map->scale + 0.5) + map->size_y / 2)
142#define MAP_VALID(map, i, j) ((i >= 0) && (i < map->size_x) && (j >= 0) && (j < map->size_y))
145#define MAP_INDEX(map, i, j) ((i) + (j)*map->size_x)