Shop OBEX P1 Docs P2 Docs Learn Events
Higher math — Parallax Forums

Higher math

bkleindelbkleindel Posts: 2
edited 2010-07-20 23:03 in BASIC Stamp
Can i program higher math functions with ·Pbasic, and the BS2?· i have the Memsic inclometer modual (#28017), and i have been able to program and display, on the LCD, my angle above horizontal.· now, given a velocity,· I want to display horizontal range using the formula: r = V2 SIN( 2u) /g···· were·v is a given velocity, u is my angle determined by the BS2, and g is gravitational constant 9.8 m/s2


How do i square a value in Pbasic?

Any help is greatly appreciated

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-07-20 22:51
    There are built-in operators for things like arctangent (ATN), but these are all for 16-bit integer arithmetic.· Look at the Stamp Editor help files for more information.· You can add an external floating point processor that Parallax sells and you can also do transcendental functions using a Cordic algorithm.· Check out http://www.emesystems.com via the "app-notes" link at the bottom of the page for lots of information on Stamp usage and math.
  • bkleindelbkleindel Posts: 2
    edited 2010-07-20 23:03
    Thanx for your help!!
Sign In or Register to comment.