Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: decode_uart/calculate_ad_data.h
- Revision:
- 1:c79aa502de30
- Child:
- 2:970cd691d7de
diff -r b3a90cb05638 -r c79aa502de30 decode_uart/calculate_ad_data.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/decode_uart/calculate_ad_data.h Tue Oct 30 10:32:08 2018 +0000 @@ -0,0 +1,21 @@ +#ifndef CALCULATE_AD_DATA_H +#define CALCULATE_AD_DATA_H + +#define a (8.91304*pow(10.0,-4.0)) +#define b (2.04041*pow(10.0,-4.0)) +#define c (7.4*pow(10.0,-8.0)) + +#define calculate_V(D) (D/51.0) +#define calculate_bat_I(D) ((5.0/6.0)*(D/51.0-2.5)) +#define calculate_R(D) ((-1.0*pow(10.0,5.0)*D)/(D-255.0)) +#define calculate_T(D) ((1.0/(a + b*log(calculate_R(D)) + c*pow(log(calculate_R(D)),3.0))) - 273.15) +#define calculate_solar_I(D) (D/510.0) +#define calculate_txmodem_I(D) (D/(51.0*82.5*0.06)) +#define calculate_rxFM_CW_I(D) (D/(51.0*20.5*0.39)) +#define calculate_rxmodem_I(D) (D/(51.0*20.5*1.82)) +#define calculate_txFM_I(D) (D/(51.0*56.5*0.04)) +#define calculate_mis5V_I(D) (D/(51.0*82.5*0.06)) +#define calculate_mobc_I(D) (D/(51.0*82.5*0.06)) +#define calculate_misbus_I(D) (D/(51.0*5.0*0.18)) + +#endif \ No newline at end of file