|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
Dashboard: how to calculate battery voltages?
Hello,
I have been hacking on a small VB app to connect to the dashboard port during matches to record every packet into a CSV file for analysis in Excel. It's a handy little tool, but I'm looking to extend its functionality. For now, I can't figure out how to calculate, given the 1 byte battery voltage, the actual number of volts. Is there some magic formula I must run the byte through to get the proper voltage? Thanks. BTW, I may release this app once it's a bit better. Right now it's just a mash of code I wrote last-minute...I really needed it to figure out why our auto-correction in auton wasn't working. JBot |
|
#2
|
|||
|
|||
|
Re: Dashboard: how to calculate battery voltages?
I have no way to test if this helps you, but I found this in ifi_aliases.h It leads me to believe that you should scale the readings you get back by the same amount as IFI does in this code.
Code:
/* *----------------------------------------------------------------------------------------------------- *---------- Aliases for Battery Voltage bytes -------------------------------------------------------- *----------------------------------------------------------------------------------------------------- * Formula to calculate voltage in volts: * current_voltage = battery_voltage * 0.038 + 0.05; */ #define battery_voltage rxdata.rc_main_batt*15.64/256 #define backup_voltage rxdata.rc_backup_batt*15.64/256 |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how do i calculate degree/pwmstep? | Ianuser | Programming | 0 | 17-02-2007 09:58 |
| How to calculate arm angles? | SoD | Programming | 5 | 31-01-2007 14:17 |
| How to calculate planetary gear ratios? | sanddrag | Technical Discussion | 2 | 27-02-2005 11:55 |
| How do you Calculate Belt Length? | Gabriel | Technical Discussion | 7 | 08-11-2004 14:54 |
| Battery Voltages in Dashboard | Ian W. | Programming | 10 | 07-03-2004 16:50 |