Jump to content
View in the app

A better way to browse. Learn more.

Tinkerunity

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Geschrieben
  • Autor

@Plenz: Das neue Beispielprogramm tut was du möchtest, ziemlich sicher.

Ich darf dich korrigieren: das "ziemlich" kannst du streichen. :D Mit anderen Worten:

JAAAA!!! ES FUNKTIONIERT!!!

Ich habe keine Ahnung, wo der Fehler steckt(e), jedenfalls lag es an Zeile, in der das Programm auf den Tastendruck wartet. Wenn ich diese Zeile und ipcon.destroy() lösche, dann funktioniert das Programm. In meinem Programm benutze ich eine grafische Oberfläche mit QUIT-Button, der ipcon.destroy() auslöst, sowie eine Schleife root.mainloop().

 

Ich muss noch ergänzen: das Programm funktioniert so, wie ich will, das heißt, pitch und roll sind unabhängig von yaw. Umgekehrt wird jedoch yaw von pitch und roll beeinflusst. Das juckt mich zwar nicht, aber wer einen Kompass haben möchte, der dürfte immer noch ein Problem haben.

 

Ich habe auch keine Ahnung, warum meine Excel-Tabellen ein anderes Ergebnis brachten, ich hatte alle Formeln und Funktionsweisen genau übernommen.

 

Naja, Schwamm drüber. Und herzlichen Dank für deine Mühe! Wenn du schon einen halben Tag daran gebrütet hast, dann hätte ich das niemals im Leben auf die Reihe gekriegt...

 

 

 

  • Replies 51
  • Aufrufe 15,9k
  • Created
  • Letzte Antwort

Top Posters In This Topic

Posted Images

Geschrieben

Wieso, wer ein Kompass braucht kann die Werte für das Magnetfeld auslesen und entsprechend berechnen:

 


def CalcHeadingNoCompensation(x,y)
  
  headingRadians = Math.atan2(y, x)
  
  if headingRadians < 0
    headingRadians += 2 * Math::PI
  end  
    
  heading = headingRadians * 180 / Math::PI
  heading.round()
end

 

Funktioniert wunderbar und synchron mit meinem Yak (+/- 2°-3°, da ist akzeptabel). Aber Vorsicht, bei Roll und Pitch ändert sich das Heading, da

muss noch eine sw-seitige Kompensation rein, die braucht Roll und Pitch -

und die gibt es ja nun...

 

Gruss,

 

Dirk

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Gast
Reply to this topic...

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.