inav-configurator icon indicating copy to clipboard operation
inav-configurator copied to clipboard

magnetometer page does not represent correct mag direction

Open nick9one1 opened this issue 3 years ago • 1 comments

Current Behavior

When using the new Magnetmeter page to set the direction of a BN880 it is incorrect and 90 degrees out

Steps to Reproduce

  1. calibrate mag
  2. open magnetometer page and set the mag orientation visually (i.e. connector port is the same as it is on the quadcopter)
  3. calibrate mag
  4. go to setup page and point quadcopter north - the heading is 90 degrees out.

Expected behavior

mag should point to correct direction

Additional context

this is how I have the quadcoper physically built

FC is Matek F722-SE rotated 90 degrees so power cable face backwards on the quad BN880 connector is on the right hand side.

image

this configuration gives the correct Mag heading image

the Magnetometer page looks like this.. image

note it is from underneath but shows connector port pointing towards the quad, not to the right

if I use the slider to visually set the mag the same as my physical quad (connector on right) the mag heading is 90 degrees out. image


  • FC Board name and vendor: Matek F722SE
  • INAV version string: GCC-10.2.1 20201103 (release)

diff

version

INAV/MATEKF722SE 5.0.0 Jun 10 2022 / 09:32:45 (dfa9f6f6)

GCC-10.2.1 20201103 (release)

start the command batch

batch start

resources

mixer

mmix reset

mmix 0 1.000 1.000 1.000 1.000 mmix 1 1.000 -1.000 1.000 -1.000 mmix 2 1.000 1.000 -1.000 -1.000 mmix 3 1.000 -1.000 -1.000 1.000

servo mix

servo

safehome

logic

logic 0 1 -1 4 1 7 0 0 0 logic 1 1 -1 5 1 7 0 0 0 logic 2 1 -1 6 1 7 0 0 0 logic 3 1 0 25 0 1 0 0 0 logic 4 1 1 25 0 2 0 0 0 logic 5 1 2 25 0 3 0 0 0

gvar

pid

feature

feature GPS feature PWM_OUTPUT_ENABLE

beeper

beeper -RUNTIME_CALIBRATION beeper -HW_FAILURE beeper -RX_LOST beeper -RX_LOST_LANDING beeper -DISARMING beeper -ARMING beeper -ARMING_GPS_FIX beeper -GPS_STATUS beeper -RX_SET beeper -ACTION_SUCCESS beeper -ACTION_FAIL beeper -READY_BEEP beeper -MULTI_BEEPS beeper -DISARM_REPEAT beeper -ARMED beeper -SYSTEM_INIT beeper -ON_USB beeper -LAUNCH_MODE beeper -LAUNCH_MODE_LOW_THROTTLE beeper -LAUNCH_MODE_IDLE_START beeper -CAM_CONNECTION_OPEN beeper -CAM_CONNECTION_CLOSED

blackbox

blackbox -NAV_ACC blackbox -NAV_POS blackbox -NAV_PID blackbox MAG blackbox ACC blackbox ATTI blackbox RC_DATA blackbox RC_COMMAND blackbox MOTORS

map

serial

serial 0 2 115200 115200 0 115200 serial 3 4096 115200 115200 0 115200

led

color

mode_color

aux

aux 0 0 0 1700 2100 aux 1 1 1 900 1300 aux 2 2 1 1300 1700 aux 3 10 3 1700 2100 aux 4 28 3 1300 1700 aux 5 3 5 1300 1700 aux 6 13 4 1700 2100

adjrange

rxrange

temp_sensor

wp

#wp 0 invalid

osd_layout

osd_layout 0 1 12 0 H osd_layout 0 9 1 2 H osd_layout 0 11 2 2 V osd_layout 0 12 1 4 H osd_layout 0 14 22 1 V osd_layout 0 28 23 11 H osd_layout 0 32 12 0 V osd_layout 0 126 1 1 V

master

set looptime = 500 set gyro_main_lpf_hz = 85 set gyro_main_lpf_type = PT1 set dynamic_gyro_notch_q = 250 set dynamic_gyro_notch_min_hz = 90 set setpoint_kalman_q = 200 set gyro_zero_x = 5 set gyro_zero_y = 9 set gyro_zero_z = -15 set ins_gravity_cmss = 970.491 set acc_hardware = MPU6000 set acczero_x = 30 set acczero_y = -26 set acczero_z = -41 set accgain_x = 4064 set accgain_y = 4073 set accgain_z = 4043 set align_mag = CW90FLIP set mag_hardware = HMC5883 set magzero_x = 43 set magzero_y = -264 set magzero_z = 189 set maggain_x = 456 set maggain_y = 333 set maggain_z = 544 set baro_hardware = SPL06 set serialrx_provider = CRSF set blackbox_rate_denom = 2 set motor_pwm_protocol = DSHOT300 set failsafe_procedure = RTH set align_board_yaw = 900 set model_preview_type = 3 set applied_defaults = 2 set gps_sbas_mode = AUTO set airmode_type = THROTTLE_THRESHOLD set nav_rth_altitude = 1200 set i2c_speed = 800KHZ set debug_mode = GYRO set tz_automatic_dst = EU set vtx_power = 2 set vtx_frequency_group = FREQUENCYGROUP_1G3

profile

profile 1

set max_angle_inclination_rll = 450 set max_angle_inclination_pit = 450 set dterm_lpf_hz = 80 set mc_iterm_relax_cutoff = 10 set d_boost_min = 1.000 set d_boost_max = 1.000 set d_boost_max_at_acceleration = 5500.000 set d_boost_gyro_delta_lpf_hz = 70 set tpa_rate = 20 set tpa_breakpoint = 1200 set rc_expo = 75 set rc_yaw_expo = 75 set roll_rate = 70 set pitch_rate = 70 set yaw_rate = 60

battery_profile

battery_profile 1

set vbat_max_cell_voltage = 425 set vbat_min_cell_voltage = 300 set vbat_warning_cell_voltage = 340 set battery_capacity = 4000

end the command batch

batch end

nick9one1 avatar Aug 13 '22 10:08 nick9one1

Fixed in https://github.com/iNavFlight/inav-configurator/pull/1806

image

RomanLut avatar Jul 21 '23 19:07 RomanLut