Skip to content

Commit

Permalink
units: Add dms unit to angles menu
Browse files Browse the repository at this point in the history
Add the `dms` unit to angles menu, with value "one degree" so that we
can convert between DMS and decimal degrees using the normal units
menu.

Fixes: #818

Signed-off-by: Christophe de Dinechin <[email protected]>
  • Loading branch information
c3d committed Feb 11, 2024
1 parent 06d0427 commit 4cffc39
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/units.csv
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@
"r", "0.1591549430918953357688837633725144_turn"
"πr", "1/2_turn"

"dms", "1_°"
"arcmin", "1/60_°"
"arcs", "1/60_arcmin"
"sr", "1_sr"
Expand Down
1 change: 1 addition & 0 deletions src/unit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,7 @@ static const cstring basic_units[] =
"r", "0.1591549430918953357688837633725144_turn", // Radian
"πr", "1/2_turn", // Pi radians

"dms", "1_°", // Degrees shown as DMS
"arcmin", "1/60_°", // Arc minute
"arcs", "1/60_arcmin", // Arc second
"sr", "1_sr", // Steradian
Expand Down

0 comments on commit 4cffc39

Please sign in to comment.