Revised settings system based on feedback from @thebgpikester and @Ramsay58

Now the LL menu is replaced by 2 menus:

- Lon/Lat Degree Min Sec (LL DMS)
- Lon/Lat Degree Dec Min (LL DDM)

LL Accuracy menu options are only available when LL DDM. As agreed, for
DMS there won't be any accuracy. Optimized the menu settings logic.

Default menu setting is BR for A2G and BRAA for A2A.
This commit is contained in:
FlightControl_Master
2017-08-27 17:51:28 +02:00
parent d558c5be21
commit 02ff2e8efa
3 changed files with 181 additions and 156 deletions

View File

@@ -305,12 +305,13 @@ UTILS.tostringLL = function( lat, lon, acc, DMS)
end
local secFrmtStr -- create the formatting string for the seconds place
if acc <= 0 then -- no decimal place.
secFrmtStr = '%02d'
else
local width = 3 + acc -- 01.310 - that's a width of 6, for example.
secFrmtStr = '%0' .. width .. '.' .. acc .. 'f'
end
secFrmtStr = '%02d'
-- if acc <= 0 then -- no decimal place.
-- secFrmtStr = '%02d'
-- else
-- local width = 3 + acc -- 01.310 - that's a width of 6, for example.
-- secFrmtStr = '%0' .. width .. '.' .. acc .. 'f'
-- end
return string.format('%02d', latDeg) .. ' ' .. string.format('%02d', latMin) .. '\' ' .. string.format(secFrmtStr, latSec) .. '"' .. latHemi .. ' '
.. string.format('%02d', lonDeg) .. ' ' .. string.format('%02d', lonMin) .. '\' ' .. string.format(secFrmtStr, lonSec) .. '"' .. lonHemi