Giter Club home page Giter Club logo

Comments (12)

dagouxiong233 avatar dagouxiong233 commented on June 8, 2024

In the latest version of the PX4 firmware, there have been changes to some parameters. The parameter FW_ARSP_MODE has been renamed to FW_USE_AIRSPD, and the CBRK_AIRSPD_CHK parameter has been replaced with SYS_HAS_NUM_ASPD. For operations without an airspeed sensor, you would set SYS_HAS_NUM_ASPD to 0. Similarly, if you do not wish to use the airspeed sensor data in the controller, you would set FW_USE_AIRSPD to 0​

from qgroundcontrol.

dagouxiong233 avatar dagouxiong233 commented on June 8, 2024

https://docs.px4.io/main/en/releases/main.html

from qgroundcontrol.

DonLakeFlyer avatar DonLakeFlyer commented on June 8, 2024

This is going to require version check on parameter access for forward/back compatibility

from qgroundcontrol.

sfuhrer avatar sfuhrer commented on June 8, 2024

QGC shouldn't have to worry about FW_USE_AIRSPD. What is the info you need to have in QGC, is it whether there is an airspeed sensor present on the vehicle that needs calibration? How do we do it for the other senors (accel, gyro, mag), do we just assume at least one of each is always present? SYS_HAS_NUM_ASPD could be used for that, but can we also consider relying on mavlink instead? Ideally there would be a message from the autopilot about which sensors are present (or, even better, which ones require calibration). For the meantime, there are already existing mavlink messages that can be checked to see if there is any airspeed sensor present at all, e.g. SCALED_PRESSURE has a differential pressure field, or the airspeed field of VFR_HUD.

from qgroundcontrol.

DonLakeFlyer avatar DonLakeFlyer commented on June 8, 2024

What is the info you need to have in QGC, is it whether there is an airspeed sensor present on the vehicle that needs calibration?

Correct.

For the meantime, there are already existing mavlink messages that can be checked to see if there is any airspeed sensor present at all, e.g. SCALED_PRESSURE has a differential pressure field, or the airspeed field of VFR_HUD.

But what happens if the airspeed sensor hasn't been calibrated yet. Will that still work?

from qgroundcontrol.

sfuhrer avatar sfuhrer commented on June 8, 2024

But what happens if the airspeed sensor hasn't been calibrated yet. Will that still work?

Currently yes, though we're working on enabling multi airspeed sensors which would then require an adapted workflow in QGC again.
@dagar have you already given this some thoughts?

@DonLakeFlyer what do you do for the Mag calibration in QGC to figure out when to display it as "mag needs calibration"?

from qgroundcontrol.

DenysZaytsev avatar DenysZaytsev commented on June 8, 2024

Hi guys,
I'm trying to build a bootloader and a firmware for Matek H743-WING v3 (using make matek_h743_bootloader and make matek_h743_default from the latest release 1.14). After I upload it to the FC, I see those messages in QGC
image
I tried to disable AirSpeed sensor by disabling parameters
image
and
image
I tried with VTOL and standard plane with no luck.

Due to this issue I can't calibrate AirFlow sensor - it just fails and I can't also disable it completely.
Also I can't Arm the vehicle, because preflight checks are not passed:
image
image
image
[16:49:07.451] Critical: Arming denied: Resolve system health failures first

Could you pls let me know how to fix the issue either without AirFlow sensor (I was up to use Matek ASPD4525) or to make that one work?
Thanks in advance.

from qgroundcontrol.

DonLakeFlyer avatar DonLakeFlyer commented on June 8, 2024

what do you do for the Mag calibration in QGC to figure out when to display it as "mag needs calibration"?

@sfuhrer

    _deviceIds = QStringList({QStringLiteral("CAL_GYRO0_ID"), QStringLiteral("CAL_ACC0_ID") });

const char* SensorsComponent::_airspeedBreakerParam =   "CBRK_AIRSPD_CHK";
const char* SensorsComponent::_airspeedDisabledParam =  "FW_ARSP_MODE";
const char* SensorsComponent::_airspeedCalParam =       "SENS_DPRES_OFF";

const char* SensorsComponent::_magEnabledParam =  "SYS_HAS_MAG";
const char* SensorsComponent::_magCalParam =  "CAL_MAG0_ID";

bool SensorsComponent::setupComplete(void) const
{
    foreach (const QString &triggerParam, _deviceIds) {
        if (_vehicle->parameterManager()->getParameter(FactSystem::defaultComponentId, triggerParam)->rawValue().toFloat() == 0.0f) {
            return false;
        }
    }
    bool magEnabled = true;
    if (_vehicle->parameterManager()->parameterExists(FactSystem::defaultComponentId, _magEnabledParam)) {
        magEnabled = _vehicle->parameterManager()->getParameter(FactSystem::defaultComponentId, _magEnabledParam)->rawValue().toBool();
    }

    if (magEnabled && _vehicle->parameterManager()->getParameter(FactSystem::defaultComponentId, _magCalParam)->rawValue().toFloat() == 0.0f) {
        return false;
    }

    if (_vehicle->fixedWing() || _vehicle->vtol() || _vehicle->airship()) {
        if (!_vehicle->parameterManager()->getParameter(FactSystem::defaultComponentId, _airspeedDisabledParam)->rawValue().toBool() &&
                _vehicle->parameterManager()->getParameter(FactSystem::defaultComponentId, _airspeedBreakerParam)->rawValue().toInt() != 162128 &&
                _vehicle->parameterManager()->getParameter(FactSystem::defaultComponentId, _airspeedCalParam)->rawValue().toFloat() == 0.0f) {
            return false;
        }
    }

    return true;
}

from qgroundcontrol.

DonLakeFlyer avatar DonLakeFlyer commented on June 8, 2024

@dagouxiong233 @sfuhrer Can you both review the changes in QGC to makes sure I have this version specific handling correct? Specifically these two methods:

  • bool SensorsComponent::_airspeedCalSupported (void) const
  • bool SensorsComponent::_airspeedCalRequired (void) const

from qgroundcontrol.

DonLakeFlyer avatar DonLakeFlyer commented on June 8, 2024

@DenysZaytsev Once CI finishes can you test this? You can pull the install artifacts from the GitHub Actions.

from qgroundcontrol.

DenysZaytsev avatar DenysZaytsev commented on June 8, 2024

@DenysZaytsev Once CI finishes can you test this? You can pull the install artifacts from the GitHub Actions.

Yes, I can test with Matek ASPD4525
So far I just compiled from release branch 1.14 (previously I was compiling from the main branch) and there are no errors in QGC (cause no changes yet been made in that release), but AirSpeed calibration still doesn't work, however at least I disabled it completely and now can arm.

from qgroundcontrol.

DonLakeFlyer avatar DonLakeFlyer commented on June 8, 2024

@DenysZaytsev Builds are ready. What OS do you use? I can point you to the install.

from qgroundcontrol.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.