Why is LocationLocal: Relative Alt dropping into negative values on a stationary drone?












0















I'm running the Set_Attitude_Target example on an Intel Aero with Ardupilot. The code is working as intended but on top of a clear sensor error, that becomes more evident the longer I run the experiment.



In short, the altitude report from the example is reporting that in LocationLocal there is a relative altitude of -0.01, which gets smaller and smaller the longer the drone stays on.



If the drone takes off, say, 1 meter, then the relative altitude is less than that, so the difference is being taken out.



I ran the same example with the throttle set to a low value so the drone would stay stationary while "trying to take off" with insufficient thrust. For the 5 seconds that the drone was trying to take off, as well as after it gave up, disarmed and continued to run the code, the console read incremental losses to altitude, until I stopped it at -1 meter.



Where is this sensor error coming from and how do I remedy it?










share|improve this question























  • For my case barometric sensor is only reliable when the altitude is >5m below that the value will be not accurate. Maybe you can use more reliable flight controller woth better barometric sensor or use Lidar/Sonar instead.

    – Agustinus Baskara
    Nov 29 '18 at 2:49











  • Yeah, my idea was to switch over to another sensor, but keep the code. It's a shame I can't use the built-in, but I'm glad you agree. Thank you.

    – Viktor Zafirovski
    Nov 29 '18 at 10:10











  • Please mark this question as solved if you think you found the answer

    – Agustinus Baskara
    Nov 30 '18 at 5:28











  • To be honest, I don't. There must be a way to prevent the sensor from moving into negative values when the drone is standing still. I'll mark it anyways.

    – Viktor Zafirovski
    Nov 30 '18 at 11:56
















0















I'm running the Set_Attitude_Target example on an Intel Aero with Ardupilot. The code is working as intended but on top of a clear sensor error, that becomes more evident the longer I run the experiment.



In short, the altitude report from the example is reporting that in LocationLocal there is a relative altitude of -0.01, which gets smaller and smaller the longer the drone stays on.



If the drone takes off, say, 1 meter, then the relative altitude is less than that, so the difference is being taken out.



I ran the same example with the throttle set to a low value so the drone would stay stationary while "trying to take off" with insufficient thrust. For the 5 seconds that the drone was trying to take off, as well as after it gave up, disarmed and continued to run the code, the console read incremental losses to altitude, until I stopped it at -1 meter.



Where is this sensor error coming from and how do I remedy it?










share|improve this question























  • For my case barometric sensor is only reliable when the altitude is >5m below that the value will be not accurate. Maybe you can use more reliable flight controller woth better barometric sensor or use Lidar/Sonar instead.

    – Agustinus Baskara
    Nov 29 '18 at 2:49











  • Yeah, my idea was to switch over to another sensor, but keep the code. It's a shame I can't use the built-in, but I'm glad you agree. Thank you.

    – Viktor Zafirovski
    Nov 29 '18 at 10:10











  • Please mark this question as solved if you think you found the answer

    – Agustinus Baskara
    Nov 30 '18 at 5:28











  • To be honest, I don't. There must be a way to prevent the sensor from moving into negative values when the drone is standing still. I'll mark it anyways.

    – Viktor Zafirovski
    Nov 30 '18 at 11:56














0












0








0








I'm running the Set_Attitude_Target example on an Intel Aero with Ardupilot. The code is working as intended but on top of a clear sensor error, that becomes more evident the longer I run the experiment.



In short, the altitude report from the example is reporting that in LocationLocal there is a relative altitude of -0.01, which gets smaller and smaller the longer the drone stays on.



If the drone takes off, say, 1 meter, then the relative altitude is less than that, so the difference is being taken out.



I ran the same example with the throttle set to a low value so the drone would stay stationary while "trying to take off" with insufficient thrust. For the 5 seconds that the drone was trying to take off, as well as after it gave up, disarmed and continued to run the code, the console read incremental losses to altitude, until I stopped it at -1 meter.



Where is this sensor error coming from and how do I remedy it?










share|improve this question














I'm running the Set_Attitude_Target example on an Intel Aero with Ardupilot. The code is working as intended but on top of a clear sensor error, that becomes more evident the longer I run the experiment.



In short, the altitude report from the example is reporting that in LocationLocal there is a relative altitude of -0.01, which gets smaller and smaller the longer the drone stays on.



If the drone takes off, say, 1 meter, then the relative altitude is less than that, so the difference is being taken out.



I ran the same example with the throttle set to a low value so the drone would stay stationary while "trying to take off" with insufficient thrust. For the 5 seconds that the drone was trying to take off, as well as after it gave up, disarmed and continued to run the code, the console read incremental losses to altitude, until I stopped it at -1 meter.



