Quick disclaimer - I work for Trimble but not in this division. I’m posting this because I found it interesting and believe others in the community will too.
Hi Mal, I am working on updating ArduPilot’s GSOF driver. I have been working with Applanix to support the BD940-INS as well as the PX1 RTX.
I’ve already sone some refactor the AP_GPS_GSOF driver, and plan to add more support soon. Applanix has agreed to ship me a unit to develop against.
Here’s the list of currently merged work, which is all refactor (non-functional changes)
Currently, I am working on adding a simulator for GSOF. The purpose is to use SITL to ensure the changes and refactor work to the driver does not introduce regressions. Then, it will be more safe to introduce features. I plan to start out by increasing support for using it as a precise GPS. For example, using the covariance estimates instead of just HDOP/VDOP.
After that, the next phase would be to use it as an “external AHRS” for ArduPilot.
If you had any specific requests for support, I am happy to discuss them here.
We got the current (merged) driver working with the old messages treating the PX1 as a simple GPS, like the BD930. The default configuration hard-coded in the autopilot sets the serial output on COM1 (RS232), while COM2 is TTL. We will need to make a parameter to expose that interface.
This PR now exposes the desired baud rate through an ArduPilot parameter. Default is preserved at 115k, however 230k is now supported for decreased latency on platforms that allow it.
It also fixes the default ports that GSOF is enabled. Now, GSOF data output is hard coded to COM2, as that is the only TTL level serial port available for GSOF on the PX1. This would be connected directly to the TELEM port on your autopilot. In the future, this could be exposed in the following param: https://ardupilot.org/plane/docs/parameters.html#gps-com-port-gps-physical-com-port
In the future, parameters can be exposed to support the planned ethernet support in ArduPilot.
Hi @rfriedman , are you still working on this?
I’m trying to use an Applanix APX-15 as a GPS, using your GSOF driver, and something doesn’t work quite well.
The problem is related to the altitude. The altitude reported by the APX doesn’t match the terrain height, and when trying to land, the drone tries to descend way below the ground, resulting in a crash.
With any other GPS I tried so far, it works flawlessly. Do you know why the altitude is not correct?
Here’s an example of the altitude reported by a HERE GPS (green) related to the ground (red):
Could this be related to the ellipsoid model? The elevation height shown in the Applanix interface is closer to the real altitude than the height being used by ArduPilot, but there’s also a clear difference in your picture so it probably doesn’t matter.
I tried changing RTL_ALT_TYPE to Relative to Home but the result was the same.
What confuses me even more is that the retractable landing gear does open and close correctly depending on the height, but when it comes to landing, the drone should slow down considerably when it reaches 4 meters from the ground and it doesn’t because it wants do descend 50 meters more before that.
Yes, the packets that the AP_GPS_GSOF driver is using for altitude is not documented. They are deprecated, and I cannot find information on whether it is MSL or ellipsoid height.
We might be able to figure it out through trial and error. Note, that Trimble has many test flights using the code on master from using AP_GPS_GSOF and no issues.
I’m on vacation for 2 weeks, but when I get back, I’ll be heads down on finishing a new driver for Px-1, which uses recommended packets from Trimble (GSOF 49,50). I’ll keep this thread updated with information. I can dig into your logs then too.
ArduPilot flies generally home-relative, so if the altitude on your HUD doesn’t say 0 when you take off, something has gone horribly wrong.
According to their documentation, the #2 message should provide height from WGS-84 datum and the #70 message returns Mean Sea Level height.
I met @Jerry_Wang last year and he showed us some videos of drones landing with the PX-1 so I’m pretty sure this should work, but I don’t know what I could be doing wrong. I didn’t fly with the latest firmware tho, still on 4.5.5. Will try updating.
Sweet, I’ll be looking at it closely, thank you very much.
It does say 0 and flies smoothly, but when trying to do an autonomous landing something doesn’t work.