Follow along with the video below to see how to install our site as a web app on your home screen.
Nota: This feature may not be available in some browsers.
#!/usr/bin/python
# Python script for naze32 multirotor mixers
#
#
#
######################################################################################################
import numpy as np
# The first two lines of the A matrix represent the coordinates of each rotor in the X,Y plane,
# and the third line the direction in which they spin.
# Super Spider Hex
# Motor : 1 2 3 4 5 6 Hexa X
A = np.array([[15, -14, 15, -14, 0, 0], # Y axis
[ -8, -11, 8, 11, -17, 17], # X axis
[ 1, 1, -1, -1, -1, 1]]) # Motor cw/ccw
# Moore-Penrose pseudoinverse of A
B = np.linalg.pinv(A)
# normalizing columns of B and transpose
B_normalized = (B.T / B.max(axis=0)[:, np.newaxis])
# scale and round to 1 to return final coefficients
coeffs = np.around(1*B_normalized,2)
# nicely output result as defines for copy-pasting
import string
print('')
print ('Mixer table HexaX')
print ('---------------------------------------------')
print('Motor: 1 2 3 4 5 6')
rows = ['PITCH ', 'ROLL ', 'YAW ']
for i, r in enumerate(rows):
#print coeffs[i]
print(r + '{' + string.join([format(c) for c in coeffs[i]], ', ') + '}')
print ('---------------------------------------------')
mixer custom
cmix 1 1 -0.58 0.92 0.9
cmix 2 1 -0.42 -1.0 0.89
cmix 3 1 0.42 1.0 -0.89
cmix 4 1 0.58 -0.92 -0.9
cmix 5 1 -1 0 -1
cmix 6 1 1 0 1
Thanks man. Probeer te helpen...had het toch beloofdyou are a wizard !!!!
Heb het net aangepast. Dus lees boven opnieuw mocht je het al gedaan hebben.thanks Boris eindelijk opgelost , morgen proberen![]()
Zijn wel verschillend uiteraard. De motoren hebben andere afstanden ten opzichte van cg gekregen.Zijn hier de settings dan nog verschillend voor de mini en de Uber hex? (ik zou zeggen van niet)
Ja bedoelde ook COT uiteraard@boris, erg cool, welke coordinaten heb ji gebruikt? Wil eens even vergelijken met een normale mini hex, kijken wat ik daaruit krijg, vind de referentie dan prettig.
En hoe heb je je cg bepaald? Moet dat niet niet centre of thrust zijn?
mixer custom
cmix 1 1 -0.42 1.07 0.9
cmix 2 1 -0.58 -1.0 0.89
cmix 3 1 0.42 1.07 -0.9
cmix 4 1 0.58 -1.00 -0.89
cmix 5 1 -1 0 -1
cmix 6 1 1 0 1
Leuke materie,
Paar checkvragen of ik het goed begrijp.
- kleine driehoek midden van frame is COT
- Rood Op de foto van boven/onder is Y waarden
- Groen Op de foto van links/rechts is X waarden
- Afstanden moeten op basis van COT berekend worden.
- Rechtsom draaiende motoren zijn -1
Als dat klopt zal ik de np.array eens berekenen
![]()
prima, deel je de np.array even? ben wel benieuwd wat dat geworden is.
# Super Spider Hex
# Motor : 1 2 3 4 5 6 Hexa X
A = np.array([[14, -15, -15, 14, 0, 0], # Y axis
[ -11, -8, 8, 11, -17, 17], # X axis
[ 1, 1, -1, -1, -1, 1]]) # Motor cw/ccw
Wiskunde jonguh!woei dit gaat me boven de pet
top notch boris.
A = np.array([[0.77,0.97,-0.77,-0.97,1.45,-1.45], # Y axis
[-1.15,1.23,-1.15,1.23,0,0], # X axis
[1,1,-1,-1,-1,1]]) # Motor cw/ccw