ArduPilot / MissionPlanner

Mission Planner Ground Control Station for ArduPilot (c# .net)
http://ardupilot.org/planner/
GNU General Public License v3.0
1.78k stars 2.4k forks source link

Survey UI: Units #541

Open bbasso opened 10 years ago

bbasso commented 10 years ago

The units in both v and v2 survey interfaces are metric. These should change with the units selected for the Planner. Generated units such as cam_trigg_dist and waypoint altitudes will be interpreted in feet and not meters if the Planner is in meters. It would be really nice if the survey interface could actually display the correct units, but if not, listing no units would be better than listing the wrong unit.

iskess commented 10 years ago

I posted a similar issue #169 about 10 months ago that is still open.

tristannovak commented 10 years ago

I agree, it caused issues before I realized what was going on. I ended up using metric throughout all of MP for now.

tristannovak commented 10 years ago

I am working on this issue... This might be a dumb question but it would speed me up a bunch if someone could answer a couple questions.

What is the method used to access the stored setting variables for MP? Survey needs to know the set default dist and speed units.

I am also working on the speed issue #414 as I think it would be very useful also. ( just a "Use Speed in Mission" checkbox) So Survey will need to access the WP_NAV_SPEED to be able to set the speed back without reset. Even just reading WP_NAV_SPEED and setting the value in "numericUpDownFlySpeed" automatically for estimate flight time would be nice.

meee1 commented 10 years ago

look in plugin.host.cs.multiplierdist

tristannovak commented 10 years ago

@meee1 I added support for Imperial units, then committed them to my master branch. Not realizing that you had added my last two commits(I didn't think they were right). Should I update my master(to the diydrones master) and start over adding Imperial units? Sorry for the trouble.

bbasso commented 10 years ago

@tristannovak - two questions about your work here...

1) does the survey tool now just obey the specified units for the whole planner, or can you change within the survey tool? 2) are you changing the annotation in the Survey interface as well? ie. displaying acres instead of Km^2 (this is the biggest feature request I hear from users)

tristannovak commented 10 years ago

@bbasso 1) It obeys the units set in MP settings.

2) Yes, The picture below is what I have completed so far...

2bf6e7f2-20fc-11e4-9b5d-c288ce08551f

I will probably add a little logic to convert up(or down) to the next Imperial unit that makes sense. i.e. Area > 21780 ft^2, convert to acres. Area: 32670 ft^2. Would instead show Area: .75 acres. Distance < 1 mile, convert to ft. Distance: .25 miles. Would instead show Distance: 1320 ft. and so on...

Also if I don't go through all of the work to allow Altitude to be input as feet, I will probably at least display the Imperial equivalent when MP is in Imperial mode. I made a quick example in paint...

altitude_ft

meee1 commented 10 years ago

ill have a look at converting the M box when I get home

tristannovak commented 10 years ago

@meee1

Have you made any progress on this? If not I could work on it, as I am working on the other logic for showing the the most reasonable unit.

I was thinking either putting the altitude into a variable, or calling a function to get the converted value of the box.

I guess we could use a multiplier also.

tristannovak commented 10 years ago

@bbasso

I added the logic.

Was my answer what you were looking for, or were you thinking something different?