Takeoff from moving platfom

Hello
My name is Maciek.
I want to takeoff copter from moving platform via mavlink command.
This command is MAV_CMD_NAV_TAKEOFF.
Additionality paramaters in mavlink frame are: param5 - lat, param6-lon, param7 - altitude.
Everything is OK when platform (heliport) is not moving.
When the paltform moves, the copter will be left behind becouse of param5 - lat, param6-lon sended together with takeoff command.
How to achieve the situation when the drone takeoff and does not take into account lat and lon sended together with takeoff command?
I want the drone to only rise up and maintain its horizontal speed, which he obtained while standing on a mobile on the platform.
I was thinking about changing the takeoff.cpp code:
Condition:
if (PX4_ISFINITE(rep->current.lat) && PX4_ISFINITE(rep->current.lon)) {
pos_sp_triplet->current.lat = rep->current.lat;
pos_sp_triplet->current.lon = rep->current.lon;
}
To
if (PX4_ISFINITE(rep->current.lat) && PX4_ISFINITE(rep->current.lon)) {
pos_sp_triplet->current.lat = _navigator->get_global_position()->lat;
pos_sp_triplet->current.lon = _navigator->get_global_position()->lon;
}

Thank you
Maciek

3 Likes

Hi Maciek

I want to achieve the same, did you found any solution?.

Cheers,