Post Reply 
Deg Min Sec question
07-16-2018, 08:34 PM
Post: #1
Deg Min Sec question
How do you assign an angle in degrees, minutes, seconds to a variable?

Code:
LOCAL aa,bb;
EXPORT AngleCalcs()
BEGIN
  aa:=EXPR("25°15'00"");
  bb:=aa + EXPR("7°12'13"");
  PRINT();
  PRINT("aa="+aa);
  PRINT("bb="+bb);
END;
Find all posts by this user
Quote this message in a reply
07-16-2018, 08:55 PM
Post: #2
RE: Deg Min Sec question
I think you don't have the correct unicode characters for min and sec. Try with: 25°15′00″ and 7°12′13″ (they may look the same as your's in the browser but they are not the same.
Find all posts by this user
Quote this message in a reply
07-16-2018, 11:19 PM
Post: #3
RE: Deg Min Sec question
I was wondering, what are tr (turn 360 degrees) angle units?

Code:
LOCAL aa,bb,cc,dd;
EXPORT AngleCalcsExamples()
BEGIN

  //DMS calcs

  aa:=EXPR("25°15′5″");
  bb:=aa + EXPR("7°12′13.57″");
  PRINT();
  PRINT("aa (DMS)="+aa);
  PRINT("bb="+bb);

  //conversion from DMS to DEG, and vice versa

  cc:=45.75;
  PRINT("cc-deg="+cc);
  cc:=→HMS(cc);
  PRINT("cc-dms="+cc);
  cc:=HMS→(cc);
  PRINT("cc-deg="+cc);

  //tr angle calcs???

  dd:=SIN(325°15′55.3″);
  PRINT("SIN(325°15′55.3″)="+dd);

  dd:=SIN(325.2525_tr);
  PRINT("SIN(325.2525_tr″)="+dd);
  dd:=COS(45_tr);
  PRINT("COS(45_tr)="+dd);

END;
Find all posts by this user
Quote this message in a reply
07-17-2018, 05:30 AM
Post: #4
RE: Deg Min Sec question
Hello,

The tr, deg, rad... units are.. well units.
They are units in the fact that they are treated like unit objects, can be converted from one to another.

As a "hack", they are also supported in trig functions.

But their use is relatively limited in reality.

Cyrille

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 2 Guest(s)