@@ -970,37 +970,37 @@ void lr11xx_gnss_compute_power_consumption(
970
970
uint32_t * power_consumption_nah , uint32_t * power_consumption_nwh )
971
971
{
972
972
float e_init =
973
- ( ( float ) instantaneous_power_consumption_ua -> init_ua / 1000.0 * ( float ) cumulative_timing -> init ) /
974
- 32768.0 ;
973
+ ( ( float ) instantaneous_power_consumption_ua -> init_ua / 1000.0f * ( float ) cumulative_timing -> init ) /
974
+ 32768.0f ;
975
975
976
- float e_gps_capture = ( ( ( float ) instantaneous_power_consumption_ua -> phase1_gps_capture_ua / 1000.0 *
976
+ float e_gps_capture = ( ( ( float ) instantaneous_power_consumption_ua -> phase1_gps_capture_ua / 1000.0f *
977
977
( float ) cumulative_timing -> phase1_gps_capture ) +
978
- ( ( float ) instantaneous_power_consumption_ua -> multiscan_gps_capture_ua / 1000.0 *
978
+ ( ( float ) instantaneous_power_consumption_ua -> multiscan_gps_capture_ua / 1000.0f *
979
979
( float ) cumulative_timing -> multiscan_gps_capture ) ) /
980
- 32768.0 ;
980
+ 32768.0f ;
981
981
982
- float e_gps_process = ( ( ( float ) instantaneous_power_consumption_ua -> phase1_gps_process_ua / 1000.0 *
982
+ float e_gps_process = ( ( ( float ) instantaneous_power_consumption_ua -> phase1_gps_process_ua / 1000.0f *
983
983
( float ) cumulative_timing -> phase1_gps_process ) +
984
- ( ( float ) instantaneous_power_consumption_ua -> multiscan_gps_process_ua / 1000.0 *
984
+ ( ( float ) instantaneous_power_consumption_ua -> multiscan_gps_process_ua / 1000.0f *
985
985
( float ) cumulative_timing -> multiscan_gps_process ) ) /
986
- 32768.0 ;
986
+ 32768.0f ;
987
987
988
- float e_gps_sleep_32k = ( ( float ) instantaneous_power_consumption_ua -> sleep_32k_ua / 1000.0 *
988
+ float e_gps_sleep_32k = ( ( float ) instantaneous_power_consumption_ua -> sleep_32k_ua / 1000.0f *
989
989
( float ) cumulative_timing -> multiscan_gps_sleep_32k ) /
990
- 32768.0 ;
990
+ 32768.0f ;
991
991
992
992
float e_tot_gps = e_gps_capture + e_gps_process + e_gps_sleep_32k ;
993
993
994
- float e_beidou_capture = ( ( ( float ) instantaneous_power_consumption_ua -> phase1_beidou_capture_ua / 1000.0 *
994
+ float e_beidou_capture = ( ( ( float ) instantaneous_power_consumption_ua -> phase1_beidou_capture_ua / 1000.0f *
995
995
( float ) cumulative_timing -> phase1_beidou_capture ) +
996
- ( ( float ) instantaneous_power_consumption_ua -> multiscan_beidou_capture_ua / 1000.0 *
996
+ ( ( float ) instantaneous_power_consumption_ua -> multiscan_beidou_capture_ua / 1000.0f *
997
997
( float ) cumulative_timing -> multiscan_beidou_capture ) ) /
998
- 32768.0 ;
999
- float e_beidou_process = ( ( ( float ) instantaneous_power_consumption_ua -> phase1_beidou_process_ua / 1000.0 *
998
+ 32768.0f ;
999
+ float e_beidou_process = ( ( ( float ) instantaneous_power_consumption_ua -> phase1_beidou_process_ua / 1000.0f *
1000
1000
( float ) cumulative_timing -> phase1_beidou_process ) +
1001
- ( ( float ) instantaneous_power_consumption_ua -> multiscan_beidou_process_ua / 1000.0 *
1001
+ ( ( float ) instantaneous_power_consumption_ua -> multiscan_beidou_process_ua / 1000.0f *
1002
1002
( float ) cumulative_timing -> multiscan_beidou_process ) ) /
1003
- 32768.0 ;
1003
+ 32768.0f ;
1004
1004
float e_beidou_sleep_32k =
1005
1005
( instantaneous_power_consumption_ua -> sleep_32k_ua / 1000.0 * cumulative_timing -> multiscan_beidou_sleep_32k ) /
1006
1006
32768.0 ;
@@ -1010,31 +1010,31 @@ void lr11xx_gnss_compute_power_consumption(
1010
1010
float e_demod = 0 ;
1011
1011
if ( cumulative_timing -> constellation_demod == 0 ) // Demodulation has been done on GPS constellation
1012
1012
{
1013
- e_demod = ( ( ( float ) instantaneous_power_consumption_ua -> multiscan_gps_capture_ua / 1000.0 *
1013
+ e_demod = ( ( ( float ) instantaneous_power_consumption_ua -> multiscan_gps_capture_ua / 1000.0f *
1014
1014
( float ) cumulative_timing -> demod_capture ) +
1015
- ( ( float ) instantaneous_power_consumption_ua -> multiscan_gps_process_ua / 1000.0 *
1015
+ ( ( float ) instantaneous_power_consumption_ua -> multiscan_gps_process_ua / 1000.0f *
1016
1016
( float ) cumulative_timing -> demod_process ) +
1017
- ( ( float ) instantaneous_power_consumption_ua -> sleep_32k_ua / 1000.0 *
1017
+ ( ( float ) instantaneous_power_consumption_ua -> sleep_32k_ua / 1000.0f *
1018
1018
( float ) cumulative_timing -> demod_sleep_32k ) +
1019
- ( ( float ) instantaneous_power_consumption_ua -> demod_sleep_32m_ua / 1000.0 *
1019
+ ( ( float ) instantaneous_power_consumption_ua -> demod_sleep_32m_ua / 1000.0f *
1020
1020
( float ) cumulative_timing -> demod_sleep_32m ) ) /
1021
- 32768.0 ;
1021
+ 32768.0f ;
1022
1022
}
1023
1023
else // Domulation has been done on Beidou constellation
1024
1024
{
1025
- e_demod = ( ( ( float ) instantaneous_power_consumption_ua -> multiscan_beidou_capture_ua / 1000.0 *
1025
+ e_demod = ( ( ( float ) instantaneous_power_consumption_ua -> multiscan_beidou_capture_ua / 1000.0f *
1026
1026
( float ) cumulative_timing -> demod_capture ) +
1027
- ( ( float ) instantaneous_power_consumption_ua -> multiscan_beidou_process_ua / 1000.0 *
1027
+ ( ( float ) instantaneous_power_consumption_ua -> multiscan_beidou_process_ua / 1000.0f *
1028
1028
( float ) cumulative_timing -> demod_process ) +
1029
- ( ( float ) instantaneous_power_consumption_ua -> sleep_32k_ua / 1000.0 *
1029
+ ( ( float ) instantaneous_power_consumption_ua -> sleep_32k_ua / 1000.0f *
1030
1030
( float ) cumulative_timing -> demod_sleep_32k ) +
1031
- ( ( float ) instantaneous_power_consumption_ua -> demod_sleep_32m_ua / 1000.0 *
1031
+ ( ( float ) instantaneous_power_consumption_ua -> demod_sleep_32m_ua / 1000.0f *
1032
1032
( float ) cumulative_timing -> demod_sleep_32m ) ) /
1033
- 32768.0 ;
1033
+ 32768.0f ;
1034
1034
}
1035
1035
1036
1036
float power_consumption_uah_tmp = ( ( e_init + e_tot_gps + e_tot_beidou + e_demod ) * 1000 ) /
1037
- ( 3600.0 - ( ( float ) cumulative_timing -> total / 32768.0 ) );
1037
+ ( 3600.0f - ( ( float ) cumulative_timing -> total / 32768.0f ) );
1038
1038
1039
1039
* power_consumption_nah = ( uint32_t )( power_consumption_uah_tmp * 1000 );
1040
1040
* power_consumption_nwh =
0 commit comments