AP_Follow: stop adjusting frame of return location based on parameter
this removes the dual-use of the _alt_type parameter.
This parameter was changing both which input we accepted from the other vehicle (eg. GLOBAL_POSITION_INT.alt vs GLOBAL_POSITION_INT.relative_alt, but it was also specifying the return frame for the Location object returned from various methods. This was somewhat confusing and unnecessary.
- all lua scripts in-tree canonicalise this to absolute altitude
- there are only two callers to these. One is logging, meaning we will always now log in relative-to-origin numbers. The secon is mavlink-reporting which canonicalises the altitude. Many other
get_wp()methods can return absolute-altitude locations.
Hi @peterbarker, I think there are some comments a few lines up that need updating as well..
Hi @peterbarker, I think there are some comments a few lines up that need updating as well..
I've removed those parts of the comments now, both in the cpp and header files, thanks.
@rmackay9 needs your review as well I think looks good for plane
Ping @timtuxworth - could I get your thoughts on this, please?
Ping @timtuxworth - could I get your thoughts on this, please?
I like the change, although I don't have any use cases for it since I don't usually use home relative altitudes. I see it passes CI, I assume there must be (many?) tests for flying at home relative altitudes?
I'm going to say I think it needs testing on a real vehicle.
I'm going to say I think it needs testing on a real vehicle.
Are you going to do that testing?
I'm going to say I think it needs testing on a real vehicle.
Are you going to do that testing?
That's a reasonable question I guess, but a. I can't test for a couple of weeks and b. I'd prefer to test it on master with Leonard's kinetic extrapolation work. Will that work?
I'm going to say I think it needs testing on a real vehicle.
Are you going to do that testing?
That's a reasonable question I guess, but a. I can't test for a couple of weeks and b. I'd prefer to test it on master with Leonard's kinetic extrapolation work. Will that work?
Have you read and understood the patches? Leonard has.
This PR does not change the maths.
I'm going to say I think it needs testing on a real vehicle.
Are you going to do that testing?
That's a reasonable question I guess, but a. I can't test for a couple of weeks and b. I'd prefer to test it on master with Leonard's kinetic extrapolation work. Will that work?
Have you read and understood the patches? Leonard has.
This PR does not change the maths.
Yes it should be ok. "should be" always worries me.
I'm going to say I think it needs testing on a real vehicle.
Are you going to do that testing?
That's a reasonable question I guess, but a. I can't test for a couple of weeks and b. I'd prefer to test it on master with Leonard's kinetic extrapolation work. Will that work?
Have you read and understood the patches? Leonard has. This PR does not change the maths.
Yes it should be ok. "should be" always worries me.
Have you tested this one yet, @timtuxworth ?