Go to Post We all need to remember to be careful at these competitions. Danger lies in the most unexpected (and comical) places. - Alexander McGee [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #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.
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with math Termite233 Math and Science 4 12-07-2005 04:41
basic pneumatic help needed Anton Programming 4 10-02-2005 16:02
Help programming in Visual Basic xxlshortys Programming 0 06-04-2003 08:54
Math Help!!! Leon Machado IV Chit-Chat 7 16-11-2001 19:38


All times are GMT -5. The time now is 04:49.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi