1293 lines
47 KiB
Plaintext
1293 lines
47 KiB
Plaintext
{
|
|
"cells": [
|
|
{
|
|
"metadata": {
|
|
"ExecuteTime": {
|
|
"end_time": "2025-12-30T08:49:29.576047Z",
|
|
"start_time": "2025-12-30T08:49:28.030683Z"
|
|
}
|
|
},
|
|
"cell_type": "code",
|
|
"source": [
|
|
"# Hier werden alle verwendeten Pythonmodule importiert\n",
|
|
"import Datenbank\n",
|
|
"import Import\n",
|
|
"import importlib\n",
|
|
"import Koordinatentransformationen\n",
|
|
"import sqlite3\n",
|
|
"import Funktionales_Modell\n",
|
|
"import Berechnungen\n",
|
|
"import Parameterschaetzung\n",
|
|
"import Stochastisches_Modell\n",
|
|
"from Stochastisches_Modell import StochastischesModell\n",
|
|
"import Export\n",
|
|
"import Netzqualität_Genauigkeit\n",
|
|
"import Datumsfestlegung"
|
|
],
|
|
"id": "2bc687b1b4adb7bd",
|
|
"outputs": [],
|
|
"execution_count": 1
|
|
},
|
|
{
|
|
"metadata": {
|
|
"ExecuteTime": {
|
|
"end_time": "2025-12-30T08:49:29.665269Z",
|
|
"start_time": "2025-12-30T08:49:29.587255Z"
|
|
}
|
|
},
|
|
"cell_type": "code",
|
|
"source": [
|
|
"importlib.reload(Datenbank)\n",
|
|
"importlib.reload(Import)\n",
|
|
"# Anlegen der Datenbank, wenn nicht vorhanden\n",
|
|
"pfad_datenbank = r\"Campusnetz.db\"\n",
|
|
"Datenbank.Datenbank_anlegen(pfad_datenbank)\n",
|
|
"\n",
|
|
"# Import vervollständigen\n",
|
|
"imp = Import.Import(pfad_datenbank)\n",
|
|
"db_zugriff = Datenbank.Datenbankzugriff(pfad_datenbank)"
|
|
],
|
|
"id": "57fcd841405b7866",
|
|
"outputs": [],
|
|
"execution_count": 2
|
|
},
|
|
{
|
|
"metadata": {
|
|
"ExecuteTime": {
|
|
"end_time": "2025-12-30T08:49:29.711859Z",
|
|
"start_time": "2025-12-30T08:49:29.686981Z"
|
|
}
|
|
},
|
|
"cell_type": "code",
|
|
"source": [
|
|
"# Import der Koordinatendatei(en) vom Tachymeter\n",
|
|
"pfad_datei = r\"Daten\\campsnetz_koordinaten_bereinigt.csv\"\n",
|
|
"imp.import_koordinaten_lh_tachymeter(pfad_datei)"
|
|
],
|
|
"id": "6ecde908841d1212",
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"Der Import der Näherungskoordinaten wurde erfolgreich abgeschlossen\n"
|
|
]
|
|
}
|
|
],
|
|
"execution_count": 3
|
|
},
|
|
{
|
|
"metadata": {
|
|
"ExecuteTime": {
|
|
"end_time": "2025-12-30T08:49:29.761764Z",
|
|
"start_time": "2025-12-30T08:49:29.725721Z"
|
|
}
|
|
},
|
|
"cell_type": "code",
|
|
"source": [
|
|
"importlib.reload(Datenbank)\n",
|
|
"db_zugriff = Datenbank.Datenbankzugriff(pfad_datenbank)\n",
|
|
"# Transformationen in ETRS89 / DREF91 Realisierung 2025\n",
|
|
"print(db_zugriff.get_koordinaten(\"naeherung_lh\"))"
|
|
],
|
|
"id": "daefb156198b46dc",
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"{'10009': Matrix([\n",
|
|
"[1000.0],\n",
|
|
"[2000.0],\n",
|
|
"[ 100.0]]), '10006': Matrix([\n",
|
|
"[ 1000.0],\n",
|
|
"[2032.6863],\n",
|
|
"[ 99.5825]]), '10010': Matrix([\n",
|
|
"[1011.8143],\n",
|
|
"[1973.3252],\n",
|
|
"[ 99.9259]]), '10018': Matrix([\n",
|
|
"[1008.5759],\n",
|
|
"[ 1942.762],\n",
|
|
"[ 100.2553]]), '10008': Matrix([\n",
|
|
"[979.7022],\n",
|
|
"[1991.401],\n",
|
|
"[ 99.732]]), '10005': Matrix([\n",
|
|
"[ 966.5154],\n",
|
|
"[2014.6496],\n",
|
|
"[ 99.72]]), '10003': Matrix([\n",
|
|
"[ 908.4312],\n",
|
|
"[1996.1248],\n",
|
|
"[ 99.7403]]), '10004': Matrix([\n",
|
|
"[ 954.1536],\n",
|
|
"[2021.6822],\n",
|
|
"[ 99.4916]]), '10007': Matrix([\n",
|
|
"[ 921.7481],\n",
|
|
"[1973.6201],\n",
|
|
"[ 99.9176]]), '10001': Matrix([\n",
|
|
"[ 833.9439],\n",
|
|
"[1978.3737],\n",
|
|
"[ 99.8946]]), '10002': Matrix([\n",
|
|
"[ 875.9684],\n",
|
|
"[1998.5174],\n",
|
|
"[ 99.5867]]), '10016': Matrix([\n",
|
|
"[ 928.2783],\n",
|
|
"[1944.0082],\n",
|
|
"[ 100.0459]]), '10011': Matrix([\n",
|
|
"[844.9567],\n",
|
|
"[1891.157],\n",
|
|
"[ 99.8117]]), '10026': Matrix([\n",
|
|
"[1020.0059],\n",
|
|
"[1913.8703],\n",
|
|
"[ 100.3059]]), '10027': Matrix([\n",
|
|
"[1016.9451],\n",
|
|
"[1866.2914],\n",
|
|
"[ 100.3251]]), '10043': Matrix([\n",
|
|
"[1031.2077],\n",
|
|
"[1822.4739],\n",
|
|
"[ 100.3035]]), '10044': Matrix([\n",
|
|
"[ 1025.976],\n",
|
|
"[1782.4835],\n",
|
|
"[ 100.5461]]), '10021': Matrix([\n",
|
|
"[ 992.7607],\n",
|
|
"[1904.8854],\n",
|
|
"[ 100.3533]]), '10020': Matrix([\n",
|
|
"[ 984.6187],\n",
|
|
"[1903.3601],\n",
|
|
"[ 100.3423]]), '10024': Matrix([\n",
|
|
"[ 997.4831],\n",
|
|
"[1881.7862],\n",
|
|
"[ 100.3032]]), '10025': Matrix([\n",
|
|
"[996.3241],\n",
|
|
"[1866.844],\n",
|
|
"[100.4102]]), '10022': Matrix([\n",
|
|
"[990.0679],\n",
|
|
"[1896.536],\n",
|
|
"[100.2194]]), '10023': Matrix([\n",
|
|
"[ 987.3223],\n",
|
|
"[1889.8762],\n",
|
|
"[ 100.343]]), '10019': Matrix([\n",
|
|
"[ 962.6387],\n",
|
|
"[1902.3565],\n",
|
|
"[ 99.9772]]), '10033': Matrix([\n",
|
|
"[ 964.0191],\n",
|
|
"[1860.8023],\n",
|
|
"[ 99.8551]]), '10017': Matrix([\n",
|
|
"[ 931.6761],\n",
|
|
"[1900.9945],\n",
|
|
"[ 99.9572]]), '10052': Matrix([\n",
|
|
"[ 1037.875],\n",
|
|
"[1757.2999],\n",
|
|
"[ 100.2737]]), '10042': Matrix([\n",
|
|
"[1017.3489],\n",
|
|
"[1803.0742],\n",
|
|
"[ 100.3441]]), '10053': Matrix([\n",
|
|
"[1033.3758],\n",
|
|
"[1723.4258],\n",
|
|
"[ 100.2774]]), '10037': Matrix([\n",
|
|
"[ 966.2253],\n",
|
|
"[1774.2051],\n",
|
|
"[ 99.9957]]), '10040': Matrix([\n",
|
|
"[ 990.8832],\n",
|
|
"[1780.9678],\n",
|
|
"[ 100.1677]]), '10041': Matrix([\n",
|
|
"[993.2769],\n",
|
|
"[1812.031],\n",
|
|
"[100.4749]]), '10038': Matrix([\n",
|
|
"[ 958.1899],\n",
|
|
"[1804.7135],\n",
|
|
"[ 100.0741]]), '10051': Matrix([\n",
|
|
"[1008.9811],\n",
|
|
"[1750.1838],\n",
|
|
"[ 100.288]]), '10036': Matrix([\n",
|
|
"[ 948.6403],\n",
|
|
"[1763.5807],\n",
|
|
"[ 100.0063]]), '10035': Matrix([\n",
|
|
"[ 910.1265],\n",
|
|
"[1768.0099],\n",
|
|
"[ 100.0781]]), '10039': Matrix([\n",
|
|
"[ 960.3884],\n",
|
|
"[1820.0543],\n",
|
|
"[ 100.0983]]), '10059': Matrix([\n",
|
|
"[1049.2587],\n",
|
|
"[1662.5451],\n",
|
|
"[ 100.0148]]), '10050': Matrix([\n",
|
|
"[1010.0246],\n",
|
|
"[1726.2445],\n",
|
|
"[ 100.1493]]), '10013': Matrix([\n",
|
|
"[900.9076],\n",
|
|
"[1902.873],\n",
|
|
"[ 99.7911]]), '10028': Matrix([\n",
|
|
"[ 853.9608],\n",
|
|
"[1815.7417],\n",
|
|
"[ 99.7793]]), '10012': Matrix([\n",
|
|
"[ 895.3032],\n",
|
|
"[1924.1523],\n",
|
|
"[ 99.8758]]), '10014': Matrix([\n",
|
|
"[ 913.9706],\n",
|
|
"[1918.7731],\n",
|
|
"[ 99.8872]]), '10031': Matrix([\n",
|
|
"[ 937.1557],\n",
|
|
"[1855.2805],\n",
|
|
"[ 99.8479]]), '10015': Matrix([\n",
|
|
"[ 912.5157],\n",
|
|
"[1937.6471],\n",
|
|
"[ 99.9834]]), '10032': Matrix([\n",
|
|
"[ 954.6732],\n",
|
|
"[1845.9356],\n",
|
|
"[ 99.724]]), '10030': Matrix([\n",
|
|
"[ 908.4749],\n",
|
|
"[1828.8008],\n",
|
|
"[ 99.5581]]), '10029': Matrix([\n",
|
|
"[ 909.3343],\n",
|
|
"[1814.8767],\n",
|
|
"[ 99.5486]]), '10034': Matrix([\n",
|
|
"[ 860.2357],\n",
|
|
"[1758.9282],\n",
|
|
"[ 99.737]]), '10045': Matrix([\n",
|
|
"[867.2324],\n",
|
|
"[1705.063],\n",
|
|
"[ 99.7214]]), '10049': Matrix([\n",
|
|
"[ 985.2561],\n",
|
|
"[1715.2109],\n",
|
|
"[ 99.9965]]), '10048': Matrix([\n",
|
|
"[ 957.3889],\n",
|
|
"[1716.2949],\n",
|
|
"[ 99.7212]]), '10047': Matrix([\n",
|
|
"[ 929.5334],\n",
|
|
"[1712.6429],\n",
|
|
"[ 99.6076]]), '10046': Matrix([\n",
|
|
"[ 910.663],\n",
|
|
"[1716.0969],\n",
|
|
"[ 99.5459]]), '10057': Matrix([\n",
|
|
"[969.6876],\n",
|
|
"[1655.597],\n",
|
|
"[ 99.7039]]), '10055': Matrix([\n",
|
|
"[ 922.4731],\n",
|
|
"[1647.7452],\n",
|
|
"[ 99.4658]]), '10054': Matrix([\n",
|
|
"[ 860.4481],\n",
|
|
"[1636.6722],\n",
|
|
"[ 99.7093]]), '10058': Matrix([\n",
|
|
"[1013.2592],\n",
|
|
"[1646.6356],\n",
|
|
"[ 99.8513]]), '10056': Matrix([\n",
|
|
"[ 939.9763],\n",
|
|
"[1636.4179],\n",
|
|
"[ 99.4027]])}\n"
|
|
]
|
|
}
|
|
],
|
|
"execution_count": 4
|
|
},
|
|
{
|
|
"metadata": {
|
|
"ExecuteTime": {
|
|
"end_time": "2025-12-30T08:49:29.830586Z",
|
|
"start_time": "2025-12-30T08:49:29.824737Z"
|
|
}
|
|
},
|
|
"cell_type": "code",
|
|
"source": [
|
|
"importlib.reload(Datenbank)\n",
|
|
"db_zugriff = Datenbank.Datenbankzugriff(pfad_datenbank)\n",
|
|
"# Transformationen in ETRS89 / DREF91 Realisierung 2025\n",
|
|
"print(db_zugriff.get_koordinaten(\"naeherung_us\"))"
|
|
],
|
|
"id": "ab62308d8c665e58",
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"{}\n"
|
|
]
|
|
}
|
|
],
|
|
"execution_count": 5
|
|
},
|
|
{
|
|
"metadata": {
|
|
"ExecuteTime": {
|
|
"end_time": "2025-12-30T08:49:29.873755Z",
|
|
"start_time": "2025-12-30T08:49:29.850848Z"
|
|
}
|
|
},
|
|
"cell_type": "code",
|
|
"source": [
|
|
"importlib.reload(Import)\n",
|
|
"imp = Import.Import(pfad_datenbank)\n",
|
|
"\n",
|
|
"pfad_koordinaten_gnss = r\"Daten\\Koordinaten_OL_umliegend_bereinigt.csv\"\n",
|
|
"# X, Y, Z der SAPOS-Stationen\n",
|
|
"genauigkeit_sapos_referenzstationen = [0.05, 0.04, 0.09]\n",
|
|
"\n",
|
|
"imp.import_koordinaten_gnss(pfad_koordinaten_gnss, genauigkeit_sapos_referenzstationen)\n"
|
|
],
|
|
"id": "b28afe0c64aa59d6",
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/plain": [
|
|
"'Import der Koordinaten aus stationärem GNSS abgeschlossen.'"
|
|
]
|
|
},
|
|
"execution_count": 6,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"execution_count": 6
|
|
},
|
|
{
|
|
"metadata": {
|
|
"ExecuteTime": {
|
|
"end_time": "2025-12-30T08:49:29.920126Z",
|
|
"start_time": "2025-12-30T08:49:29.887303Z"
|
|
}
|
|
},
|
|
"cell_type": "code",
|
|
"source": [
|
|
"# Datumsgebende Koordinaten bestimmen\n",
|
|
"importlib.reload(Datenbank)\n",
|
|
"db_zugriff = Datenbank.Datenbankzugriff(pfad_datenbank)\n",
|
|
"\n",
|
|
"liste_koordinaten_x = [10026]\n",
|
|
"liste_koordinaten_y = [10059]\n",
|
|
"liste_koordinaten_z = [10028]\n",
|
|
"liste_koordinaten_x_y_z = [10008, 10001]\n",
|
|
"\n",
|
|
"db_zugriff.set_datumskoordinaten(liste_koordinaten_x, liste_koordinaten_y, liste_koordinaten_z, liste_koordinaten_x_y_z)\n",
|
|
"\n",
|
|
"# Datumgebende Koordinaten entfernen\n",
|
|
"liste_koordinaten_x = [10026]\n",
|
|
"liste_koordinaten_y = [10059]\n",
|
|
"liste_koordinaten_z = [10028]\n",
|
|
"liste_koordinaten_x_y_z = [10001]\n",
|
|
"\n",
|
|
"db_zugriff.set_datumskoordinaten_to_neupunkte(liste_koordinaten_x, liste_koordinaten_y, liste_koordinaten_z, liste_koordinaten_x_y_z)"
|
|
],
|
|
"id": "ed9be38e35cfc619",
|
|
"outputs": [],
|
|
"execution_count": 7
|
|
},
|
|
{
|
|
"metadata": {
|
|
"ExecuteTime": {
|
|
"end_time": "2025-12-30T08:49:29.929459Z",
|
|
"start_time": "2025-12-30T08:49:29.925861Z"
|
|
}
|
|
},
|
|
"cell_type": "code",
|
|
"source": [
|
|
"# ToDo: Sobald GNSS vorliegend Koordinaten im ETRS89 / DREF 91 (2025) daraus berechnen!\n",
|
|
"#liste_koordinaten_naeherung_us = {\n",
|
|
"# 10001: (3794874.984, 546741.752, 5080029.990),\n",
|
|
"# 10002: (3794842.533, 546726.907, 5080071.133),\n",
|
|
"# 10037: (3794774.148, 546955.423, 5080040.520),\n",
|
|
"# 10044: (3794725.786, 546954.557, 5080084.411),\n",
|
|
"#}\n",
|
|
"\n",
|
|
"\n",
|
|
"#con = sqlite3.connect(pfad_datenbank)\n",
|
|
"#cursor = con.cursor()\n",
|
|
"#sql = \"\"\"\n",
|
|
"#UPDATE Netzpunkte\n",
|
|
"#SET naeherungx_us = ?, naeherungy_us = ?, naeherungz_us = ?\n",
|
|
"#WHERE punktnummer = ?\n",
|
|
"#\"\"\"\n",
|
|
"#for punktnummer, (x, y, z) in #liste_koordinaten_naeherung_us.items():\n",
|
|
"# cursor.execute(sql, (x, y, z, punktnummer))\n",
|
|
"#con.commit()\n",
|
|
"#cursor.close()\n",
|
|
"#con.close()"
|
|
],
|
|
"id": "efa952a603ad1909",
|
|
"outputs": [],
|
|
"execution_count": 8
|
|
},
|
|
{
|
|
"metadata": {
|
|
"ExecuteTime": {
|
|
"end_time": "2025-12-30T08:49:33.454222Z",
|
|
"start_time": "2025-12-30T08:49:29.937700Z"
|
|
}
|
|
},
|
|
"cell_type": "code",
|
|
"source": [
|
|
"# ToDo: Sobald GNSS-Daten vorliegen und die Berechnungen richtig sind, aufräumen!!!\n",
|
|
"\n",
|
|
"importlib.reload(Koordinatentransformationen)\n",
|
|
"trafos = Koordinatentransformationen.Transformationen(pfad_datenbank)\n",
|
|
"\n",
|
|
"\n",
|
|
"import numpy as np\n",
|
|
"\n",
|
|
"import itertools\n",
|
|
"import numpy as np\n",
|
|
"import sympy as sp\n",
|
|
"\n",
|
|
"db = Datenbank.Datenbankzugriff(pfad_datenbank)\n",
|
|
"dict_ausgangssystem = db.get_koordinaten(\"naeherung_lh\", \"Dict\")\n",
|
|
"dict_zielsystem = db.get_koordinaten(\"naeherung_us\", \"Dict\")\n",
|
|
"\n",
|
|
"gemeinsame_punktnummern = sorted(set(dict_ausgangssystem.keys()) & set(dict_zielsystem.keys()))\n",
|
|
"anzahl_gemeinsame_punkte = len(gemeinsame_punktnummern)\n",
|
|
"\n",
|
|
"liste_punkte_ausgangssystem = [dict_ausgangssystem[i] for i in gemeinsame_punktnummern]\n",
|
|
"liste_punkte_zielsystem = [dict_zielsystem[i] for i in gemeinsame_punktnummern]\n",
|
|
"\n",
|
|
"def dist(a, b):\n",
|
|
" return float((a - b).norm())\n",
|
|
"\n",
|
|
"print(\"d(p2,p1)=\", dist(liste_punkte_ausgangssystem[1], liste_punkte_ausgangssystem[0]))\n",
|
|
"print(\"d(P2,P1)=\", dist(liste_punkte_zielsystem[1], liste_punkte_zielsystem[0]))\n",
|
|
"print(\"m0 ~\", dist(liste_punkte_zielsystem[1], liste_punkte_zielsystem[0]) /\n",
|
|
" dist(liste_punkte_ausgangssystem[1], liste_punkte_ausgangssystem[0]))\n",
|
|
"\n",
|
|
"\n",
|
|
"def dist(a, b):\n",
|
|
" return float((a - b).norm())\n",
|
|
"\n",
|
|
"ratios = []\n",
|
|
"pairs = list(itertools.combinations(range(len(liste_punkte_ausgangssystem)), 2))\n",
|
|
"\n",
|
|
"for i, j in pairs:\n",
|
|
" d_loc = dist(liste_punkte_ausgangssystem[i], liste_punkte_ausgangssystem[j])\n",
|
|
" d_ecef = dist(liste_punkte_zielsystem[i], liste_punkte_zielsystem[j])\n",
|
|
" if d_loc > 1e-6:\n",
|
|
" ratios.append(d_ecef / d_loc)\n",
|
|
"\n",
|
|
"print(\"Anzahl Ratios:\", len(ratios))\n",
|
|
"print(\"min/mean/max:\", min(ratios), sum(ratios)/len(ratios), max(ratios))\n",
|
|
"print(\"std:\", float(np.std(ratios)))\n",
|
|
"\n",
|
|
"S_loc = sum(liste_punkte_ausgangssystem, sp.Matrix([0,0,0])) / anzahl_gemeinsame_punkte\n",
|
|
"S_ecef = sum(liste_punkte_zielsystem, sp.Matrix([0,0,0])) / anzahl_gemeinsame_punkte\n",
|
|
"\n",
|
|
"print(\"S_loc:\", S_loc)\n",
|
|
"print(\"S_ecef:\", S_ecef)\n",
|
|
"print(\"Delta:\", (S_ecef - S_loc).evalf(6))\n",
|
|
"\n",
|
|
"\n",
|
|
"def dist(a, b):\n",
|
|
" return float((a - b).norm())\n",
|
|
"\n",
|
|
"n = len(liste_punkte_ausgangssystem)\n",
|
|
"\n",
|
|
"scores = []\n",
|
|
"for i in range(n):\n",
|
|
" d_loc = []\n",
|
|
" d_ecef = []\n",
|
|
" for j in range(n):\n",
|
|
" if i == j:\n",
|
|
" continue\n",
|
|
" d_loc.append(dist(liste_punkte_ausgangssystem[i], liste_punkte_ausgangssystem[j]))\n",
|
|
" d_ecef.append(dist(liste_punkte_zielsystem[i], liste_punkte_zielsystem[j]))\n",
|
|
"\n",
|
|
" d_loc = np.array(d_loc)\n",
|
|
" d_ecef = np.array(d_ecef)\n",
|
|
"\n",
|
|
" # Verhältnisvektor; robust gegen Nullschutz\n",
|
|
" r = d_ecef / np.where(d_loc == 0, np.nan, d_loc)\n",
|
|
"\n",
|
|
" # Streuung der Ratios für Punkt i\n",
|
|
" score = np.nanstd(r)\n",
|
|
" scores.append(score)\n",
|
|
"\n",
|
|
"for pn, sc in sorted(zip(gemeinsame_punktnummern, scores), key=lambda x: -x[1]):\n",
|
|
" print(pn, round(sc, 4))\n",
|
|
"\n",
|
|
"\n",
|
|
"\n",
|
|
"transformationsparameter = trafos.Helmerttransformation_Euler_Transformationsparameter_berechne()"
|
|
],
|
|
"id": "ebb18479e06e53ab",
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"d(p2,p1)= 46.60388451996242\n",
|
|
"d(P2,P1)= 46.59145296840883\n",
|
|
"m0 ~ 0.999733250743331\n",
|
|
"Anzahl Ratios: 45\n",
|
|
"min/mean/max: 0.9986498495467658 0.9999468893556359 1.0004164038548047\n",
|
|
"std: 0.00025301851725699595\n",
|
|
"S_loc: Matrix([[937.945990000000], [1847.25831000000], [99.9451600000000]])\n",
|
|
"S_ecef: Matrix([[3794821.39483000], [546885.587320000], [5080110.27740000]])\n",
|
|
"Delta: Matrix([[3.79388e+6], [545038.], [5.08001e+6]])\n",
|
|
"10054 0.0004\n",
|
|
"10059 0.0004\n",
|
|
"10037 0.0002\n",
|
|
"10028 0.0002\n",
|
|
"10044 0.0001\n",
|
|
"10001 0.0001\n",
|
|
"10014 0.0001\n",
|
|
"10002 0.0001\n",
|
|
"10026 0.0001\n",
|
|
"10008 0.0001\n",
|
|
"Anzahl gemeinsame Punkte: 10\n",
|
|
"\n",
|
|
"Erste Zielpunkte:\n",
|
|
"10001 [3794901.5252, 546745.559, 5080065.7672]\n",
|
|
"10002 [3794866.9711, 546729.5958, 5080092.6364]\n",
|
|
"10008 [3794783.8581, 546746.6347, 5080152.7404]\n",
|
|
"10014 [3794838.7464, 546812.3658, 5080105.2]\n",
|
|
"10026 [3794753.8595, 546827.4296, 5080167.0938]\n",
|
|
"\n",
|
|
"Erste Ausgangspunkte:\n",
|
|
"10001 [833.9439, 1978.3737, 99.8946]\n",
|
|
"10002 [875.9684, 1998.5174, 99.5867]\n",
|
|
"10008 [979.7022, 1991.401, 99.732]\n",
|
|
"10014 [913.9706, 1918.7731, 99.8872]\n",
|
|
"10026 [1020.0059, 1913.8703, 100.3059]\n",
|
|
"min/mean/max: 0.9986498495467658 0.9999468893556359 1.0004164038548047\n",
|
|
"R ist Orthonormal!\n",
|
|
"Iteration Nr.1 abgeschlossen\n",
|
|
"Matrix([[-11.6], [6.17], [1.24], [-0.0287], [-0.303], [0.0131], [0.234]])\n",
|
|
"Iteration Nr.2 abgeschlossen\n",
|
|
"Matrix([[6.69], [-7.21], [-7.49], [0.0287], [-0.00526], [-0.0136], [0.00423]])\n",
|
|
"Iteration Nr.3 abgeschlossen\n",
|
|
"Matrix([[-0.0296], [0.0719], [0.0282], [4.06e-5], [0.000189], [0.000386], [-0.000202]])\n",
|
|
"Iteration Nr.4 abgeschlossen\n",
|
|
"Matrix([[-0.000141], [3.72e-5], [-0.000110], [4.57e-8], [-8.87e-9], [9.87e-8], [-5.50e-8]])\n",
|
|
"Iteration Nr.5 abgeschlossen\n",
|
|
"Matrix([[-2.01e-8], [-2.70e-9], [-2.25e-8], [-4.34e-14], [-5.16e-12], [2.79e-11], [5.62e-12]])\n",
|
|
"Iteration Nr.6 abgeschlossen\n",
|
|
"Matrix([[5.49e-10], [-9.92e-10], [-2.05e-9], [1.18e-13], [-8.18e-13], [1.23e-12], [1.45e-12]])\n",
|
|
"Matrix([[3.79e+6], [5.47e+5], [5.08e+6], [3.79e+6], [5.47e+5], [5.08e+6], [3.79e+6], [5.47e+5], [5.08e+6], [3.79e+6], [5.47e+5], [5.08e+6], [3.79e+6], [5.47e+5], [5.08e+6], [3.79e+6], [5.47e+5], [5.08e+6], [3.79e+6], [5.47e+5], [5.08e+6], [3.79e+6], [5.47e+5], [5.08e+6], [3.79e+6], [5.47e+5], [5.08e+6], [3.79e+6], [5.47e+5], [5.08e+6]])\n",
|
|
"Matrix([[3.79e+6], [5.47e+5], [5.08e+6], [3.79e+6], [5.47e+5], [5.08e+6], [3.79e+6], [5.47e+5], [5.08e+6], [3.79e+6], [5.47e+5], [5.08e+6], [3.79e+6], [5.47e+5], [5.08e+6], [3.79e+6], [5.47e+5], [5.08e+6], [3.79e+6], [5.47e+5], [5.08e+6], [3.79e+6], [5.47e+5], [5.08e+6], [3.79e+6], [5.47e+5], [5.08e+6], [3.79e+6], [5.47e+5], [5.08e+6]])\n",
|
|
"x = Matrix([[3.80e+6], [5.49e+5], [5.08e+6], [1.00], [-0.156], [0.627], [3.26]])\n",
|
|
"\n",
|
|
"l_berechnet_final:\n",
|
|
"10001: 3794901.510, 546745.579, 5080065.739\n",
|
|
"10002: 3794867.000, 546729.613, 5080092.680\n",
|
|
"10008: 3794783.863, 546746.642, 5080152.749\n",
|
|
"10014: 3794838.739, 546812.364, 5080105.171\n",
|
|
"10026: 3794753.855, 546827.443, 5080167.088\n",
|
|
"10028: 3794889.666, 546908.762, 5080056.912\n",
|
|
"10037: 3794800.626, 546960.749, 5080117.708\n",
|
|
"10044: 3794752.687, 546958.324, 5080154.240\n",
|
|
"10054: 3794889.165, 547086.950, 5080038.116\n",
|
|
"10059: 3794736.836, 547079.449, 5080152.372\n",
|
|
"Streckendifferenzen:\n",
|
|
"[0.037854, 0.054708, 0.012057, 0.029525, 0.015332, 0.073156, 0.071369, 0.025069, 0.127425, 0.139397]\n",
|
|
"\n",
|
|
"Differenz Schwerpunkt (Vektor):\n",
|
|
"Matrix([[7.45e-10], [-1.16e-11], [8.38e-10]])\n",
|
|
"Betrag der Schwerpunkt-Differenz:\n",
|
|
"0.000m\n"
|
|
]
|
|
}
|
|
],
|
|
"execution_count": 9
|
|
},
|
|
{
|
|
"metadata": {
|
|
"ExecuteTime": {
|
|
"end_time": "2025-12-30T08:49:33.730974Z",
|
|
"start_time": "2025-12-30T08:49:33.674864Z"
|
|
}
|
|
},
|
|
"cell_type": "code",
|
|
"source": [
|
|
"importlib.reload(Koordinatentransformationen)\n",
|
|
"trafos = Koordinatentransformationen.Transformationen(pfad_datenbank)\n",
|
|
"\n",
|
|
"koordinaten_transformiert = trafos.Helmerttransformation(transformationsparameter)\n",
|
|
"print(koordinaten_transformiert)"
|
|
],
|
|
"id": "2d2156381d974d94",
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"{'10003': Matrix([\n",
|
|
"[3794841.05160911],\n",
|
|
"[546735.115275456],\n",
|
|
"[5080111.54339933]]), '10004': Matrix([\n",
|
|
"[3794803.45940551],\n",
|
|
"[546714.140641702],\n",
|
|
"[ 5080141.3823901]]), '10005': Matrix([\n",
|
|
"[3794793.84166274],\n",
|
|
"[ 546722.32090113],\n",
|
|
"[5080147.93094291]]), '10006': Matrix([\n",
|
|
"[3794766.35574829],\n",
|
|
"[546707.638500931],\n",
|
|
"[5080169.73347008]]), '10007': Matrix([\n",
|
|
"[3794831.04653105],\n",
|
|
"[546758.725470118],\n",
|
|
"[5080116.66332494]]), '10009': Matrix([\n",
|
|
"[3794767.47195461],\n",
|
|
"[546740.086996252],\n",
|
|
"[5080165.95212446]]), '10010': Matrix([\n",
|
|
"[3794758.63661992],\n",
|
|
"[546767.666577211],\n",
|
|
"[5080169.46449998]]), '10011': Matrix([\n",
|
|
"[3794894.92257966],\n",
|
|
"[546833.115975429],\n",
|
|
"[5080061.15134195]]), '10012': Matrix([\n",
|
|
"[3794853.60027107],\n",
|
|
"[546805.236484738],\n",
|
|
"[5080094.88946121]]), '10013': Matrix([\n",
|
|
"[3794849.60872447],\n",
|
|
"[ 546826.86855409],\n",
|
|
"[5080095.43002485]]), '10015': Matrix([\n",
|
|
"[3794839.46502568],\n",
|
|
"[546793.516554541],\n",
|
|
"[5080106.77121535]]), '10016': Matrix([\n",
|
|
"[3794826.65837474],\n",
|
|
"[ 546788.72753901],\n",
|
|
"[5080116.86823753]]), '10017': Matrix([\n",
|
|
"[3794825.01615411],\n",
|
|
"[ 546831.69988615],\n",
|
|
"[5080113.37479229]]), '10018': Matrix([\n",
|
|
"[3794762.24812675],\n",
|
|
"[546797.691250755],\n",
|
|
"[5080163.98038017]]), '10019': Matrix([\n",
|
|
"[3794800.09467062],\n",
|
|
"[546833.323961445],\n",
|
|
"[5080131.72453226]]), '10020': Matrix([\n",
|
|
"[3794782.61058088],\n",
|
|
"[546834.470509102],\n",
|
|
"[5080145.03614137]]), '10021': Matrix([\n",
|
|
"[3794776.02957169],\n",
|
|
"[ 546833.74069488],\n",
|
|
"[5080150.01297385]]), '10022': Matrix([\n",
|
|
"[3794778.33715317],\n",
|
|
"[546841.750187296],\n",
|
|
"[5080147.27507413]]), '10023': Matrix([\n",
|
|
"[3794780.79521146],\n",
|
|
"[546848.101209168],\n",
|
|
"[5080144.92492221]]), '10024': Matrix([\n",
|
|
"[3794772.81613581],\n",
|
|
"[546857.095708699],\n",
|
|
"[5080149.83471416]]), '10025': Matrix([\n",
|
|
"[3794774.20856191],\n",
|
|
"[546871.810730791],\n",
|
|
"[5080147.35917511]]), '10027': Matrix([\n",
|
|
"[3794757.59126177],\n",
|
|
"[ 546874.33140033],\n",
|
|
"[ 5080159.3175342]]), '10029': Matrix([\n",
|
|
"[3794845.02635416],\n",
|
|
"[ 546914.91670774],\n",
|
|
"[5080089.09994617]]), '10030': Matrix([\n",
|
|
"[3794845.35315639],\n",
|
|
"[546901.027441841],\n",
|
|
"[5080090.35653172]]), '10031': Matrix([\n",
|
|
"[3794821.75944771],\n",
|
|
"[546877.548058418],\n",
|
|
"[5080110.74604618]]), '10032': Matrix([\n",
|
|
"[ 3794807.8482107],\n",
|
|
"[546888.486125463],\n",
|
|
"[5080119.74590858]]), '10033': Matrix([\n",
|
|
"[3794800.01604745],\n",
|
|
"[546874.652456339],\n",
|
|
"[ 5080127.2047441]]), '10034': Matrix([\n",
|
|
"[3794886.10489475],\n",
|
|
"[546965.698741554],\n",
|
|
"[5080053.40592357]]), '10035': Matrix([\n",
|
|
"[3794845.94875191],\n",
|
|
"[546961.512678588],\n",
|
|
"[5080084.08751097]]), '10036': Matrix([\n",
|
|
"[ 3794815.0546409],\n",
|
|
"[546969.596670608],\n",
|
|
"[5080106.06411486]]), '10038': Matrix([\n",
|
|
"[3794806.32334837],\n",
|
|
"[546929.730872601],\n",
|
|
"[5080116.89880491]]), '10039': Matrix([\n",
|
|
"[3794804.16237313],\n",
|
|
"[546914.731636072],\n",
|
|
"[5080120.13924256]]), '10040': Matrix([\n",
|
|
"[3794780.72087746],\n",
|
|
"[546956.424991315],\n",
|
|
"[5080133.16147109]]), '10041': Matrix([\n",
|
|
"[ 3794778.1533287],\n",
|
|
"[546925.877928891],\n",
|
|
"[5080138.72231384]]), '10042': Matrix([\n",
|
|
"[3794758.95717917],\n",
|
|
"[546937.059902176],\n",
|
|
"[5080151.61030441]]), '10043': Matrix([\n",
|
|
"[3794747.27379863],\n",
|
|
"[546919.149782895],\n",
|
|
"[5080162.14971609]]), '10045': Matrix([\n",
|
|
"[3794881.90045231],\n",
|
|
"[547019.783587438],\n",
|
|
"[5080050.71577784]]), '10046': Matrix([\n",
|
|
"[3794846.58037187],\n",
|
|
"[547012.997115671],\n",
|
|
"[5080077.44042076]]), '10047': Matrix([\n",
|
|
"[3794831.53498179],\n",
|
|
"[547018.239388235],\n",
|
|
"[5080088.12403859]]), '10048': Matrix([\n",
|
|
"[3794809.10667963],\n",
|
|
"[547017.302310622],\n",
|
|
"[ 5080105.0143912]]), '10049': Matrix([\n",
|
|
"[3794786.89079629],\n",
|
|
"[547021.076569963],\n",
|
|
"[5080121.44468111]]), '10050': Matrix([\n",
|
|
"[3794766.77195448],\n",
|
|
"[547012.526623627],\n",
|
|
"[5080137.48497074]]), '10051': Matrix([\n",
|
|
"[3794767.05746264],\n",
|
|
"[546988.699370853],\n",
|
|
"[5080139.99787468]]), '10052': Matrix([\n",
|
|
"[3794743.62620891],\n",
|
|
"[546984.415934838],\n",
|
|
"[5080157.83116681]]), '10053': Matrix([\n",
|
|
"[3794748.14608301],\n",
|
|
"[ 547017.57483818],\n",
|
|
"[5080150.93007251]]), '10055': Matrix([\n",
|
|
"[3794838.85197728],\n",
|
|
"[547081.903863645],\n",
|
|
"[5080075.69824785]]), '10056': Matrix([\n",
|
|
"[3794825.04100344],\n",
|
|
"[547094.811574165],\n",
|
|
"[5080084.48876832]]), '10057': Matrix([\n",
|
|
"[ 3794800.8193707],\n",
|
|
"[547078.671611169],\n",
|
|
"[5080104.57270624]]), '10058': Matrix([\n",
|
|
"[3794766.10881437],\n",
|
|
"[547091.754287187],\n",
|
|
"[5080129.12088173]])}\n"
|
|
]
|
|
}
|
|
],
|
|
"execution_count": 10
|
|
},
|
|
{
|
|
"metadata": {
|
|
"ExecuteTime": {
|
|
"end_time": "2025-12-30T08:49:33.839733Z",
|
|
"start_time": "2025-12-30T08:49:33.795974Z"
|
|
}
|
|
},
|
|
"cell_type": "code",
|
|
"source": [
|
|
"importlib.reload(Datenbank)\n",
|
|
"db_zugriff = Datenbank.Datenbankzugriff(pfad_datenbank)\n",
|
|
"\n",
|
|
"db_zugriff.set_koordinaten(koordinaten_transformiert, \"naeherung_us\")"
|
|
],
|
|
"id": "5a9e8f24709980d2",
|
|
"outputs": [],
|
|
"execution_count": 11
|
|
},
|
|
{
|
|
"metadata": {
|
|
"ExecuteTime": {
|
|
"end_time": "2025-12-30T08:49:33.886645Z",
|
|
"start_time": "2025-12-30T08:49:33.848635Z"
|
|
}
|
|
},
|
|
"cell_type": "code",
|
|
"source": [
|
|
"# Importieren der tachymetrischen Beobachtungen\n",
|
|
"importlib.reload(Datenbank)\n",
|
|
"db_zugriff = Datenbank.Datenbankzugriff(pfad_datenbank)\n",
|
|
"\n",
|
|
"db_zugriff.get_instrument_liste(\"Tachymeter\")\n",
|
|
"db_zugriff.set_instrument(\"Tachymeter\", \"Trimble S9\")\n",
|
|
"db_zugriff.set_instrument(\"Nivellier\", \"Trimble DiNi 0.3\")\n",
|
|
"db_zugriff.get_instrument_liste(\"Tachymeter\")"
|
|
],
|
|
"id": "bb4c738edcf9ac6f",
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"Das Instrument Trimble S9 wurde erfolgreich hinzugefügt.\n",
|
|
"Das Instrument Trimble DiNi 0.3 wurde erfolgreich hinzugefügt.\n"
|
|
]
|
|
},
|
|
{
|
|
"data": {
|
|
"text/plain": [
|
|
"[(1, 'Tachymeter', 'Trimble S9')]"
|
|
]
|
|
},
|
|
"execution_count": 12,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"execution_count": 12
|
|
},
|
|
{
|
|
"metadata": {
|
|
"ExecuteTime": {
|
|
"end_time": "2025-12-30T08:49:33.963474Z",
|
|
"start_time": "2025-12-30T08:49:33.900004Z"
|
|
}
|
|
},
|
|
"cell_type": "code",
|
|
"source": [
|
|
"#Importieren der apriori Genauigkeitsinformationen\n",
|
|
"#Zulässige Beobachtungsarten = \"Tachymeter_Richtung\", \"Tachymeter_Strecke\"\n",
|
|
"# Wenn Beobachtungsart = \"Tachymeter_Richtung\" --> Übergabe in Milligon und nur Stabw_apriori_konst\n",
|
|
"# Wenn Beobachtungsart = \"Tachymeter_Strecke\" --> Übergabe Stabw_apriori_konst in Millimeter und Stabw_apriori_streckenprop in ppm\n",
|
|
"\n",
|
|
"importlib.reload(Datenbank)\n",
|
|
"db_zugriff = Datenbank.Datenbankzugriff(pfad_datenbank)\n",
|
|
"importlib.reload(Berechnungen)\n",
|
|
"\n",
|
|
"db_zugriff.set_genauigkeiten(1, \"Tachymeter_Richtung\", 0.15)\n",
|
|
"db_zugriff.set_genauigkeiten(1, \"Tachymeter_Strecke\", 0.8, 1)\n",
|
|
"db_zugriff.set_genauigkeiten(1, \"Tachymeter_Zenitwinkel\", 0.15)"
|
|
],
|
|
"id": "c2db29680c53f8c4",
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"Die Genauigkeitsangabe für die Beobachtungsart Tachymeter_Richtung des Instrumentes Trimble S9 wurde erfolgreich hinzugefügt.\n",
|
|
"Die Genauigkeitsangabe für die Beobachtungsart Tachymeter_Strecke des Instrumentes Trimble S9 wurde erfolgreich hinzugefügt.\n",
|
|
"Die Genauigkeitsangabe für die Beobachtungsart Tachymeter_Zenitwinkel des Instrumentes Trimble S9 wurde erfolgreich hinzugefügt.\n"
|
|
]
|
|
}
|
|
],
|
|
"execution_count": 13
|
|
},
|
|
{
|
|
"metadata": {
|
|
"ExecuteTime": {
|
|
"end_time": "2025-12-30T08:49:34.010214Z",
|
|
"start_time": "2025-12-30T08:49:33.973104Z"
|
|
}
|
|
},
|
|
"cell_type": "code",
|
|
"source": [
|
|
"# Importieren der tachymetrischen Beobachtungen\n",
|
|
"importlib.reload(Import)\n",
|
|
"imp = Import.Import(pfad_datenbank)\n",
|
|
"\n",
|
|
"pfad_datei_tachymeterbeobachtungen = r\"Daten\\campsnetz_beobachtungen_bereinigt.csv\"\n",
|
|
"\n",
|
|
"imp.import_beobachtungen_tachymeter(pfad_datei_tachymeterbeobachtungen, 1)"
|
|
],
|
|
"id": "3d074282dffbbfd0",
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"Der Import der Datei Daten\\campsnetz_beobachtungen_bereinigt.csv wurde erfolgreich abgeschlossen.\n"
|
|
]
|
|
}
|
|
],
|
|
"execution_count": 14
|
|
},
|
|
{
|
|
"metadata": {
|
|
"ExecuteTime": {
|
|
"end_time": "2025-12-30T08:49:34.053221Z",
|
|
"start_time": "2025-12-30T08:49:34.032613Z"
|
|
}
|
|
},
|
|
"cell_type": "code",
|
|
"source": [
|
|
"# Importieren der Normalhöhen der HFP\n",
|
|
"importlib.reload(Datenbank)\n",
|
|
"db_zugriff = Datenbank.Datenbankzugriff(pfad_datenbank)\n",
|
|
"\n",
|
|
"liste_HFP = [(666, 3.891), (812, 3.999), (816, 3.995)]\n",
|
|
"\n",
|
|
"db_zugriff.set_normalhoehe_hfp(liste_HFP)"
|
|
],
|
|
"id": "da3bd8e134a3fe5c",
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/plain": [
|
|
"'Der HFP 666 wurde neu hinzugefügt.\\nDer HFP 812 wurde neu hinzugefügt.\\nDer HFP 816 wurde neu hinzugefügt.'"
|
|
]
|
|
},
|
|
"execution_count": 15,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"execution_count": 15
|
|
},
|
|
{
|
|
"metadata": {
|
|
"ExecuteTime": {
|
|
"end_time": "2025-12-30T08:49:34.070626Z",
|
|
"start_time": "2025-12-30T08:49:34.063294Z"
|
|
}
|
|
},
|
|
"cell_type": "code",
|
|
"source": [
|
|
"importlib.reload(Datenbank)\n",
|
|
"db_zugriff = Datenbank.Datenbankzugriff(pfad_datenbank)\n",
|
|
"\n",
|
|
"db_zugriff.get_normalhoehe_hfp()"
|
|
],
|
|
"id": "ded7bfe9e696a09d",
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/plain": [
|
|
"[('666', 3.891), ('812', 3.999), ('816', 3.995)]"
|
|
]
|
|
},
|
|
"execution_count": 16,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"execution_count": 16
|
|
},
|
|
{
|
|
"metadata": {
|
|
"ExecuteTime": {
|
|
"end_time": "2025-12-30T08:49:34.114847Z",
|
|
"start_time": "2025-12-30T08:49:34.102847Z"
|
|
}
|
|
},
|
|
"cell_type": "code",
|
|
"source": [
|
|
"# Nivellement-Beobachtungen Importieren Teil 1\n",
|
|
"\n",
|
|
"importlib.reload(Import)\n",
|
|
"imp = Import.Import(pfad_datenbank)\n",
|
|
"dict_punkthoehen_naeherung_niv, liste_punkte_in_db = imp.vorbereitung_import_beobachtungen_nivellement_naeherung_punkthoehen(r\"Daten\\Niv_bereinigt.DAT.csv\", 2)"
|
|
],
|
|
"id": "1f61a51b2a7366e7",
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"Für folgende Nivellementpunkte werden die Höhen in der Ausgleichung berechnet: ['812', '10047', '10046', '10045', '10034', '10035', '10029', '10030', '10031', '10017', '10013', '10012', '10014', '10015', '10016', '10007', '666', '10054', '10056', '10058', '10052', '10043', '10026', '10010', '10006', '816', '10048', '10049', '10053', '10050', '10051', '10040', '10037', '10038', '10039', '10032', '10033', '10025', '10024', '10023', '10022', '10021', '10020', '10019', '10036', '10028', '10011', '10001', '10003', '10008', '10005', '10004', '10002', '10055', '10057', '10059', '10044', '10041', '10042', '10027', '10018', '10009']\n",
|
|
"Für folgende Punkte wird aktuell keine Höhe in der Ausgleichung berechnet: ['FH14', '80001', 'FH11', 'FH13', '80002', '90001', '90002', '90003', '90004', '90005', '90006', '90007', '90008', '90009', '90010', '90011', '90012', '90013', '90014', 'FH3', 'FH4', '70001', 'FH15', '70002', '60001', 'FH5', '60002', '60003', '60004', '60005', '60006', '60007', '60008', '60009', '60010', '30001', '30002', '30003', '30004', '30005', '30006', '30007', '30008']. Bei Bedarf im folgenden Schritt ändern!\n"
|
|
]
|
|
}
|
|
],
|
|
"execution_count": 17
|
|
},
|
|
{
|
|
"metadata": {
|
|
"ExecuteTime": {
|
|
"end_time": "2025-12-30T08:49:34.161028Z",
|
|
"start_time": "2025-12-30T08:49:34.134817Z"
|
|
}
|
|
},
|
|
"cell_type": "code",
|
|
"source": [
|
|
"# Nivellement-Beobachtungen Importieren Teil 2\n",
|
|
"\n",
|
|
"importlib.reload(Import)\n",
|
|
"imp = Import.Import(pfad_datenbank)\n",
|
|
"liste_hoehenpunkte_hinzufuegen = ['FH14', 'FH11', 'FH13', 'FH3', 'FH4', 'FH15', 'FH5']\n",
|
|
"imp.import_beobachtungen_nivellement_naeherung_punkthoehen(dict_punkthoehen_naeherung_niv, liste_punkte_in_db, liste_hoehenpunkte_hinzufuegen)"
|
|
],
|
|
"id": "6c909b9792861b30",
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"Neu hinzugefügt (7): ['FH14', 'FH11', 'FH13', 'FH3', 'FH4', 'FH15', 'FH5']\n",
|
|
"Bereits vorhanden (0): []\n",
|
|
"Geändert (62): ['812', '10047', '10046', '10045', '10034', '10035', '10029', '10030', '10031', '10017', '10013', '10012', '10014', '10015', '10016', '10007', '666', '10054', '10056', '10058', '10052', '10043', '10026', '10010', '10006', '816', '10048', '10049', '10053', '10050', '10051', '10040', '10037', '10038', '10039', '10032', '10033', '10025', '10024', '10023', '10022', '10021', '10020', '10019', '10036', '10028', '10011', '10001', '10003', '10008', '10005', '10004', '10002', '10055', '10057', '10059', '10044', '10041', '10042', '10027', '10018', '10009']\n",
|
|
"\n"
|
|
]
|
|
},
|
|
{
|
|
"data": {
|
|
"text/plain": [
|
|
"\"Für folgende Punkte werden die Höhen Ausgeglichen: ['FH14', 'FH11', 'FH13', 'FH3', 'FH4', 'FH15', 'FH5', '812', '10047', '10046', '10045', '10034', '10035', '10029', '10030', '10031', '10017', '10013', '10012', '10014', '10015', '10016', '10007', '666', '10054', '10056', '10058', '10052', '10043', '10026', '10010', '10006', '816', '10048', '10049', '10053', '10050', '10051', '10040', '10037', '10038', '10039', '10032', '10033', '10025', '10024', '10023', '10022', '10021', '10020', '10019', '10036', '10028', '10011', '10001', '10003', '10008', '10005', '10004', '10002', '10055', '10057', '10059', '10044', '10041', '10042', '10027', '10018', '10009']\""
|
|
]
|
|
},
|
|
"execution_count": 18,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"execution_count": 18
|
|
},
|
|
{
|
|
"metadata": {
|
|
"ExecuteTime": {
|
|
"end_time": "2025-12-30T08:49:34.208348Z",
|
|
"start_time": "2025-12-30T08:49:34.178066Z"
|
|
}
|
|
},
|
|
"cell_type": "code",
|
|
"source": [
|
|
"# Nivellement-Beobachtungen Importieren Teil 3\n",
|
|
"importlib.reload(Import)\n",
|
|
"imp = Import.Import(pfad_datenbank)\n",
|
|
"imp.import_beobachtungen_nivellement_RVVR(r\"Daten\\Niv_bereinigt.DAT.csv\", 2)"
|
|
],
|
|
"id": "4c06b9c4cd78e7b7",
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/plain": [
|
|
"'Die Beobachtungen aus der Datei Daten\\\\Niv_bereinigt.DAT.csv wurden erfolgreich importiert.'"
|
|
]
|
|
},
|
|
"execution_count": 19,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"execution_count": 19
|
|
},
|
|
{
|
|
"metadata": {
|
|
"ExecuteTime": {
|
|
"end_time": "2025-12-30T08:52:32.759651Z",
|
|
"start_time": "2025-12-30T08:49:34.241341Z"
|
|
}
|
|
},
|
|
"cell_type": "code",
|
|
"source": [
|
|
"# Jacobimatrix aufstellen\n",
|
|
"importlib.reload(Datenbank)\n",
|
|
"db_zugriff = Datenbank.Datenbankzugriff(pfad_datenbank)\n",
|
|
"\n",
|
|
"# Parameter des GRS80-ellipsoids (Bezugsellipsoid des ETRS89 / DREF 91 (2025)\n",
|
|
"# ToDo: Quelle mit möglichst genauen Parametern heraussuchen!\n",
|
|
"a = 6378137.0 #m\n",
|
|
"b = 63567552.314 #m\n",
|
|
"\n",
|
|
"importlib.reload(Funktionales_Modell)\n",
|
|
"fm = Funktionales_Modell.FunktionalesModell(pfad_datenbank, a, b)\n",
|
|
"\n",
|
|
"#db_zugriff.get_beobachtungen_id_standpunkt_zielpunkt(\"tachymeter_distanz\")\n",
|
|
"Jacobimatrix_symbolisch = fm.jacobi_matrix_symbolisch()[0]\n",
|
|
"Jacobimatrix_symbolisch_liste_unbekannte = fm.jacobi_matrix_symbolisch()[1]\n",
|
|
"Jacobimatrix_symbolisch_liste_beobachtungsvektor = fm.jacobi_matrix_symbolisch()[2]"
|
|
],
|
|
"id": "c9367690f5b73953",
|
|
"outputs": [],
|
|
"execution_count": 20
|
|
},
|
|
{
|
|
"metadata": {
|
|
"ExecuteTime": {
|
|
"end_time": "2025-12-30T08:54:01.269915Z",
|
|
"start_time": "2025-12-30T08:53:51.802773Z"
|
|
}
|
|
},
|
|
"cell_type": "code",
|
|
"source": [
|
|
"importlib.reload(Datenbank)\n",
|
|
"db_zugriff = Datenbank.Datenbankzugriff(pfad_datenbank)\n",
|
|
"importlib.reload(Funktionales_Modell)\n",
|
|
"fm = Funktionales_Modell.FunktionalesModell(pfad_datenbank, a, b)\n",
|
|
"\n",
|
|
"A_matrix_numerisch_iteration0 = fm.jacobi_matrix_zahlen_iteration_0(Jacobimatrix_symbolisch, \"naeherung_us\", Jacobimatrix_symbolisch_liste_unbekannte, Jacobimatrix_symbolisch_liste_beobachtungsvektor)"
|
|
],
|
|
"id": "163fa2e24923b40",
|
|
"outputs": [],
|
|
"execution_count": 21
|
|
},
|
|
{
|
|
"metadata": {
|
|
"ExecuteTime": {
|
|
"end_time": "2025-12-30T08:54:01.409844Z",
|
|
"start_time": "2025-12-30T08:54:01.278760Z"
|
|
}
|
|
},
|
|
"cell_type": "code",
|
|
"source": [
|
|
"importlib.reload(Funktionales_Modell)\n",
|
|
"fm = Funktionales_Modell.FunktionalesModell(pfad_datenbank, a, b)\n",
|
|
"\n",
|
|
"beobachtungsvektor_numerisch = fm.beobachtungsvektor_numerisch(Jacobimatrix_symbolisch_liste_beobachtungsvektor)"
|
|
],
|
|
"id": "80e8325721c950f8",
|
|
"outputs": [],
|
|
"execution_count": 22
|
|
},
|
|
{
|
|
"metadata": {
|
|
"ExecuteTime": {
|
|
"end_time": "2025-12-30T08:54:06.114931Z",
|
|
"start_time": "2025-12-30T08:54:01.416135Z"
|
|
}
|
|
},
|
|
"cell_type": "code",
|
|
"source": [
|
|
"importlib.reload(Funktionales_Modell)\n",
|
|
"fm = Funktionales_Modell.FunktionalesModell(pfad_datenbank, a, b)\n",
|
|
"\n",
|
|
"beobachtungsvektor_naeherung_symbolisch = fm.beobachtungsvektor_naeherung_symbolisch(Jacobimatrix_symbolisch_liste_beobachtungsvektor)"
|
|
],
|
|
"id": "33e9fbd465c577e4",
|
|
"outputs": [],
|
|
"execution_count": 23
|
|
},
|
|
{
|
|
"metadata": {
|
|
"ExecuteTime": {
|
|
"end_time": "2025-12-30T08:55:47.001891Z",
|
|
"start_time": "2025-12-30T08:55:46.322273Z"
|
|
}
|
|
},
|
|
"cell_type": "code",
|
|
"source": [
|
|
"importlib.reload(Funktionales_Modell)\n",
|
|
"fm = Funktionales_Modell.FunktionalesModell(pfad_datenbank, a, b)\n",
|
|
"\n",
|
|
"beobachtungsvektor_naeherung_numerisch_iteration0 = fm.beobachtungsvektor_naeherung_numerisch_iteration0(Jacobimatrix_symbolisch_liste_beobachtungsvektor, beobachtungsvektor_naeherung_symbolisch)"
|
|
],
|
|
"id": "bcf3dd5fc820d077",
|
|
"outputs": [
|
|
{
|
|
"ename": "OperationalError",
|
|
"evalue": "no such table: Netzpunkte",
|
|
"output_type": "error",
|
|
"traceback": [
|
|
"\u001B[31m---------------------------------------------------------------------------\u001B[39m",
|
|
"\u001B[31mOperationalError\u001B[39m Traceback (most recent call last)",
|
|
"\u001B[36mCell\u001B[39m\u001B[36m \u001B[39m\u001B[32mIn[24]\u001B[39m\u001B[32m, line 2\u001B[39m\n\u001B[32m 1\u001B[39m importlib.reload(Funktionales_Modell)\n\u001B[32m----> \u001B[39m\u001B[32m2\u001B[39m fm = \u001B[43mFunktionales_Modell\u001B[49m\u001B[43m.\u001B[49m\u001B[43mFunktionalesModell\u001B[49m\u001B[43m(\u001B[49m\u001B[43mpfad_datenbank\u001B[49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[43ma\u001B[49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[43mb\u001B[49m\u001B[43m)\u001B[49m\n\u001B[32m 4\u001B[39m beobachtungsvektor_naeherung_numerisch_iteration0 = fm.beobachtungsvektor_naeherung_numerisch_iteration0(Jacobimatrix_symbolisch_liste_beobachtungsvektor, beobachtungsvektor_naeherung_symbolisch)\n",
|
|
"\u001B[36mFile \u001B[39m\u001B[32m~\\Desktop\\Masterprojekt_V3\\Funktionales_Modell.py:11\u001B[39m, in \u001B[36mFunktionalesModell.__init__\u001B[39m\u001B[34m(self, pfad_datenbank, a, b)\u001B[39m\n\u001B[32m 9\u001B[39m \u001B[38;5;28mself\u001B[39m.pfad_datenbank = pfad_datenbank\n\u001B[32m 10\u001B[39m \u001B[38;5;28mself\u001B[39m.berechnungen = Berechnungen(a, b)\n\u001B[32m---> \u001B[39m\u001B[32m11\u001B[39m \u001B[38;5;28mself\u001B[39m.substitutionen_dict = \u001B[38;5;28;43mself\u001B[39;49m\u001B[43m.\u001B[49m\u001B[43mdict_substitutionen_uebergeordnetes_system\u001B[49m\u001B[43m(\u001B[49m\u001B[43m)\u001B[49m\n\u001B[32m 12\u001B[39m \u001B[38;5;28mself\u001B[39m.dict_punkt_symbole = {}\n",
|
|
"\u001B[36mFile \u001B[39m\u001B[32m~\\Desktop\\Masterprojekt_V3\\Funktionales_Modell.py:645\u001B[39m, in \u001B[36mFunktionalesModell.dict_substitutionen_uebergeordnetes_system\u001B[39m\u001B[34m(self, unbekanntenvektor_aus_iteration)\u001B[39m\n\u001B[32m 643\u001B[39m db_zugriff = Datenbankzugriff(\u001B[38;5;28mself\u001B[39m.pfad_datenbank)\n\u001B[32m 644\u001B[39m \u001B[38;5;28;01mif\u001B[39;00m unbekanntenvektor_aus_iteration \u001B[38;5;129;01mis\u001B[39;00m \u001B[38;5;28;01mNone\u001B[39;00m:\n\u001B[32m--> \u001B[39m\u001B[32m645\u001B[39m dict_koordinaten = \u001B[43mdb_zugriff\u001B[49m\u001B[43m.\u001B[49m\u001B[43mget_koordinaten\u001B[49m\u001B[43m(\u001B[49m\u001B[33;43m\"\u001B[39;49m\u001B[33;43mnaeherung_us\u001B[39;49m\u001B[33;43m\"\u001B[39;49m\u001B[43m)\u001B[49m\n\u001B[32m 646\u001B[39m \u001B[38;5;28;01melse\u001B[39;00m:\n\u001B[32m 647\u001B[39m dict_koordinaten = \u001B[38;5;28mself\u001B[39m.unbekanntenvektor_numerisch_to_dict_unbekanntenvektor(\n\u001B[32m 648\u001B[39m \u001B[38;5;28mself\u001B[39m.liste_unbekanntenvektor_symbolisch,\n\u001B[32m 649\u001B[39m unbekanntenvektor_aus_iteration\n\u001B[32m 650\u001B[39m )\n",
|
|
"\u001B[36mFile \u001B[39m\u001B[32m~\\Desktop\\Masterprojekt_V3\\Datenbank.py:103\u001B[39m, in \u001B[36mDatenbankzugriff.get_koordinaten\u001B[39m\u001B[34m(self, koordinatenart, ausgabeart)\u001B[39m\n\u001B[32m 100\u001B[39m \u001B[38;5;28;01melif\u001B[39;00m koordinatenart == \u001B[33m\"\u001B[39m\u001B[33mnaeherung_us\u001B[39m\u001B[33m\"\u001B[39m:\n\u001B[32m 101\u001B[39m values = \u001B[33m\"\u001B[39m\u001B[33mpunktnummer, naeherungx_us, naeherungy_us, naeherungz_us\u001B[39m\u001B[33m\"\u001B[39m\n\u001B[32m--> \u001B[39m\u001B[32m103\u001B[39m liste_koordinaten = \u001B[43mcursor\u001B[49m\u001B[43m.\u001B[49m\u001B[43mexecute\u001B[49m\u001B[43m(\u001B[49m\u001B[33;43mf\u001B[39;49m\u001B[33;43m\"\"\"\u001B[39;49m\n\u001B[32m 104\u001B[39m \u001B[33;43mSELECT \u001B[39;49m\u001B[38;5;132;43;01m{\u001B[39;49;00m\u001B[43mvalues\u001B[49m\u001B[38;5;132;43;01m}\u001B[39;49;00m\u001B[33;43m FROM Netzpunkte;\u001B[39;49m\n\u001B[32m 105\u001B[39m \u001B[33;43m\u001B[39;49m\u001B[33;43m\"\"\"\u001B[39;49m\u001B[43m)\u001B[49m.fetchall()\n\u001B[32m 106\u001B[39m cursor.close()\n\u001B[32m 107\u001B[39m con.close()\n",
|
|
"\u001B[31mOperationalError\u001B[39m: no such table: Netzpunkte"
|
|
]
|
|
}
|
|
],
|
|
"execution_count": 24
|
|
},
|
|
{
|
|
"metadata": {
|
|
"jupyter": {
|
|
"is_executing": true
|
|
},
|
|
"ExecuteTime": {
|
|
"end_time": "2025-12-30T08:55:47.007839100Z",
|
|
"start_time": "2025-12-29T18:10:34.177878Z"
|
|
}
|
|
},
|
|
"cell_type": "code",
|
|
"source": [
|
|
"# Auftstellen der Qll-Matrix\n",
|
|
"importlib.reload(Stochastisches_Modell)\n",
|
|
"stoch_modell = Stochastisches_Modell.StochastischesModell(A_matrix_numerisch_iteration0.rows)\n",
|
|
"\n",
|
|
"Qll_matrix_symbolisch = stoch_modell.Qll_symbolisch(pfad_datenbank, Jacobimatrix_symbolisch_liste_beobachtungsvektor)\n",
|
|
"Qll_matrix_numerisch = stoch_modell.Qll_numerisch(pfad_datenbank, Qll_matrix_symbolisch,Jacobimatrix_symbolisch_liste_beobachtungsvektor)"
|
|
],
|
|
"id": "63c4db5423f4fbaf",
|
|
"outputs": [],
|
|
"execution_count": null
|
|
},
|
|
{
|
|
"metadata": {},
|
|
"cell_type": "code",
|
|
"source": "",
|
|
"id": "56d21ad3a21bcb23",
|
|
"outputs": [],
|
|
"execution_count": null
|
|
},
|
|
{
|
|
"metadata": {},
|
|
"cell_type": "code",
|
|
"source": "",
|
|
"id": "62ce1bc475e81e81",
|
|
"outputs": [],
|
|
"execution_count": null
|
|
},
|
|
{
|
|
"metadata": {},
|
|
"cell_type": "code",
|
|
"source": "",
|
|
"id": "275c60800b458eae",
|
|
"outputs": [],
|
|
"execution_count": null
|
|
},
|
|
{
|
|
"metadata": {},
|
|
"cell_type": "code",
|
|
"source": [
|
|
"importlib.reload(Funktionales_Modell)\n",
|
|
"fm = Funktionales_Modell.FunktionalesModell(pfad_datenbank, a, b)\n",
|
|
"\n",
|
|
"importlib.reload(Parameterschaetzung)\n",
|
|
"importlib.reload(Stochastisches_Modell)\n",
|
|
"\n",
|
|
"importlib.reload(Netzqualität_Genauigkeit)\n",
|
|
"importlib.reload(Export)\n",
|
|
"\n",
|
|
"\n",
|
|
"stoch_modell = Stochastisches_Modell.StochastischesModell(A_matrix_numerisch_iteration0.rows)\n",
|
|
"\n",
|
|
"dx = Parameterschaetzung.ausgleichung_global(A_matrix_numerisch_iteration0, fm.berechnung_dl(beobachtungsvektor_numerisch, beobachtungsvektor_naeherung_numerisch_iteration0), stoch_modell)[1]"
|
|
],
|
|
"id": "d114b64c8acc8c50",
|
|
"outputs": [],
|
|
"execution_count": null
|
|
},
|
|
{
|
|
"metadata": {},
|
|
"cell_type": "code",
|
|
"source": [
|
|
"# Von Fabian\n",
|
|
"\n",
|
|
"importlib.reload(Funktionales_Modell)\n",
|
|
"fm = Funktionales_Modell.FunktionalesModell(pfad_datenbank, a, b)\n",
|
|
"importlib.reload(Export)\n",
|
|
"importlib.reload(Datenbank)\n",
|
|
"\n",
|
|
"unbekanntenvektor_symbolisch = (fm.unbekanntenvektor_symbolisch(Jacobimatrix_symbolisch_liste_unbekannte))\n",
|
|
"unbekanntenvektor_numerisch_iteration0 = fm.unbekanntenvektor_numerisch(Jacobimatrix_symbolisch_liste_unbekannte, unbekanntenvektor_symbolisch)\n",
|
|
"print(unbekanntenvektor_numerisch_iteration0)\n",
|
|
"print(\"-----\")\n",
|
|
"unbekanntenvektor_numerisch = fm.unbekanntenvektor_numerisch(Jacobimatrix_symbolisch_liste_unbekannte, unbekanntenvektor_symbolisch, dx, unbekanntenvektor_numerisch_iteration0)\n",
|
|
"print(unbekanntenvektor_numerisch)"
|
|
],
|
|
"id": "80c2cf1889ea56c8",
|
|
"outputs": [],
|
|
"execution_count": null
|
|
},
|
|
{
|
|
"metadata": {},
|
|
"cell_type": "code",
|
|
"source": [
|
|
"# Datumsfestlegung: Bitte geben Sie nachfolgend die Koordinatenkomponenten an, die das Datum definieren sollen\n",
|
|
"\n",
|
|
"auswahl = [\n",
|
|
" (\"101\",\"X\"), (\"101\",\"Y\"), # Punkt 101 nur Lage\n",
|
|
" (\"205\",\"X\"), (\"205\",\"Y\"), (\"205\",\"Z\"), # Punkt 205 voll\n",
|
|
" (\"330\",\"Z\") # Punkt 330 nur Höhe\n",
|
|
"]\n",
|
|
"\n",
|
|
"aktive_unbekannte_indices = Datumsfestlegung.datumskomponenten(auswahl, liste_punktnummern)"
|
|
],
|
|
"id": "cd09dd5a716736b1",
|
|
"outputs": [],
|
|
"execution_count": null
|
|
}
|
|
],
|
|
"metadata": {
|
|
"kernelspec": {
|
|
"display_name": "Python 3",
|
|
"language": "python",
|
|
"name": "python3"
|
|
},
|
|
"language_info": {
|
|
"codemirror_mode": {
|
|
"name": "ipython",
|
|
"version": 2
|
|
},
|
|
"file_extension": ".py",
|
|
"mimetype": "text/x-python",
|
|
"name": "python",
|
|
"nbconvert_exporter": "python",
|
|
"pygments_lexer": "ipython2",
|
|
"version": "2.7.6"
|
|
}
|
|
},
|
|
"nbformat": 4,
|
|
"nbformat_minor": 5
|
|
}
|