Thread: Basic Math Help
View Single Post
  #1   Spotlight this post!  
Unread 14-02-2007, 10:20
CoasterFuelPhil CoasterFuelPhil is offline
Registered User
FRC #1930
 
Join Date: Oct 2006
Location: Rochester
Posts: 6
CoasterFuelPhil is on a distinguished road
Basic Math Help

Hi, this is my first post on Chief Delphi. my name is Phil Nguyen and I am on the team 1930, Delta Force.

I am having trouble with multiplying numbers and stuff. the numbers cannot be an int because we need it very precise.

PHP Code:
current_height=29.401*(pow((0.0049*((double)Get_Analog_Value(rc_ana_in01)) - 0.0044),-1.0895)); 

It doesn't work, not even somthing like:
PHP Code:
current_height = ((30)*Get_Analog_Value(rc_ana_in01)); 
I am getting a number like 18 thousand when the analog info is something like 200

We've tried using current height as a double and a float, same thing.