Orientierung, Koordinatenberechnung mit Magnetfeldsensor, Gyro, Beschleunigung.

H

Hascrupor

Neues Mitglied
0
Hallo, ich hab nach Lage berechnung mit Hilfe von Sensoren gesucht leider nichts Hilfsreiches gefunden.
Vielleicht kennt sich jemand aus mit der Auswertung von Sensordaten. Also von 3D Beschleunigung, Gyro und Magnetfeldsensor bekomme ich folgende Werten. Allerdings weiß ich nicht wie ich daraus die LageKoordinaten im Raum, wo sich der Sensor gerade befindet, berechnen soll.
Für Ideen und Tips wäre ich sehr dankbar! :scared:

Die Daten vom Sensor sehen so aus:

Code:
Time-Date	Acc-X	Acc-Y	Acc-Z	Gyro-X	Gyro-Y	Gyro-Z	Mag-X	Mag-Y
0	-1,367	9,304	2,738	0,013	0,054	-0,079	15,423	-8,05
10	-1,48	9,342	2,754	0,016	0,05	-0,034	15,423	-8,05
20	-1,423	9,342	2,755	-0,004	0,064	-0,03	15,423	-7,837
30	-1,442	9,229	2,607	0,004	0,054	-0,007	15,423	-7,837
40	-1,461	9,455	2,622	0,004	0,063	0,049	15,806	-7,825
50	-1,461	9,53	2,696	-0,022	0,048	0,062	15,806	-7,825
60	-1,48	9,286	2,718	-0,021	0,062	0,068	15,614	-7,619
70	-1,48	9,173	2,906	-0,013	0,037	0,063	15,614	-7,619
80	-1,461	9,38	3,129	0,03	0,025	0,068	15,614	-7,831
90	-1,499	9,549	3,164	0,02	0,029	0,036	15,614	-7,831
100	-1,517	9,642	2,807	0,008	0,018	0,028	15,614	-7,619
110	-1,499	9,699	2,525	-0,035	-0,006	0,012	15,614	-7,619
120	-1,687	9,887	2,202	-0,105	-0,051	0,011	15,614	-7,831
130	-1,856	10,169	2,253	-0,188	-0,105	0,035	15,614	-7,831
140	-1,932	10,357	2,399	-0,188	-0,151	0,08	15,614	-7,619
150	-1,95	10,582	2,79	-0,317	-0,166	0,192	15,614	-7,619
160	-1,762	11,238	3,14	-0,311	-0,17	0,239	15,614	-7,619
170	-1,517	12,175	3,376	-0,311	-0,155	0,211	15,614	-7,619
180	-1,517	13,488	3,305	-0,311	-0,157	0,171	15,614	-7,619
190	-1,555	14,67	2,823	-0,383	-0,166	0,125	15,614	-7,619
 
Gyroskop brauchst du nicht, glaub ich.

float
[] R = new float [9] ;
float[] actual_orientation = new float [3] ;
SensorManager.getRotationMatrix(R,
null, accVals , magVals ) ;

SensorManager.getOrientation (R, actual_orientation ) ;

In actual_orientation stehen dann die Azimut, Pitch und Roll im Bogenmaß drin.
 
Danke für die schnelle Antwort, allerdings muss ich noch erwähnen dass der Bewegungssensor extern liegt und nicht im Smartphone selbst. Der Smartphone empfängt diese Daten.
Gibt es eine Möglichkeit in die Funktionen vom Sensormanager einzusehen?
 
Ich bekomme beim diesem Schritt "repo init -u https://android.googlesource.com/platform/manifest" diesen Fehler.

ubuntu-virtual-machine:~/WORKING_DIRECTORY$ repo init -u https://android.googlesource.com/platform/manifest
Traceback (most recent call last):
File "/home/ubuntu/bin/repo", line 695, in <module>
main(sys.argv[1:])
File "/home/ubuntu/bin/repo", line 662, in main
_Init(args)
File "/home/ubuntu/bin/repo", line 193, in _Init
_CheckGitVersion()
File "/home/ubuntu/bin/repo", line 218, in _CheckGitVersion
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
ubuntu@ubuntu-virtual-machine:~/WORKING_DIRECTORY$

kenne mich nicht gut aus mit Linux, gibt es den Sourcecode nicht als Zip irgendwo runterzuladen?
 

Ähnliche Themen

B
Antworten
4
Aufrufe
432
bb321
B
FabianDev
Antworten
5
Aufrufe
530
swa00
swa00
MES
Antworten
10
Aufrufe
787
MES
MES
Zurück
Oben Unten