Angles in sexagesimal units?

Angles in sexagesimal units? - Messages

#1 Posted: 2/23/2019 8:57:11 AM
gskelly

gskelly

0 likes in 7 posts.

Group: User

Is there a way to use SMath so that, at face value, the document has angular values expressed in degrees, minutes and seconds?

My inputs and outputs for all angular quantities are in sexagesimal units and may include decimals of a second.

Thanks
#2 Posted: 2/23/2019 9:59:32 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

Is there a way to use SMath so that, at face value, the document has angular values expressed in degrees, minutes and seconds?

My inputs and outputs for all angular quantities are in sexagesimal units and may include decimals of a second.



Maths Convert [deg, min, sec].sm (7 KiB) downloaded 55 time(s).
#3 Posted: 2/23/2019 11:05:28 AM
gskelly

gskelly

0 likes in 7 posts.

Group: User

Wrote


Maths Convert [deg, min, sec].sm (7 KiB) downloaded 55 time(s).



Thanks Jean. I understand your response to mean I will have to define functions to convert between the sexagesimal and decimal representations. Ideally I was hoping there was some way to use units.

The list approach would be preferred to the string since it would be easier to use as input. The function will need to handle negative values and test for cases where the floating point number representation may cause problems.


#4 Posted: 2/23/2019 11:40:29 AM
gskelly

gskelly

0 likes in 7 posts.

Group: User

Wrote


The list approach would be preferred to the string since it would be easier to use as input. The function will need to handle negative values and test for cases where the floating point number representation may cause problems.



The negative values are easy to handle. Maybe the program handles the imprecision of floating point numbers automatically?

Maths Convert [deg,min,sec]-gds.sm (11 KiB) downloaded 33 time(s).
#5 Posted: 2/23/2019 12:16:22 PM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Hi. Here, my workaround.

DMS.gif

DMS.sm (17 KiB) downloaded 52 time(s).

Best regards.
Alvaro.
2 users liked this post
frapuano 2/23/2019 12:28:00 PM, sergio 2/23/2019 6:26:00 PM
#6 Posted: 2/23/2019 1:58:25 PM
gskelly

gskelly

0 likes in 7 posts.

Group: User

Wrote

Hi. Here, my workaround.

DMS.gif

DMS.sm (17 KiB) downloaded 52 time(s).

Best regards.
Alvaro.



Hmmm... The separate units use is interesting. I am so inexperienced with SMath I can't figure out how to enter the summation portion.

I think I will need to leave the negative angle input as [ -d -m -s ] with this approach. Would you agree?
#7 Posted: 2/23/2019 2:02:52 PM
gskelly

gskelly

0 likes in 7 posts.

Group: User

Wrote

I am so inexperienced with SMath I can't figure out how to enter the summation portion.



Ah-ha! The vectorize function.
#8 Posted: 2/23/2019 2:06:06 PM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Wrote


Hmmm... The separate units use is interesting. I am so inexperienced with SMath I can't figure out how to enter the summation portion.



Hi. Try this as general rule for SMath sintaxis:

type.gif

Wrote


I think I will need to leave the negative angle input as [ -d -m -s ] with this approach. Would you agree?



Guess yes:

DMS neg.gif

Best regards.
Alvaro.
  • New Posts New Posts
  • No New Posts No New Posts