PX4 Initialization Transfer Alignment

Dear community,

I started with Ardupilot and recently changed to PX4. First of all, thanks for this great flight controller!

My question is around initialization of the flight controller from a moving platform. I’m able to access all data from the platform like attitude, position or velocities. The platform is constantly moving so I either need to start the PX4 when the platform is at rest or I need a transfer alignment procedure for a proper initialization of the FC.

Do you have any advice how to accomplish that? I thought of searching for the initialization phase, where the gyro biases are also set ( when the FC is still at rest) and replace this with a loop, which breaks when the TA is completed. Any advice or hint to the files would be very much appreciated.

Hey Hi., I am also looking for the same. I am trying to create ros node which give us the error-state using ES-EKF., Can I know which procedure you have used and outcome of it., Those will really help me.,

Hi, I’m still on it. I’ve got a hot hint for you: look how set_gps_global_origin is defined in the EKF. This also changes the state on the fly, what could also be provided by an external alignment filter. There’s also a method for changing the quats. Hope that helps.

Thanks man,

I’m currently feeding my MasterINS data into PX4 as External Vision (EV) odometry, so that the EKF will fuse it while the aircraft is still rigidly mounted on the moving platform.
Once airborne, I just drop the EV “quality” field below the EKF2_EV_QMIN threshold (or stop publishing), so the filter automatically stops using EV and transitions to the usual GNSS/airspeed/IMU aiding.

Hope this works too.,

For the Return-to-Launch (RTL) part, I think we can use the approach you suggested earlier with SET_GPS_GLOBAL_ORIGIN.

Cool, that sounds like a very good approach, thanks for giving insides here. I will give it a try. I’m currently working on custom simulator for a fixed wing model for exactly these sorts of study. Theoretically, in case the master is also a PX4 enabled system (or at leasts speaks Mavlink), you could directly build a custom handler for ATTITUDE and LOCAL_POSTION_NED coming from the master for your approach :).