<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Mark,<br>
<br>
IF (!) my detailed stats approach makes sense for most users,
variables would be...<br>
<br>
<tt>typedef struct speedpwr // power usage statistics for
accel/decel</tt><tt><br>
</tt><tt>{</tt><tt><br>
</tt><tt> unsigned long dist; // distance sum in 1/10 m</tt><tt><br>
</tt><tt> unsigned long use; // sum of power used</tt><tt> in </tt><tt><tt>1/100
Ws = </tt>1/360000 Wh<br>
</tt><tt> unsigned long rec; // sum of power recovered
(recuperation)</tt><tt> in 1/100 Ws<br>
</tt><tt>} speedpwr;</tt><tt><br>
</tt><tt><br>
</tt><tt><tt>typedef struct levelpwr // power usage statistics for
level up/down</tt><tt><br>
</tt><tt>{</tt><tt><br>
</tt><tt> unsigned long dist; // distance sum in 1 m</tt><tt><br>
</tt><tt> unsigned int hsum; // height sum in 1 m</tt><tt><br>
</tt><tt> unsigned long use; // sum of power used</tt><tt> </tt><tt>in
</tt><tt><tt>1/100 Ws = </tt>1/360000 Wh<br>
</tt><tt> unsigned long rec; // sum of power recovered
(recuperation)</tt><tt> in 1/100 Ws<br>
</tt><tt>} levelpwr;</tt><tt><br>
</tt><tt><br>
</tt></tt><tt><tt>signed long car_power; // current power in W,
negative=charging<br>
<br>
</tt>speedpwr car_speedpwr[3]; // speed power usage statistics</tt><tt><br>
</tt><tt>#define CAN_SPEED_CONST 0 // constant
speed</tt><tt><br>
</tt><tt>#define CAN_SPEED_ACCEL 1 // accelerating</tt><tt><br>
</tt><tt>#define CAN_SPEED_DECEL 2 // decelerating</tt><tt><br>
</tt><tt><br>
</tt><tt>levelpwr car_levelpwr[2]; // level power usage statistics</tt><tt><br>
</tt><tt>#define CAN_LEVEL_UP 0 // uphill</tt><tt><br>
</tt><tt>#define CAN_LEVEL_DOWN 1 // downhill</tt><tt><br>
</tt><tt><br>
</tt><tt><br>
</tt>...that would be a total of 80 bytes (currently already
allocated in the first vehicle overlay section, so should make no
difference in total RAM usage).<br>
<br>
I divide the counters into these sections as I think these are the
sections of interest in energy use analysis. I consider this still
experimental, I introduced it to see if the section ratios and sums
can be used as an indicator for efficient driving style, but I
cannot draw a conclusion yet from my observations.<br>
<br>
The GPS log function really only needs the overall totals. So we
could basically also reduce the common vars to just one speedpwr
entry for the overall totals (+ car_power of course). Vehicle
modules could still use this and add their own vars for
accel/decel/up/down, so this would be no waste of RAM. Just the
current power + overall sums would add 4*long = 16 bytes to the
common car model.<br>
<br>
What do you think?<br>
<br>
Regards,<br>
Michael<br>
<br>
<br>
<div class="moz-cite-prefix">Am 12.05.2013 14:30, schrieb Mark
Webb-Johnson:<br>
</div>
<blockquote
cite="mid:C5FBA660-517A-4C96-9544-82D6E4AEA331@webb-johnson.net"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
Michael,
<div><br>
</div>
<div>Should be ok. I think even the Tesla has these.</div>
<div><br>
</div>
<div>What variables do we need?</div>
<div><br>
</div>
<div>Regards, Mark.</div>
<div><br>
<div>
<div>On 11 May, 2013, at 10:52 PM, Michael Balzer <<a
moz-do-not-send="true" href="mailto:dexter@expeedo.de">dexter@expeedo.de</a>>
wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<div bgcolor="#FFFFFF" text="#000000"> Denis,<br>
<br>
thanks :-)<br>
<br>
The GPS logging feature and energy usage stats are
currently Twizy specific.<br>
<br>
To move these into the framework, we need to make the
energy usage variables part of the common car model. And
of course we need to know how to get these values from
other cars like Ampera...?<br>
<br>
Regards,<br>
Michael<br>
<br>
<br>
<div class="moz-cite-prefix">Am 11.05.2013 10:17, schrieb
Denis KRAUTH:<br>
</div>
<blockquote
cite="mid:518dfe8f.88d10e0a.7317.ffffe7cf@mx.google.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 12
(filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";
color:black;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"Préformaté HTML Car";
margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";
color:black;}
span.PrformatHTMLCar
{mso-style-name:"Préformaté HTML Car";
mso-style-priority:99;
mso-style-link:"Préformaté HTML";
font-family:Consolas;
color:black;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page Section1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.Section1
{page:Section1;}
-->
</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="Section1">
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Wow,
great !<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US">Can this be done on my Ampera too, or
is it Twizy-specific ?<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US">Can FEATURE 8 2 also be applied on my
2.3.2 Ampera firmware?<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US">There is a Volt/Ampera ecodrive
contest in a few days (June 1<sup>st</sup>) and
this would be really great to track the data.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US">I just read your german guide, and it
seems really not difficult.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US"> </span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US">Hut ab!<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US"> </span></p>
<div>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Denis.<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF
1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">De :</span></b><span
style="font-size:10.0pt;font-family:
"Tahoma","sans-serif";color:windowtext"> <a
moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:ovmsdev-bounces@lists.teslaclub.hk">ovmsdev-bounces@lists.teslaclub.hk</a>
[<a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="mailto:ovmsdev-bounces@lists.teslaclub.hk">mailto:ovmsdev-bounces@lists.teslaclub.hk</a>]
<b>De la part de</b> Michael Balzer<br>
<b>Envoyé :</b> vendredi 10 mai 2013 20:26<br>
<b>À :</b> 'OVMS Developers'<br>
<b>Objet :</b> [Ovmsdev] Twizy firmware image
V2.3.6 / 2.6.5<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">For those avoiding self-compiling
(Nikki et al), here's the current firmware image
with Twizy extensions.<br>
<br>
It makes GPS logging (RT-GPS-Log) at 5 second
intervals stable.<br>
<br>
To get max GPS precision be sure to activate only
the GPS logging (w/o location streaming) by setting
feature #8 to 2.<br>
<br>
The ZIP also contains a guide and spreadsheet
template for creating energy use heatmap-style GPS
tracks using <a moz-do-not-send="true"
href="http://gpsvisualizer.com">gpsvisualizer.com</a>
-- the guide text is in german now, I can make an
english version and add it to the repository if
there is demand.<br>
<br>
Here's an example result:<br>
<br>
<span><Mail Attachment.png></span><br>
<br>
Regards,<br>
Michael<br>
<br>
<br>
<o:p></o:p></p>
<pre>-- <o:p></o:p></pre>
<pre>Michael Balzer * Paradestr. 8 * D-42107 Wuppertal<o:p></o:p></pre>
<pre>Fon 0202 / 272 2201 * Handy 0176 / 206 989 26<o:p></o:p></pre>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
OvmsDev mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:OvmsDev@lists.teslaclub.hk">OvmsDev@lists.teslaclub.hk</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Michael Balzer * Paradestr. 8 * D-42107 Wuppertal
Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
</pre>
</div>
<span><dexter.vcf></span>_______________________________________________<br>
OvmsDev mailing list<br>
<a moz-do-not-send="true"
href="mailto:OvmsDev@lists.teslaclub.hk">OvmsDev@lists.teslaclub.hk</a><br>
<a class="moz-txt-link-freetext" href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a><br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
OvmsDev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OvmsDev@lists.teslaclub.hk">OvmsDev@lists.teslaclub.hk</a>
<a class="moz-txt-link-freetext" href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Michael Balzer * Paradestr. 8 * D-42107 Wuppertal
Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
</pre>
</body>
</html>