Where is this sensor error coming from and how do I remedy it?







dronekit-python






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 28 '18 at 15:25









Viktor ZafirovskiViktor Zafirovski

11




11













  • For my case barometric sensor is only reliable when the altitude is >5m below that the value will be not accurate. Maybe you can use more reliable flight controller woth better barometric sensor or use Lidar/Sonar instead.

    – Agustinus Baskara
    Nov 29 '18 at 2:49











  • Yeah, my idea was to switch over to another sensor, but keep the code. It's a shame I can't use the built-in, but I'm glad you agree. Thank you.

    – Viktor Zafirovski
    Nov 29 '18 at 10:10











  • Please mark this question as solved if you think you found the answer

    – Agustinus Baskara
    Nov 30 '18 at 5:28











  • To be honest, I don't. There must be a way to prevent the sensor from moving into negative values when the drone is standing still. I'll mark it anyways.

    – Viktor Zafirovski
    Nov 30 '18 at 11:56



















  • For my case barometric sensor is only reliable when the altitude is >5m below that the value will be not accurate. Maybe you can use more reliable flight controller woth better barometric sensor or use Lidar/Sonar instead.

    – Agustinus Baskara
    Nov 29 '18 at 2:49











  • Yeah, my idea was to switch over to another sensor, but keep the code. It's a shame I can't use the built-in, but I'm glad you agree. Thank you.

    – Viktor Zafirovski
    Nov 29 '18 at 10:10











  • Please mark this question as solved if you think you found the answer

    – Agustinus Baskara
    Nov 30 '18 at 5:28











  • To be honest, I don't. There must be a way to prevent the sensor from moving into negative values when the drone is standing still. I'll mark it anyways.

    – Viktor Zafirovski
    Nov 30 '18 at 11:56

















For my case barometric sensor is only reliable when the altitude is >5m below that the value will be not accurate. Maybe you can use more reliable flight controller woth better barometric sensor or use Lidar/Sonar instead.

– Agustinus Baskara
Nov 29 '18 at 2:49





For my case barometric sensor is only reliable when the altitude is >5m below that the value will be not accurate. Maybe you can use more reliable flight controller woth better barometric sensor or use Lidar/Sonar instead.

– Agustinus Baskara
Nov 29 '18 at 2:49













Yeah, my idea was to switch over to another sensor, but keep the code. It's a shame I can't use the built-in, but I'm glad you agree. Thank you.

– Viktor Zafirovski
Nov 29 '18 at 10:10





Yeah, my idea was to switch over to another sensor, but keep the code. It's a shame I can't use the built-in, but I'm glad you agree. Thank you.

– Viktor Zafirovski
Nov 29 '18 at 10:10













Please mark this question as solved if you think you found the answer

– Agustinus Baskara
Nov 30 '18 at 5:28





Please mark this question as solved if you think you found the answer

– Agustinus Baskara
Nov 30 '18 at 5:28













To be honest, I don't. There must be a way to prevent the sensor from moving into negative values when the drone is standing still. I'll mark it anyways.

– Viktor Zafirovski
Nov 30 '18 at 11:56





To be honest, I don't. There must be a way to prevent the sensor from moving into negative values when the drone is standing still. I'll mark it anyways.

– Viktor Zafirovski
Nov 30 '18 at 11:56












1 Answer
1






active

oldest

votes


















0














As per Agustinus Baskara's comment on the original post, it would appear the built-in sensor is simply that bad - it can't be improved upon with software.






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53522828%2fwhy-is-locationlocal-relative-alt-dropping-into-negative-values-on-a-stationary%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    As per Agustinus Baskara's comment on the original post, it would appear the built-in sensor is simply that bad - it can't be improved upon with software.






    share|improve this answer




























      0














      As per Agustinus Baskara's comment on the original post, it would appear the built-in sensor is simply that bad - it can't be improved upon with software.






      share|improve this answer


























        0












        0








        0







        As per Agustinus Baskara's comment on the original post, it would appear the built-in sensor is simply that bad - it can't be improved upon with software.






        share|improve this answer













        As per Agustinus Baskara's comment on the original post, it would appear the built-in sensor is simply that bad - it can't be improved upon with software.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 30 '18 at 11:56









        Viktor ZafirovskiViktor Zafirovski

        11




        11
































            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53522828%2fwhy-is-locationlocal-relative-alt-dropping-into-negative-values-on-a-stationary%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Contact image not getting when fetch all contact list from iPhone by CNContact

            count number of partitions of a set with n elements into k subsets

            A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks