Jacobi Matrix numerisch. S, zw, und Richtung überprüfen

This commit is contained in:
2025-12-15 16:11:38 +01:00
parent 8e999c80cc
commit 68809a1319
9 changed files with 3561 additions and 3514 deletions

View File

@@ -4,7 +4,7 @@
<content url="file://$MODULE_DIR$"> <content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.venv" /> <excludeFolder url="file://$MODULE_DIR$/.venv" />
</content> </content>
<orderEntry type="jdk" jdkName="Python 3.14 (Masterprojekt)" jdkType="Python SDK" /> <orderEntry type="jdk" jdkName="Python 3.14" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
</component> </component>
</module> </module>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="dataSourceStorageLocal" created-in="PY-252.28238.29"> <component name="dataSourceStorageLocal" created-in="PY-252.27397.106">
<data-source name="Campusnetz.db" uuid="c385b2f5-c801-4154-bc11-62182a8396b3"> <data-source name="Campusnetz.db" uuid="c385b2f5-c801-4154-bc11-62182a8396b3">
<database-info product="SQLite" version="3.45.1" jdbc-version="4.2" driver-name="SQLite JDBC" driver-version="3.45.1.0" dbms="SQLITE" exact-version="3.45.1" exact-driver-version="3.45"> <database-info product="SQLite" version="3.45.1" jdbc-version="4.2" driver-name="SQLite JDBC" driver-version="3.45.1.0" dbms="SQLITE" exact-version="3.45.1" exact-driver-version="3.45">
<identifier-quote-string>&quot;</identifier-quote-string> <identifier-quote-string>&quot;</identifier-quote-string>
@@ -14,5 +14,18 @@
</introspection-scope> </introspection-scope>
</schema-mapping> </schema-mapping>
</data-source> </data-source>
<data-source name="Campusnetz.db [2]" uuid="1e70ba7f-d1a3-44cb-96d4-ec35638383ed">
<database-info product="SQLite" version="3.45.1" jdbc-version="4.2" driver-name="SQLite JDBC" driver-version="3.45.1.0" dbms="SQLITE" exact-version="3.45.1" exact-driver-version="3.45">
<identifier-quote-string>&quot;</identifier-quote-string>
</database-info>
<case-sensitivity plain-identifiers="mixed" quoted-identifiers="mixed" />
<secret-storage>master_key</secret-storage>
<auth-provider>no-auth</auth-provider>
<schema-mapping>
<introspection-scope>
<node kind="schema" qname="@" />
</introspection-scope>
</schema-mapping>
</data-source>
</component> </component>
</project> </project>

7
.idea/dataSources.xml generated
View File

@@ -8,5 +8,12 @@
<jdbc-url>jdbc:sqlite:$PROJECT_DIR$/Campusnetz.db</jdbc-url> <jdbc-url>jdbc:sqlite:$PROJECT_DIR$/Campusnetz.db</jdbc-url>
<working-dir>$ProjectFileDir$</working-dir> <working-dir>$ProjectFileDir$</working-dir>
</data-source> </data-source>
<data-source source="LOCAL" name="Campusnetz.db [2]" uuid="1e70ba7f-d1a3-44cb-96d4-ec35638383ed">
<driver-ref>sqlite.xerial</driver-ref>
<synchronize>true</synchronize>
<jdbc-driver>org.sqlite.JDBC</jdbc-driver>
<jdbc-url>jdbc:sqlite:$PROJECT_DIR$/Campusnetz.db</jdbc-url>
<working-dir>$ProjectFileDir$</working-dir>
</data-source>
</component> </component>
</project> </project>

2
.idea/misc.xml generated
View File

@@ -3,5 +3,5 @@
<component name="Black"> <component name="Black">
<option name="sdkName" value="Python 3.14" /> <option name="sdkName" value="Python 3.14" />
</component> </component>
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.14 (Masterprojekt)" project-jdk-type="Python SDK" /> <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.14" project-jdk-type="Python SDK" />
</project> </project>

View File

