This commit is contained in:
1 parent
6b84e24b59
commit
48129fdab2
8 files changed
+452
-2
No files matched your search
@@ -0,0 +1,41 @@
|
|||||||
|
# Bake PostgreSQL 18 (server + pre-seeded app roles/databases) into the Legatus Qt6
|
||||||
|
# build image, so any container from legatus-qt6-prebuilt:latest has a local DB ready.
|
||||||
|
#
|
||||||
|
# build : docker build -f Dockerfile.legatus-db -t legatus-qt6-prebuilt:latest .
|
||||||
|
# start : legatus-db-up # maps EXCDBS01/EXCADB01 -> 127.0.0.1 and starts pg
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
# - The cluster + roles/dbs live in the image's /var/lib/postgresql/18/main; each new
|
||||||
|
# container gets a fresh copy (in its writable layer). Start with `legatus-db-up`.
|
||||||
|
# - /etc/hosts is docker-managed, so EXCDBS01/EXCADB01 are added by legatus-db-up (or
|
||||||
|
# pass --add-host EXCDBS01:127.0.0.1 --add-host EXCADB01:127.0.0.1 at docker run).
|
||||||
|
|
||||||
|
FROM legatus-qt6-prebuilt:orig
|
||||||
|
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
# Install the server; init the cluster with the credentials the DB tools use:
|
||||||
|
# dbUpdate -> postgres / postgres
|
||||||
|
# dbAdministration -> ctc_sv / postgres
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get install -y postgresql-18 \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
&& pg_ctlcluster 18 main start \
|
||||||
|
&& sleep 2 \
|
||||||
|
&& su postgres -c "psql -v ON_ERROR_STOP=1 -c \"ALTER USER postgres PASSWORD 'postgres'\"" \
|
||||||
|
&& su postgres -c "psql -v ON_ERROR_STOP=1 -c \"CREATE ROLE ctc_sv LOGIN PASSWORD 'postgres' CREATEDB\"" \
|
||||||
|
&& su postgres -c "createdb -O postgres lts_ets_pro" \
|
||||||
|
&& su postgres -c "createdb -O postgres dbAdmin" \
|
||||||
|
&& pg_ctlcluster 18 main stop
|
||||||
|
|
||||||
|
# Convenience one-shot: map the hostnames + start the cluster (idempotent).
|
||||||
|
RUN printf '%s\n' \
|
||||||
|
'#!/usr/bin/env bash' \
|
||||||
|
'# Map the DB hostnames to the local server and start PostgreSQL 18.' \
|
||||||
|
'set -uo pipefail' \
|
||||||
|
'grep -qE "EXCDBS01" /etc/hosts || echo "127.0.0.1 EXCDBS01 EXCADB01" >> /etc/hosts' \
|
||||||
|
'pg_ctlcluster 18 main start || true' \
|
||||||
|
'sleep 1' \
|
||||||
|
'pg_isready -h 127.0.0.1 -p 5432' \
|
||||||
|
> /usr/local/bin/legatus-db-up \
|
||||||
|
&& chmod +x /usr/local/bin/legatus-db-up
|
||||||
+1
-1
@@ -72,7 +72,7 @@ message("Version " $$ESRIRUNTIME_QT_VERSION)
|
|||||||
# Compiler options
|
# Compiler options
|
||||||
#-------------------------------------------------
|
#-------------------------------------------------
|
||||||
|
|
||||||
SDK_INSTALL_DIR = "<INSTALLDIR>"
|
SDK_INSTALL_DIR = "/workspace/qt-migration-legatus/qt6-after/qt6-migrated-legatus/external/ArcGIS/MapsSDK_Qt_300.0.0/ArcGIS_Maps_SDK_Qt_300.0.0/qt300.0.0"
|
||||||
|
|
||||||
unix:!macx:!android:!ios {
|
unix:!macx:!android:!ios {
|
||||||
eval(QMAKE_TARGET.arch = ""):{
|
eval(QMAKE_TARGET.arch = ""):{
|
||||||
|
|||||||
+1
-1
@@ -49,7 +49,7 @@ message("Version " $$ESRIRUNTIME_QT_VERSION)
|
|||||||
# Compiler options
|
# Compiler options
|
||||||
#-------------------------------------------------
|
#-------------------------------------------------
|
||||||
|
|
||||||
SDK_INSTALL_DIR = "<INSTALLDIR>"
|
SDK_INSTALL_DIR = "/workspace/qt-migration-legatus/qt6-after/qt6-migrated-legatus/external/ArcGIS/MapsSDK_Qt_300.0.0/ArcGIS_Maps_SDK_Qt_300.0.0/qt300.0.0"
|
||||||
|
|
||||||
unix:!macx{
|
unix:!macx{
|
||||||
eval(QMAKE_TARGET.arch = ""):{
|
eval(QMAKE_TARGET.arch = ""):{
|
||||||
|
|||||||
Vendored
+29
@@ -0,0 +1,29 @@
|
|||||||
|
/*
|
||||||
|
* arcgisversion.h
|
||||||
|
*
|
||||||
|
* RME header (created by RME, NOT ESRI) that the Legatus SituationMap layer uses to
|
||||||
|
* gate ArcGIS-SDK-version-dependent code paths:
|
||||||
|
*
|
||||||
|
* #include <arcgisversion.h>
|
||||||
|
* #if ACRGIS_VERSION >= 0x640600 // 100.6.0
|
||||||
|
* ...
|
||||||
|
*
|
||||||
|
* In the 100.x SDK this header lived in the RME ArcGIS package's include dir
|
||||||
|
* (<arcgis/arcgisversion.h>) and packed the version as 0x<major><minor><patch>
|
||||||
|
* (e.g. 100.1.0 -> 0x640100, 100.15.2 -> 0x640F02). The ArcGIS Maps SDK 300 ships a
|
||||||
|
* flat include layout and no longer provides this header, and its major version (300)
|
||||||
|
* exceeds the byte-packed encoding anyway.
|
||||||
|
*
|
||||||
|
* For the 300 migration we therefore define ACRGIS_VERSION to a value that is larger
|
||||||
|
* than the highest 100.x feature gate used in the code (0x640D00 = 100.13.0), so every
|
||||||
|
* #if ACRGIS_VERSION >= 0x64xxxx
|
||||||
|
* takes the "newest SDK" branch (300 has all 100.x features), and the single
|
||||||
|
* #if ACRGIS_VERSION < 0x640500 (100.5.0 / "pre-Update 5")
|
||||||
|
* correctly takes its ELSE branch (300 is not pre-100.5).
|
||||||
|
*
|
||||||
|
* 300000000 == 300 * 10^6, i.e. "300.0.0" in a 100.0.0-style packed decimal number.
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#define ACRGIS_VERSION 300000000
|
||||||
|
#define ACRGIS_VERSION_STR "300.0.0"
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
985fd529adec6514f64aede19ffe2ae3e9df0ddcb72041b9d99e57785be4ae3d Schusstafel.h
|
||||||
|
aaab96761236062e729a2e1a5f37638e579c6096cf6d36c213c2b90753e1e9d8 libSchusstafel.a
|
||||||
|
20709adcebac0adc7c89bb60c81c09b0dfd2ec9e6623598fb736b410304fb0f1 libSchusstafel.so
|
||||||
+377
@@ -0,0 +1,377 @@
|
|||||||
|
/*!
|
||||||
|
// ------------------------------------------------------------------
|
||||||
|
// filename : Schusstafel.h
|
||||||
|
// ------------------------------------------------------------------
|
||||||
|
// Time-stamp: "11.09.14-14:02 marienfeld"
|
||||||
|
// ------------------------------------------------------------------
|
||||||
|
// copyright (C) 2011 Rheinmetall Defence Electronics, D-28305 BREMEN
|
||||||
|
// ------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// HIER/ITEM : CSU:
|
||||||
|
// BRIEF DESC:
|
||||||
|
// AUTHOR : R. Marienfeld, SGTB
|
||||||
|
// RELEASE : /main/0
|
||||||
|
// MODIF/STAT: 09.09.2011
|
||||||
|
// ORIGIN REF:
|
||||||
|
// LANGUAGE : C/C++
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __SCHUSSTAFEL_H_
|
||||||
|
#define __SCHUSSTAFEL_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
|
class Schusstafel {
|
||||||
|
|
||||||
|
#define MAXTAFEL 13 /* Standard- und Nicht_Std_Tafel */
|
||||||
|
#define MAXCORR 3 /* Anzahl Korrektur-Tafeln */
|
||||||
|
#define DATAROWS 600 /* Anzahl Daten-Zeilen pro Tafel */
|
||||||
|
#define DATACOLS 16 /* Anzahl Daten-Spalten pro Tafel */
|
||||||
|
#define DATAFLNG 48 /* Anzahl Zeichen je Datenfeld */
|
||||||
|
#define MAXZIELW 25 /* Anzahl Tafeln Zielhoehenwinkel */
|
||||||
|
#define TESTFLAG 0 /* Test der Tafeln beim Einlesen */
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
ST_ENTFERNUNG, ST_AUFSATZ, ST_FLUGZEIT
|
||||||
|
} TAFEL_NAMEN_ET;
|
||||||
|
|
||||||
|
class Fehler : public std::exception {
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit Fehler (const std::string& what_arg);
|
||||||
|
virtual ~Fehler () throw();
|
||||||
|
virtual const char* what() const throw();
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::string fehler_string;
|
||||||
|
};
|
||||||
|
|
||||||
|
Schusstafel (std::string pfad, std::string munitionsart, std::string suffix);
|
||||||
|
|
||||||
|
~Schusstafel () {};
|
||||||
|
|
||||||
|
/*
|
||||||
|
Aufbau der Datenfiles fuer die Schusstafeln
|
||||||
|
-------------------------------------------
|
||||||
|
Die Schusstafeln fuer jede Munition wird in einem eigenen Text-File beschrieben.
|
||||||
|
|
||||||
|
Zu jeder Schusstafel muessen die Datenbloecke "Schuss_Tafel" und "Standard_Tafel"
|
||||||
|
vorhanden sein.
|
||||||
|
Optional koennen die "Nicht_Std_Tafel" und die "Korrektur_Tafel" vorhanden sein.
|
||||||
|
|
||||||
|
Die Nicht-Standard-Tafel modifiziert Tafelwerte aus der Standard-Tafel.
|
||||||
|
Die Korrektur-Tafel modifiziert Tafelwerte aus der Nicht-Standard-Tafel.
|
||||||
|
|
||||||
|
Der Datenblock "Schuss_Tafel" beschreibt die Basis-Parameter einer Munition:
|
||||||
|
Schuss_Tafel =
|
||||||
|
Munition = "xxxx"
|
||||||
|
Version = "XXXX"
|
||||||
|
Muni_Parameter = { Kaliber = x.x Masse = x.x V0 = x.x }
|
||||||
|
Std_Parameter = { DELTA_V0 = x.x
|
||||||
|
LUFTTEMP = x.x
|
||||||
|
LUFTDRUCK = x.x
|
||||||
|
LAENGSWIND = x.x
|
||||||
|
QUERWIND = x.x
|
||||||
|
PULVERTEMP = x.x }
|
||||||
|
Diese Parameter koennen mit den Funktionen
|
||||||
|
"ST_version", "ST_muni_parameter" und "ST_std_parameter" abgefragt werden.
|
||||||
|
|
||||||
|
Der Datenblock "Standard_Tafel" beschreibt die Standard-Parameter einer Munition:
|
||||||
|
Standard_Tafel =
|
||||||
|
Spaltengruppe =
|
||||||
|
Belegung = { AUFSATZ = (2) [-]
|
||||||
|
VORHALT = (3) [-]
|
||||||
|
FLUGZEIT = (4)
|
||||||
|
}
|
||||||
|
Zeilenlaenge = 4
|
||||||
|
Datenblock = {
|
||||||
|
# ENTF AUFSATZ VORHALT FLUGZEIT V_END
|
||||||
|
xx x.x x.x x.x x.x
|
||||||
|
xx x.x x.x x.x x.x
|
||||||
|
}
|
||||||
|
Der Parameter "Zeilenlaenge" (besser: Anzahl Spalten) bestimmt wie viele Spalten der
|
||||||
|
Tabelle eingelesen werden. Sind mehr Spalten in der Tabelle vorhanden als angegeben,
|
||||||
|
werden die restlichen Spalten nicht beruecksichtigt.
|
||||||
|
Der Parameter "Belegung" beschreibt den Aufbau der Tabelle:
|
||||||
|
"name" = (spalte) [dimension]
|
||||||
|
Bei der Standard-Tafel muessen die Parameter ENTFERNUNG, AUFSATZ, VORHALT und
|
||||||
|
FLUGZEIT vorhanden sein. Weitere Parameter (z.B. Endgeschwindigkeit, Fallwinkel, ..)
|
||||||
|
koennen hinzugefuegt werden.
|
||||||
|
Die (spalte) definiert die Spaltennummer in der Tabelle, ist diese Angabe nicht
|
||||||
|
vorhanden, wird die Spalte nicht beruecksichtigt.
|
||||||
|
Die [dimension] definiert die Winkeleinheit. Der Standardwert ist rad, zulaessige
|
||||||
|
Einheiten sind "-", "mil", "STRICH".
|
||||||
|
Es werden so viele Zeile eingelesen wie in der Tabelle vorhanden sind. Bei
|
||||||
|
ballistischen Schusstafeln funktioniert die Berechnung der Anzahl der Zeilen ueber
|
||||||
|
die Angabe der Entfernung-Range nicht.
|
||||||
|
|
||||||
|
Der Datenblock "Nicht_Std_Tafel" beschreibt die Nicht-Standard-Parameter einer
|
||||||
|
Munition:
|
||||||
|
Nicht_Std_Tafel =
|
||||||
|
Parameter = LUFTTEMP
|
||||||
|
Tafelwerte = { AUFSATZ FLUGZEIT }
|
||||||
|
Spaltengruppe = {
|
||||||
|
Belegung = { AUFSATZ ( x.x ) = (2) [-]
|
||||||
|
FLUGZEIT ( x.x ) = (4)
|
||||||
|
AUFSATZ ( x.x ) = (3) [-]
|
||||||
|
FLUGZEIT ( x.x ) = (5)
|
||||||
|
}
|
||||||
|
Zeilenlaenge = 5
|
||||||
|
Datenblock = {
|
||||||
|
# ENTF AUFSATZ AUFSATZ FLUGZEIT FLUGZEIT
|
||||||
|
xx x.x x.x x.x x.x
|
||||||
|
xx x.x x.x x.x x.x
|
||||||
|
}
|
||||||
|
In dem Beispiel beeinflusst die Lufttemperatur den Aufsatz und die Flugzeit in
|
||||||
|
Abhaengigkeit der Entfernung.
|
||||||
|
Ist am Ende der Belegungs-Zeile ein "+/-" angegeben wird das Vorzeichen der Daten
|
||||||
|
dieser Spalte invertiert.
|
||||||
|
|
||||||
|
Zum Aufbau einer symmetrischen Nicht-Standard-Tafel (z.B. fuer Seitenwind) kann
|
||||||
|
am Ende der Belegungs-Zeile ein "-(n)" angegeben werden.
|
||||||
|
Belegung = { VORHALT ( 0.0) = (2) [-] +/-
|
||||||
|
VORHALT ( 5.0) = (3) [-]
|
||||||
|
VORHALT ( 10.0) = (4) [-]
|
||||||
|
VORHALT ( -5.0) = (5) [-] -(3)
|
||||||
|
VORHALT (-10.0) = (6) [-] -(4)
|
||||||
|
}
|
||||||
|
Zeilenlaenge = 6
|
||||||
|
Datenblock = {
|
||||||
|
# ENTF VORHALT VORHALT VORHALT
|
||||||
|
# 0.0 +5.0 +10.0
|
||||||
|
xx -x.x x.x x.x
|
||||||
|
xx -x.x x.x x.x
|
||||||
|
}
|
||||||
|
In dem Beispiel wird aus der Spalte 3 (5m/s) eine neue Spalte 5 (-5m/s) erzeugt.
|
||||||
|
Die Daten der Spalte 2 (0m/s) werden invertiert.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
void ST_tafelwerte (TAFEL_NAMEN_ET arg_name, float arg_wert,
|
||||||
|
float luftdruck, float lufttemp, float delta_v0,
|
||||||
|
float querwind, float pulvertemp,
|
||||||
|
float *entfernung, float *aufsatz, float *vorhalt,
|
||||||
|
float *flugzeit);
|
||||||
|
/* diese Funktion liefert fuer die angegebenen Argumente die korrigierten und */
|
||||||
|
/* interpolierten Werte fuer Entfernung, Aufsatz, Vorhalt und Flugzeit aus der */
|
||||||
|
/* aktuellen Schusstafel. Bei Entfernungen groesser als der max. Tafelwert */
|
||||||
|
/* werden die letzten Tafelwerte linear extrapoliert. */
|
||||||
|
/* Die Einheit fuer die Aufsatz- und Vorhalt-Winkel ist rad. */
|
||||||
|
|
||||||
|
void ST_artillerie
|
||||||
|
(TAFEL_NAMEN_ET arg_name, float arg_wert, float zielhoehenwinkel,
|
||||||
|
float *entfernung1, float *aufsatz1, float *flugzeit1, float *drift1,
|
||||||
|
float *entfernung2, float *aufsatz2, float *flugzeit2, float *drift2);
|
||||||
|
/* diese Funktion liefert fuer die angegebenen Argumente die interpolierten */
|
||||||
|
/* Werte fuer Entfernung, Aufsatz, Flugzeit und Drift aus der aktuellen */
|
||||||
|
/* Schusstafel. Bei der Funktion Aufsatz, Flugzeit, Drift in Abhaengigkeit */
|
||||||
|
/* der Entfernung werden die Werte fuer die untere (in 1) und obere (in 2) */
|
||||||
|
/* Winkelgruppe ausgegeben, bei den anderen Funktionen sind diese Werte 0. */
|
||||||
|
/* Die Winkel-Einheit ist rad. */
|
||||||
|
/* Der Zielhoehenwinkel wird (noch) nicht beruecksichtigt. */
|
||||||
|
|
||||||
|
int ST_status (std::string *fehler);
|
||||||
|
/* diese Funktion liefert das Ergebnis vom Einlesen der Schusstafel. */
|
||||||
|
/* In "fehler" ist die letzte Fehler-Info enthalten */
|
||||||
|
/* return: 0 = fehlerfrei, -1 = Datenfile nicht gefunden, >0 = Fehler */
|
||||||
|
|
||||||
|
char* ST_version (void);
|
||||||
|
/* diese Funktion liefert den Versions-String der aktuellen Munition */
|
||||||
|
|
||||||
|
void ST_muni_parameter (float *kaliber, float *masse, float *v0);
|
||||||
|
/* diese Funktion liefert die Munitions-Parameter */
|
||||||
|
|
||||||
|
int ST_std_parameter (std::string tafel, std::string tafelwert, float *value);
|
||||||
|
/* diese Funktion liefert den Standard-Wert einer Nicht_Std_Tafel */
|
||||||
|
|
||||||
|
void ST_entfernung_range (float *min, float *max, float *delta);
|
||||||
|
/* diese Funktion liefert den Entfernung-Bereich der Standard-Tafel */
|
||||||
|
|
||||||
|
int ST_zielhoehenwinkel (float zielwinkel);
|
||||||
|
/* diese Funktion waehlt die Tafeln fuer den Zielhoehenwinkel. */
|
||||||
|
/* Zwischen allen Tafelwerte wird linear interpoliert. */
|
||||||
|
/* Weil die Differenzen der Werte bei grossen Zielhoehenwinkel */
|
||||||
|
/* stark nichtlinear sind, (Fehler bei 90 Grad ist unendlich) */
|
||||||
|
/* wird der Zielhoehenwinkel auf den kleinsten bzw groessten */
|
||||||
|
/* Wert aus den eingelesenen Kommandotafeln begrenzt. */
|
||||||
|
/* return: 0 = fehlerfrei, -1 = Schusstafeln nicht gefunden */
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
Schusstafel () {};
|
||||||
|
|
||||||
|
void ST_setze_pfad (std::string pfad, std::string praefix, std::string suffix);
|
||||||
|
/* vor dem Einlesen von Datenfiles koennen Pfad und Filenamen projektspezifisch */
|
||||||
|
/* modifiziert werden */
|
||||||
|
/* Open fuer das Datenfile erfolgt mit "<pfad><praefix><munitionsart><suffix>" */
|
||||||
|
/* Standard fuer Pfad/Filenamen ist "./<munitionsart>.sus" */
|
||||||
|
|
||||||
|
int ST_einlesen (void);
|
||||||
|
/* liest das Datenfile einer Munitionsart ein und erzeugt eine Schusstafel */
|
||||||
|
/* return: 0 = fehlerfrei, -1 = Datenfile nicht gefunden, >0 = Fehler */
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
ENTF=0, AUFSATZ, VORHALT, FLUGZEIT, DRIFT
|
||||||
|
} correl_et;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
char titel[DATAFLNG];
|
||||||
|
char einheit[DATAFLNG];
|
||||||
|
char vorz[11];
|
||||||
|
float wert;
|
||||||
|
} spalten_typ;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
float value[DATACOLS];
|
||||||
|
} daten_typ;
|
||||||
|
daten_typ datenblock;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
int zeilenlaenge;
|
||||||
|
float zielwinkel;
|
||||||
|
char parameter[DATAFLNG];
|
||||||
|
spalten_typ spalte[DATACOLS+1];
|
||||||
|
} beleg_typ;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
int hoehenwinkel;
|
||||||
|
int datenzeilen;
|
||||||
|
int zuordnung[DATAROWS];
|
||||||
|
beleg_typ belegung;
|
||||||
|
daten_typ datenblock[DATAROWS];
|
||||||
|
} tafel_typ;
|
||||||
|
tafel_typ schusstafel[MAXTAFEL+1];
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
tafel_typ schusstafel[MAXTAFEL+1];
|
||||||
|
} zielw_typ;
|
||||||
|
zielw_typ *pZielwinkel;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
char parameter[DATAFLNG];
|
||||||
|
char belegung[DATAFLNG];
|
||||||
|
int datenlen;
|
||||||
|
daten_typ datenblock[DATAROWS];
|
||||||
|
} korrektur_typ;
|
||||||
|
korrektur_typ korrektur[MAXCORR];
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
float winkel;
|
||||||
|
long index;
|
||||||
|
} elev_typ;
|
||||||
|
elev_typ elevation[MAXZIELW+2];
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
char munition[DATAFLNG];
|
||||||
|
char version[DATAFLNG];
|
||||||
|
char flugbahn[DATAFLNG];
|
||||||
|
int parabel;
|
||||||
|
float zielwinkel;
|
||||||
|
float kaliber; /* Muni_Parameter */
|
||||||
|
float masse;
|
||||||
|
float v0;
|
||||||
|
float luftdruck; /* Std_Parameter */
|
||||||
|
float lufttemp;
|
||||||
|
float delta_v0;
|
||||||
|
float querwind;
|
||||||
|
float pulvertemp;
|
||||||
|
float laengswind;
|
||||||
|
float min; /* Entfernung_Range */
|
||||||
|
float max;
|
||||||
|
float delta;
|
||||||
|
float scheitel;
|
||||||
|
} parameter_typ;
|
||||||
|
parameter_typ parameter;
|
||||||
|
parameter_typ aktuell;
|
||||||
|
|
||||||
|
#define BUFLNG 512
|
||||||
|
#define MILRAD M_PI/3200
|
||||||
|
#define MILGRAD 360/6400
|
||||||
|
|
||||||
|
char ST_file[BUFLNG/2];
|
||||||
|
char ST_pfad[BUFLNG/2];
|
||||||
|
char ST_praefix[BUFLNG/2];
|
||||||
|
char ST_suffix[BUFLNG/2];
|
||||||
|
char buffer[BUFLNG];
|
||||||
|
char notice[BUFLNG];
|
||||||
|
char element[DATAFLNG];
|
||||||
|
int inhalt[MAXTAFEL+1];
|
||||||
|
float delta_aufs, delta_vorh, delta_zeit;
|
||||||
|
long fpos1, fpos2;
|
||||||
|
int col_aufs;
|
||||||
|
int col_vorh;
|
||||||
|
int col_zeit;
|
||||||
|
int winkel;
|
||||||
|
int error;
|
||||||
|
int tafel;
|
||||||
|
int zeile;
|
||||||
|
int index;
|
||||||
|
int len;
|
||||||
|
FILE *fd1;
|
||||||
|
|
||||||
|
|
||||||
|
int Elevation_Tafel (FILE *fd, elev_typ *elev);
|
||||||
|
void Basis_Parameter (void);
|
||||||
|
void Tafel_einlesen (int tafel);
|
||||||
|
void Tafel_Belegung (int tafel);
|
||||||
|
void Korrektur_Tafel (int tafel);
|
||||||
|
void Standard_Tafel (void);
|
||||||
|
int Nicht_Std_Tafel (int tafel);
|
||||||
|
void sortiere_Tafel (int tafel);
|
||||||
|
void kopiere_Spalte (tafel_typ *ziel, int sp1, tafel_typ von, int sp2);
|
||||||
|
void aktuelle_Tafel (float luftdruck, float lufttemp, float delta_v0,
|
||||||
|
float querwind, float pulvertemp);
|
||||||
|
void neue_tafelwerte (float entfernung, float luftdruck, float lufttemp,
|
||||||
|
float delta_v0, float querwind, float pulvertemp,
|
||||||
|
float *aufsatz, float *vorhalt, float *flugzeit);
|
||||||
|
void ladeSchusstafel (int tafel);
|
||||||
|
void sucheSpalten (float value, char *tafelwert,
|
||||||
|
beleg_typ belegung, int *spalte1, int *spalte2);
|
||||||
|
float abweichung (float value, float entf, int tafel,
|
||||||
|
std::string spalte, int zeile);
|
||||||
|
float korrigieren (float value, std::string param, std::string belegung);
|
||||||
|
int leseDatenblock (daten_typ *daten, int tafel);
|
||||||
|
void copyDatenblock (daten_typ *ziel, daten_typ *von,
|
||||||
|
beleg_typ *tafel);
|
||||||
|
int testDatenblock (tafel_typ tafel, daten_typ *block);
|
||||||
|
void neuerDatenblock (float winkel, daten_typ *neu,
|
||||||
|
beleg_typ beleg1, daten_typ *block1,
|
||||||
|
beleg_typ beleg2, daten_typ *block2);
|
||||||
|
int sucheTafel (std::string param, std::string tafel);
|
||||||
|
int ZeileLesen (char *buf);
|
||||||
|
int leseZeichen (int full);
|
||||||
|
int DatenZeile (char *buf);
|
||||||
|
int splitValue (char *buf, char *val);
|
||||||
|
int fetchValue (char *buf, char *val);
|
||||||
|
int floatValue (std::string item, float *value);
|
||||||
|
int sucheString (char *str1, std::string str2);
|
||||||
|
void setzeEinheit (beleg_typ *tafel);
|
||||||
|
void sucheEinheit (char *zeile, beleg_typ *tafel);
|
||||||
|
float interpolieren (float x, float f1, float f0, float x1, float x0);
|
||||||
|
void upperCase (char *buf, int len);
|
||||||
|
void cArray (std::string str, char *chr);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* __SCHUSSTAFEL_H_ */
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
----------------------------------------
|
||||||
|
------ PROGRAM REVISION HISTORY ------
|
||||||
|
----------------------------------------
|
||||||
|
|
||||||
|
09.09.11: Marienfeld, SGTB, Tel: 457-4657
|
||||||
|
first edition
|
||||||
|
12.07.12: Marienfeld, SGTB, Tel: 457-4657
|
||||||
|
Funktion "ST_distanz" hinzugefuegt
|
||||||
|
04.09.12: Marienfeld, SGTB, Tel: 457-4657
|
||||||
|
Die Funktion "ST_distanz" entfaellt
|
||||||
|
05.05.14: Marienfeld, SGAP, Tel: 457-4657
|
||||||
|
Funktion "ST_zielhoehenwinkel" hinzugefuegt
|
||||||
|
26.06.14: Marienfeld, SGAP, Tel: 457-4657
|
||||||
|
Funktion "ST_artillerie" hinzugefuegt
|
||||||
|
*/
|
||||||
BIN
Binary file not shown.
BIN
Binary file not shown.
Reference in new issue
Block a user