source: git/src/commands.h @ 9ba5d11

stereo-2025warn-only-for-hanging-survey
Last change on this file since 9ba5d11 was 725d3b1, checked in by Olly Betts <olly@…>, 12 months ago

Add support for processing Walls format survey data

  • Property mode set to 100644
File size: 2.3 KB
RevLine 
[421b7d2]1/* commands.h
[d1b1380]2 * Header file for code for directives
[d624d86]3 * Copyright (C) 1994-2024 Olly Betts
[846746e]4 *
[89231c4]5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
[846746e]9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
[89231c4]12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 * GNU General Public License for more details.
[846746e]14 *
[89231c4]15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
[ecbc6c18]17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
[d1b1380]18 */
19
[0532954]20#include "str.h"
21
[725d3b1]22/* Fix station if not already fixed.
23 *
24 * Returns:
25 *  0 if not already fixed
26 *  1 if already fixed at the same coordinates
27 * -1 if already fixed but at different coordinates
28 */
29int fix_station(prefix *fix_name, double* coords);
30
31/* Fix station with variance.
32 *
33 * Multiple fixes for the same station are OK.
34 */
35void fix_station_with_variance(prefix *fix_name, double* coords,
36                               real var_x, real var_y, real var_z,
37#ifndef NO_COVARIANCES
38                               real cxy, real cyz, real cza
39#endif
40                              );
41
[85c0078]42int get_length_units(int quantity);
43int get_angle_units(int quantity);
44
45extern const real factor_tab[];
46extern const int units_to_msgno[];
47
48#define get_units_factor(U) (factor_tab[(U)])
49#define get_units_string(U) (msg(units_to_msgno[(U)]))
50
[a9f5117]51void handle_command(void);
52void default_all(settings *s);
[d1b1380]53
[be97baf]54void default_units(settings *s);
55void default_calib(settings *s);
56
[da9163b]57void pop_settings(void);
[d624d86]58void invalidate_pj_cached(void);
[37d6b84]59void report_declination(settings *p);
[69a9e01]60void set_declination_location(real x, real y, real z, const char *proj_str);
[647407d]61
[b5a3219]62void copy_on_write_meta(settings *s);
63
[0532954]64extern string token;
[725d3b1]65extern string uctoken;
[a9f5117]66void get_token(void);
[f6bdb01]67void get_token_no_blanks(void);
[725d3b1]68// Read a token as defined in Walls format.
69void get_token_walls(void);
70
71void get_word(void);
[d1b1380]72
[63c6b49]73typedef struct { const char *sz; int tok; } sztok;
[a9f5117]74int match_tok(const sztok *tab, int tab_size);
[d1b1380]75
[63c6b49]76#define TABSIZE(T) ((sizeof(T) / sizeof(sztok)) - 1)
[5d59477]77
78void scan_compass_station_name(prefix *stn);
79void update_output_separator(void);
Note: See TracBrowser for help on using the repository browser.