autotest: switch to full accel modelling in multicopter simulation
the new AHRS code should allow for centripetal compensation in multicopters
This commit is contained in:
parent
69e68783d3
commit
624fdda89c
@ -23,7 +23,7 @@ class Aircraft(object):
|
|||||||
self.position = Vector3(0, 0, 0) # m North, East, Down
|
self.position = Vector3(0, 0, 0) # m North, East, Down
|
||||||
self.mass = 0.0
|
self.mass = 0.0
|
||||||
self.update_frequency = 50 # in Hz
|
self.update_frequency = 50 # in Hz
|
||||||
self.gravity = 9.8 # m/s/s
|
self.gravity = 9.80665 # m/s/s
|
||||||
self.accelerometer = Vector3(0, 0, -self.gravity)
|
self.accelerometer = Vector3(0, 0, -self.gravity)
|
||||||
|
|
||||||
self.wind = util.Wind('0,0,0')
|
self.wind = util.Wind('0,0,0')
|
||||||
@ -47,9 +47,4 @@ class Aircraft(object):
|
|||||||
|
|
||||||
velocity_body = self.dcm.transposed() * self.velocity
|
velocity_body = self.dcm.transposed() * self.velocity
|
||||||
|
|
||||||
# force the acceleration to mostly be from gravity. We should be using 100% accel_body,
|
self.accelerometer = self.accel_body.copy()
|
||||||
# but right now that flies very badly as the AHRS system can't do centripetal correction
|
|
||||||
# for multicopters. This is a compromise until we get that sorted out
|
|
||||||
accel_true = self.accel_body
|
|
||||||
accel_fake = self.dcm.transposed() * Vector3(0, 0, -self.gravity)
|
|
||||||
self.accelerometer = (accel_true * 0.5) + (accel_fake * 0.5)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user