ModalAI Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    GPS not working

    Sentinel
    7
    49
    4869
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Eric KatzfeyE
      Eric Katzfey ModalAI Team @Andre Moura
      last edited by

      @andremoura Yes, the errors related to px4io detection are expected since you do not have a px4io unit attached to the drone. And yes, you have to interact with things on the DSP (where the GPS driver runs) with qshell as you already figured out. Do you have any other Sentinel drones that you can compare against? Or other types of drones with GPS to compare against? When you are able to get 9 to 12 satellites what does qshell gps status show? It does appear to be wired up correctly as sometimes it is obviously communicating with the GPS unit.

      A 1 Reply Last reply Reply Quote 0
      • Eric KatzfeyE
        Eric Katzfey ModalAI Team @Andre Moura
        last edited by Eric Katzfey

        @andremoura It looks like there are at least 2 different issues here. One is that when you do see it working it has poor performance and doesn't get a lock. That is why I wanted to compare against other drones or other GPS units. If other units are working fine and this one isn't then maybe it's a faulty unit. If they all have poor performance then maybe it's something about the test location.

        A 1 Reply Last reply Reply Quote 0
        • Eric KatzfeyE
          Eric Katzfey ModalAI Team @Andre Moura
          last edited by

          @andremoura The other issue appears to be that you don't always get the driver to communicate with the GPS unit on startup. The start line in /etc/modalai/voxl-px4.config is qshell gps start -d 7 -b 115200. When you did qshell gps stop and then qshell gps start was it started with qshell gps start -d 7 -b 115200 or just qshell gps start?

          A 1 Reply Last reply Reply Quote 0
          • A
            Andre Moura @Eric Katzfey
            last edited by

            @Eric-Katzfey We don't have any other Sentinel drones. We have other drones with GPS, that detect at least the same or higher number of satellites but they all are able to GPS lock.

            When we had that number of satellites, the qshell gps status seemed ok with number of satellites, latitude and longitude, but we aren't able to replicate that test right now because of bad weather conditions.

            1 Reply Last reply Reply Quote 0
            • A
              Andre Moura @Eric Katzfey
              last edited by

              @Eric-Katzfey I will test the Sentinel drone on a new better location next week, if weather gets better, and I will get back to you.

              1 Reply Last reply Reply Quote 0
              • A
                Andre Moura @Eric Katzfey
                last edited by

                @Eric-Katzfey GPS mostly hasn't beeen working on startup again.

                We started it with qshell gps start, but we also tested qshell gps start -d 7 -b 115200. Both commands only worked a few times, we are not able to consistently start the GPS, having to stop and start again the service a few times before it works.

                Eric KatzfeyE 1 Reply Last reply Reply Quote 0
                • Eric KatzfeyE
                  Eric Katzfey ModalAI Team @Andre Moura
                  last edited by

                  @andremoura Is the LED on top of the unit (multicolor LED) coming on?

                  A 1 Reply Last reply Reply Quote 0
                  • A
                    Andre Moura @Eric Katzfey
                    last edited by Andre Moura

                    @Eric-Katzfey said in GPS not working:

                    @andremoura Is the LED on top of the unit (multicolor LED) coming on?

                    Yes, every time voxl-px4 is running.

                    Eric KatzfeyE 1 Reply Last reply Reply Quote 0
                    • Eric KatzfeyE
                      Eric Katzfey ModalAI Team @Andre Moura
                      last edited by

                      @andremoura Okay, good. Holybro changed some of the components in their unit at one point and if that LED wasn't coming on it could indicate that it was one of the older units. But since it is on that indicates to me that it is the correct version of the Holybro unit.

                      1 Reply Last reply Reply Quote 0
                      • A
                        Andre Moura
                        last edited by

                        @Eric-Katzfey Ok, new find! It seems that when voxl-px4 runs, the GPS service isn't able to start immediately, but if we wait a for a bit and start it manually, it works.

                        Seems like something isn't ready to start immediately after voxl-px4.

                        Eric KatzfeyE 1 Reply Last reply Reply Quote 0
                        • Eric KatzfeyE
                          Eric Katzfey ModalAI Team @Andre Moura
                          last edited by

                          @andremoura Interesting! Okay, how do you accomplish that? Do you mean you are stopping the service and then starting voxl-px4 later manually or you are leaving voxl-px4 service enabled but commenting out the gps start line in /etc/modalai/voxl-px4.config?

                          A 1 Reply Last reply Reply Quote 0
                          • A
                            Andre Moura @Eric Katzfey
                            last edited by

                            @Eric-Katzfey We are stopping the GPS service manually (qshell gps stop) and then starting it later manually (qshell gps start), not the voxl-px4.

                            Do you want us to do the same test with commenting the gps start line in /etc/modalai/voxl-px4.config?

                            Eric KatzfeyE 1 Reply Last reply Reply Quote 0
                            • Eric KatzfeyE
                              Eric Katzfey ModalAI Team @Andre Moura
                              last edited by

                              @andremoura Actually, can you try removing the -d 7 -b 115200 from the gps start line in /etc/modalai/voxl-px4.config and see if that changes anything? Thanks for trying all this stuff out!

                              A 2 Replies Last reply Reply Quote 0
                              • A
                                Andre Moura @Eric Katzfey
                                last edited by

                                @Eric-Katzfey Hello, today I tested removing -d 7 -b 115200 from /etc/modalai/voxl-px4.config and it seems like the GPS service is working correctly on startup. I'm still going to test if I can get more fixed satellites and GPS lock on a new location with more open space and then get back to this post with more information.

                                D 1 Reply Last reply Reply Quote 0
                                • A
                                  Andre Moura @Eric Katzfey
                                  last edited by

                                  @Eric-Katzfey On the new location, we were able to get GPS lock after fixing 12 satellites, which allowed for take-off. During flight we reached 19 satellites at one point. Getting GPS lock with this sensor is a bit challenging, our previous location didn't have that many obstructions, but everything seems to be working.

                                  Eric KatzfeyE 1 Reply Last reply Reply Quote 0
                                  • Eric KatzfeyE
                                    Eric Katzfey ModalAI Team @Andre Moura
                                    last edited by

                                    @Andre-Moura Thanks for all of the testing! We really appreciate it, this is all great feedback! It seems that Holybro may have changed the default configuration of the units and that could be why it wasn't coming up properly.

                                    1 Reply Last reply Reply Quote 1
                                    • D
                                      daniel @Andre Moura
                                      last edited by

                                      @Andre-Moura We have same issue here but we try to remove -d 7 -b 115200 from /etc/modalai/voxl-px4.config is still not working. Did you modify thr code like this?
                                      efbb3413-b105-4c9e-9c2e-0f2349389742-image.png

                                      Removing the 115200 baud rate is still not see GPS log.
                                      ad127a05-5515-4a8f-9e1b-af96fd7a9625-image.png

                                      A 1 Reply Last reply Reply Quote 0
                                      • A
                                        Andre Moura @daniel
                                        last edited by

                                        @daniel I think that's all I did, but here is my /etc/modalai/voxl-px4.config, in case you want to look for any differences:

                                        #!/bin/sh
                                        # PX4 commands need the 'px4-' prefix in bash.
                                        # (px4-alias.sh is expected to be in the PATH)
                                        . px4-alias.sh
                                        
                                        # Figure out what platform we are running on.
                                        
                                        # Eventually there will be a utility called voxl-platform that will
                                        # return the platform tag or an error code. This utility is not yet
                                        # ubiquitous so it may be that it isn't available. Trying to call a
                                        # non existent program will generate an error code by the OS. If the
                                        # program exists and doesn't return an error code then use the results.
                                        PLATFORM=`/usr/bin/voxl-platform 2> /dev/null`
                                        RETURNCODE=$?
                                        if [ $RETURNCODE -ne 0 ]; then
                                            # If we couldn't get the platform from the voxl-platform utility then check
                                            # /etc/version to see if there is an M0052 substring in the version string. If so,
                                            # then we assume that we are on M0052. Otherwise assume M0054.
                                            VERSIONSTRING=$(</etc/version)
                                            M0052SUBSTRING="M0052"
                                            if [[ "$VERSIONSTRING" == *"$M0052SUBSTRING"* ]]; then
                                                PLATFORM="M0052"
                                            else
                                                PLATFORM="M0054"
                                            fi
                                        fi
                                        
                                        # We can only run on M0052 or M0054 so exit with error if that is not the case
                                        if [ $PLATFORM = "M0052" ]; then
                                            /bin/echo "Running on M0052"
                                            if [ "$RC" == "CRSF" ]; then
                                                /bin/echo "Error, crossfire not supported on M0052!"
                                                exit 0
                                            fi
                                        elif [ $PLATFORM = "M0054" ]; then
                                            /bin/echo "Running on M0054"
                                        else
                                            /bin/echo "Error, cannot determine platform!"
                                            exit 0
                                        fi
                                        
                                        uorb start
                                        muorb start
                                        
                                        # In order to just exit after starting the uorb / muorb modules define
                                        # the environment variable MINIMAL_PX4. (e.g. export MINIMAL_PX4=1)
                                        # This is useful for testing / debug where you may want to start drivers
                                        # and modules manually from the px4 command shell
                                        if [ ! -z $MINIMAL_PX4 ]; then
                                            /bin/echo "Running minimal script"
                                            exit 0
                                        fi
                                        
                                        # Sleep a little here. A lot happens when the uorb and muorb start
                                        # and we need to make sure that it all completes successfully to avoid
                                        # any possible race conditions.
                                        /bin/sleep 1
                                        
                                        # IMU (accelerometer / gyroscope)
                                        # Start this first because it gets the high rate interrupts coming in to the
                                        # DSP. Without this the DSP will oversleep and miss critical timeouts.
                                        # TODO: Why is that the case?
                                        if [ "$IMU" == "ROTATE_IMU_YAW_180" ]; then
                                            /bin/echo "Starting IMU driver with yaw 180 rotation"
                                            qshell icm42688p start -s -R 4
                                        else
                                            qshell icm42688p start -s
                                        fi
                                        
                                        /bin/sleep 1
                                        
                                        # Load in all of the parameters that have been saved in the file
                                        param load
                                        
                                        # Start logging and use timestamps for log files when possible.
                                        # Add the "-e" option to start logging immediately. Default is
                                        # to log only when armed
                                        logger start -t
                                        
                                        # We do not change the value of SYS_AUTOCONFIG but if it does not
                                        # show up as used then it is not reported to QGC and we get a
                                        # missing parameter error.
                                        param touch SYS_AUTOCONFIG
                                        
                                        # Start all of the device drivers on DSP
                                        
                                        # Magnetometer
                                        if [ "$GPS" == "MATEK" ]; then
                                            # Use this line for the magnetometer in the Matek Systems M8Q-5883 module
                                            /bin/echo "Starting Mateksys M8Q-5883 magnetometer"
                                            qshell qmc5883l start -R 10 -X -b 1
                                        elif [ "$GPS" == "HERE3" ]; then
                                            # Use this line for the magnetometer in the Here3 GPS module
                                            /bin/echo "Starting Here3 ak09916 magnetometer"
                                            qshell ak09916 start -R 2 -X
                                        else
                                            # Use this line for the magnetometer in the Holybro GPS module
                                            /bin/echo "Starting Holybro magnetometer"
                                            qshell ist8310 start -R 10 -X -b 1
                                        fi
                                        
                                        # LED driver for the Pixhawk 4 GPS module
                                        # Older units have i2c address 0x39 (57) and newer ones 0x38 (56)
                                        # M0054 only supports the newer one. M0052 can support either.
                                        if [ $PLATFORM = "M0052" ]; then
                                            qshell rgbled_ncp5623c start -X -b 1 -f 400 -a 57
                                        fi
                                        if [ "$GPS" == "HOLYBRO" ]; then
                                            /bin/echo "Starting Holybro LED driver"
                                            qshell rgbled_ncp5623c start -X -b 1 -f 400 -a 56
                                        elif [ "$GPS" == "HERE3" ]; then
                                            # Use this line for the Here3 GPS module LED controller
                                            /bin/echo "Starting Here3 LED"
                                            qshell rgbled start -X -f 400
                                        fi
                                        
                                        # Barometer
                                        qshell icp10100 start -I -b 5
                                        
                                        # ESC driver
                                        # We start this even if there is a PX4IO module. If there is
                                        # a PX4IO (M0065) module it will be plugged into the RC port
                                        # and so this driver will output commands on an empty port.
                                        qshell modalai_esc start
                                        qshell mixer load /dev/uart_esc quad_x.main.mix
                                        
                                        # APM power monitor
                                        qshell voxlpm start -X -b 2
                                        
                                        # On M0052 the GPS and RC drivers run on the apps processor
                                        if [ $PLATFORM = "M0052" ]; then
                                            # Pixhawk 4 GPS module
                                            gps start -d /dev/ttyHS2
                                        
                                            # RC input may be coming via either an external M0065 (aka px4io) module
                                            # or a directly attached Spektrum receiver. First see if the M0065 is detected.
                                            px4io detect
                                            PX4IO_STATUS=$?
                                            /bin/echo "PX4IO detect returned value $PX4IO_STATUS"
                                            if [ $PX4IO_STATUS -eq 0 ]; then
                                                /bin/echo "Found M0065, starting px4io"
                                                # On M0052 px4io only supports RC input, not PWM output
                                                px4io start
                                            else
                                                /bin/echo "M0065 not detected, starting Spektrum RC driver"
                                                spektrum_rc start -d /dev/ttyHS1
                                            fi
                                        # On M0054 the GPS and RC drivers run on SLPI DSP
                                        else
                                            if [ "$GPS" == "MATEK" ]; then
                                                # Use this gps start line instead for Matek Systems M8Q-5883 module
                                                /bin/echo "Starting Mateksys M8Q-5883 GPS"
                                                qshell gps start
                                            elif [ "$GPS" == "HERE3" ]; then
                                                # Use this line for the Here3 GPS module
                                                /bin/echo "Starting Here3 GPS"
                                                qshell gps start
                                            else
                                                # Only the newer Holybro unit is supported on M0054
                                                /bin/echo "Starting Holybro GPS"
                                                qshell gps start
                                            fi
                                        
                                            # If RC is TBS Crossfire then start its driver.
                                            # Otherwise, it could be either a directly connected Spektrum receiver
                                            # or an external M0065 (aka px4io) module.
                                            if [ "$RC" == "CRSF_MAV" ]; then
                                                /bin/echo "Starting TBS crossfire RC - MAV Mode"
                                                qshell tbs_crossfire start -m -p 7 -b 115200
                                            elif [ "$RC" == "CRSF_RAW" ]; then
                                                /bin/echo "Starting TBS crossfire RC - CRSF Mode"
                                                qshell tbs_crossfire start -c -p 7 -b 250000
                                            else
                                                qshell px4io detect
                                                PX4IO_STATUS=$?
                                                if [ $PX4IO_STATUS -eq 0 ]; then
                                                    /bin/echo "Found M0065, starting px4io"
                                                    # On M0054 we also support PWM output from M0065 (aka PX4IO)
                                                    # If there are no pwm escs then that connector will be empty.
                                                    qshell px4io start
                                                    qshell px4io recovery
                                                    qshell mixer load /dev/px4io quad_x_io.main.mix
                                        
                                                    sleep 1
                                                    qshell pwm rate -c 1234 -r 400
                                        			qshell pwm disarmed -c 1234 -p 900
                                        			qshell pwm min -c 1234 -p 1060
                                        			qshell pwm max -c 1234 -p 2000
                                                    qshell pwm failsafe -c 1234 -p -1 -d /dev/px4io
                                                else
                                                    /bin/echo "M0065 not detected, starting Spektrum RC driver"
                                                    qshell spektrum_rc start -d 8
                                                fi
                                            fi
                                        fi
                                        
                                        /bin/sleep 1
                                        
                                        # Start all of the processing modules on DSP
                                        
                                        qshell sensors start
                                        qshell ekf2 start
                                        qshell mc_pos_control start
                                        qshell mc_att_control start
                                        qshell mc_rate_control start
                                        qshell mc_hover_thrust_estimator start
                                        qshell land_detector start multicopter
                                        
                                        /bin/sleep 1
                                        
                                        # Start all of the processing modules on the applications processor
                                        
                                        rc_update start
                                        
                                        dataman start
                                        
                                        navigator start
                                        
                                        commander start
                                        commander mode manual
                                        
                                        # This is needed for altitude and position hold modes
                                        flight_mode_manager start
                                        
                                        # Start our service to update system time from GPS
                                        modalai_gps_timer start
                                        
                                        # As of 1.4.11 mavlink configuration has been changed!!! All communications are
                                        # now done via the mavlink server and voxl-vision-px4!!!
                                        param set MAV_BROADCAST 0
                                        
                                        if [ "$RC" == "CRSF_MAV" ]; then
                                            # Slow everything way down if we are using TBS Crossfire
                                            mavlink start -a -x -u 14556 -o 14557 -r 10000 -n lo -m minimal
                                        
                                            /bin/sleep 1
                                        else
                                            mavlink start -x -u 14556 -o 14557 -r 100000 -n lo -m onboard
                                        
                                            /bin/sleep 1
                                        
                                            # slow down some of the fastest streams in onboard mode
                                            mavlink stream -u 14556 -s HIGHRES_IMU -r 10
                                            mavlink stream -u 14556 -s ATTITUDE -r 10
                                            mavlink stream -u 14556 -s ATTITUDE_QUATERNION -r 10
                                            # speed up rc_channels
                                            mavlink stream -u 14556 -s RC_CHANNELS -r 50
                                        
                                            /bin/sleep 1
                                        fi
                                        
                                        if [ $PLATFORM = "M0052" ]; then
                                            # Start up the IMU server to support VIO. This is done differently on M0054
                                            imu_server start
                                        fi
                                        
                                        mavlink boot_complete
                                        
                                        # For now we use a mavlink bridge for TBS Crossfire support
                                        if [ "$RC" == "CRSF_MAV" ]; then
                                            mavlink_bridge start
                                        fi
                                        
                                        # Optional MSP OSD driver for DJI goggles
                                        # This is only supported on M0054 (with M0125 accessory board)
                                        if [ $PLATFORM = "M0054" ]; then
                                            if [ "$OSD" == "OSD" ]; then
                                                /bin/echo "Starting OSD driver"
                                                msp_osd start -d /dev/ttyHS1
                                            fi
                                        fi
                                        
                                        

                                        If your config is like this and it still doesn't work, maybe @Eric-Katzfey can help you better.

                                        D 1 Reply Last reply Reply Quote 0
                                        • D
                                          daniel @Andre Moura
                                          last edited by

                                          @Andre-Moura Thank You! We fixed our GPS setting problem.

                                          1 Reply Last reply Reply Quote 0
                                          • J
                                            JustinDev23
                                            last edited by

                                            @daniel what ended up being your fix? I was seeing the same issues yesterday with our Sentinel trying to do GPS only outdoor flights. It wouldn't ARM due to the GPS Speed Accuracy. Flashing blue for a minute or two and then turning green after what i assumed was VIO getting healthy.

                                            @Eric-Katzfey I don't want to use the Sentinel VIO so was hoping there was a GPS Only No VIO params file. It seems like the one posted on the git is still looking at VIO.

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Powered by NodeBB | Contributors