paparazzi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Paparazzi-devel] Mods for battery currents greater than 32 Amperes


From: mark.griffin
Subject: [Paparazzi-devel] Mods for battery currents greater than 32 Amperes
Date: Sun, 8 Nov 2009 17:33:54 +0100

The int16 data-type is used to store the current value. This gives a
current range of +/- 32.768 Amps. 

If high-power/large motors are employed, currents can be much larger
than this. The current value becomes negative resulting in the "energy"
message decreasing (instead of rapidly increasing).

To overcome this limitation, the data-type can be changed to int32 in
the following files: 

 /conf/messages.xml        (current => int32)
 /sw/airborne/main_fbw.c   (fbw_current_milliamp => int32_t)
 /sw/airborne/main_fbw.h   (fbw_current_milliamp => int32_t)
 /sw/airborne/main_ap.c    (current => int32_t)
 /sw/airborne/inter_mcu.h  (current => int32_t)

The aircraft has to be re-compiled for these changes to take effect. 

Pascal/Poine: Could the current data-type be permanently changed from
16-bit to 32-bit in the master files? 

The extra 2 bytes should not burden the system. Alternatively, the
data-type could be changed to uint16 but I guess on-board
re-generative/charging systems would not be supported.

Mark Griffin 








reply via email to

[Prev in Thread] Current Thread [Next in Thread]