HP Forums
Deg Min Sec question - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Deg Min Sec question (/thread-11065.html)



Deg Min Sec question - Gene222 - 07-16-2018 08:34 PM

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;



RE: Deg Min Sec question - Didier Lachieze - 07-16-2018 08:55 PM

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.


RE: Deg Min Sec question - Gene222 - 07-16-2018 11:19 PM

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;



RE: Deg Min Sec question - cyrille de brébisson - 07-17-2018 05:30 AM

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