Using DO_SET_HOME command

We are trying to implement changing home position in flight feature. At the moment, when PC sends DO_SET_HOME with altitude = 0, copter starts reporting altitude greater than it actually is.

I’ve looked into MP code and found that you are using ‘srtm’ for calculating home altitude. Is it necessary?

Thanks!

@ionoy,
For the altitude argument of the do-set-home you’ll need to also set the absolute altitude (of home). If you’re not sure what that is, then you could retrieving the mission and in there command #0 (which is where we store home) has the home altitude. That’s a bit of a crappy solution I know, we shouldn’t really even be storing home in the mission (and we won’t from Copter-3.4 most likely) but that should work for now.

In Copter-3.4 we will have support for retrieving the home position using the MAV_CMD_GET_HOME_POSITION and the home position will also be published out (using the HOME_POSITION message).

I’d say this is a developer question so feel free to ask these on drones-discuss@googlegroups.com.