@@ -319,14 +319,23 @@
"importlib.reload(Funktionales_Modell)\n", "importlib.reload(Funktionales_Modell)\n",
"fm = Funktionales_Modell.FunktionalesModell(pfad_datenbank, a, b)\n", "fm = Funktionales_Modell.FunktionalesModell(pfad_datenbank, a, b)\n",
"\n", "\n",
"\n",
"\n",
"\n",
"fm.jacobi_matrix_zahlen_iteration_0(Jacobimatrix_symbolisch, \"naeherung_us\", Jacobimatrix_symbolisch_liste_unbekannte, Jacobimatrix_symbolisch_liste_zeilenbeschriftungen)" "fm.jacobi_matrix_zahlen_iteration_0(Jacobimatrix_symbolisch, \"naeherung_us\", Jacobimatrix_symbolisch_liste_unbekannte, Jacobimatrix_symbolisch_liste_zeilenbeschriftungen)"
], ],
"id": "dba5ecd0354bbc48", "id": "dba5ecd0354bbc48",
"outputs": [], "outputs": [],
"execution_count": null "execution_count": null
},
{
"metadata": {},
"cell_type": "code",
"source": [
"importlib.reload(Datenbank)\n",
"db_zugriff = Datenbank.Datenbankzugriff(pfad_datenbank)\n",
"db_zugriff.get_beobachtungen_from_beobachtungenid()"
],
"id": "8a8fce6ee4dc1f0f",
"outputs": [],
"execution_count": null
} }
], ],
"metadata": { "metadata": {

View File

@@ -132,3 +132,11 @@ class Datenbankzugriff:
cursor.close() cursor.close()
con.close() con.close()
return liste_beobachtungen return liste_beobachtungen
def get_beobachtungen_from_beobachtungenid(self):
con = sqlite3.connect(self.pfad_datenbank)
cursor = con.cursor()
liste_beobachtungen = cursor.execute(f"SELECT punktnummer_sp, punktnummer_zp, beobachtungenID, tachymeter_richtung, tachymeter_zenitwinkel, tachymeter_distanz FROM Beobachtungen").fetchall()
cursor.close()
con.close()
return liste_beobachtungen

View File

@@ -63,9 +63,9 @@ class FunktionalesModell:
X_sp, Y_sp, Z_sp = dict_punkt_symbole[standpunkt] X_sp, Y_sp, Z_sp = dict_punkt_symbole[standpunkt]
X_zp, Y_zp, Z_zp = dict_punkt_symbole[zielpunkt] X_zp, Y_zp, Z_zp = dict_punkt_symbole[zielpunkt]
B_sp, L_sp = sp.symbols(f"B{standpunkt} L{standpunkt}") B_sp, L_sp = sp.symbols(f"B{standpunkt} L{standpunkt}")
alpha = sp.symbols(f"alpha{standpunkt}_{zielpunkt}") alpha = sp.symbols(f"{beobachtungenID}_alpha{standpunkt}_{zielpunkt}")
zw = sp.symbols(f"zw{standpunkt}_{zielpunkt}") zw = sp.symbols(f"{beobachtungenID}_zw{standpunkt}_{zielpunkt}")
s = sp.symbols(f"s{standpunkt}_{zielpunkt}") s = sp.symbols(f"{beobachtungenID}_s{standpunkt}_{zielpunkt}")
if beobachtungsart == "tachymeter_distanz": if beobachtungsart == "tachymeter_distanz":
beobachtungsgleichung = sp.sqrt( beobachtungsgleichung = sp.sqrt(
@@ -166,7 +166,7 @@ class FunktionalesModell:
if koordinatenart == "naeherung_us": if koordinatenart == "naeherung_us":
db_zugriff = Datenbankzugriff(self.pfad_datenbank) db_zugriff = Datenbankzugriff(self.pfad_datenbank)
dict_koordinaten_B_L = self.berechnungen.geometrische_breite_laenge(db_zugriff.get_koordinaten(koordinatenart)) dict_koordinaten_B_L = self.berechnungen.geometrische_breite_laenge(db_zugriff.get_koordinaten(koordinatenart))
liste_beobachtungen = db_zugriff.get_beobachtungen_from_beobachtungenid()
substitutionen = {} substitutionen = {}
for punktnummer, vektor in dict_koordinaten_B_L.items(): for punktnummer, vektor in dict_koordinaten_B_L.items():
@@ -178,6 +178,16 @@ class FunktionalesModell:
substitutionen[B_sym] = vektor[1] substitutionen[B_sym] = vektor[1]
substitutionen[L_Sym] = vektor[2] substitutionen[L_Sym] = vektor[2]
for standpunkt, zielpunkt, beobachtungenID, tachymeter_richtung, tachymeter_zenitwinkel, tachymeter_distanz in liste_beobachtungen:
alpha = sp.symbols(f"{beobachtungenID}_alpha{standpunkt}_{zielpunkt}")
zw = sp.symbols(f"{beobachtungenID}_zw{standpunkt}_{zielpunkt}")
s = sp.symbols(f"{beobachtungenID}_s{standpunkt}_{zielpunkt}")
substitutionen[alpha] = tachymeter_richtung
substitutionen[zw] = tachymeter_zenitwinkel
substitutionen[s] = tachymeter_distanz
A_numerisch = A_symbolisch.xreplace(substitutionen) A_numerisch = A_symbolisch.xreplace(substitutionen)
Export.matrix_to_csv(r"Zwischenergebnisse\Jacobi_Matrix_Numerisch_Iteration0.csv", liste_unbekannte, Export.matrix_to_csv(r"Zwischenergebnisse\Jacobi_Matrix_Numerisch_Iteration0.csv", liste_unbekannte,

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff