Menu

#2 Calculation of costs failed

open
nobody
None
5
2005-11-06
2005-11-06
No

Hi!

There is a bug in billig_surfen_handler.gawk, but I
have not
enough knowledge of gawk to solve it.

If the cost of a provider in colum 1-3 (2,5 15 60 min)
is under 1 ct/min, the calculation in line 255 of
billig_surfen_handler.gawk will fail, costs will be 0c/min.
That would be cool. ;-)

I added debugging lines before and after:
...
info( "+++DEBUG: provc '" prov["c"] "' , provcc '"
prov["cc"] "' MAGIC '"MAGIC[tC,prov["t"]] "'. ");
prov["c"] = (prov["c"] - prov["cc"]) / MAGIC[tC,prov["t"]];
info( "+++DEBUG: provc '" prov["c"] "' , provcc '"
prov["cc"] "' MAGIC '"MAGIC[tC,prov["t"]] "'. ");
...

This gives in the log file:
...
INFO: cost: 0.98
INFO: cost_unit: c/min
INFO: takt: 60
INFO: ConnCost: 0.00 c
INFO: P-Url:
http://www.billiger-surfen.de/anbieter.php3?name=meOme
INFO: Provider: meOme
INFO: T-Url:
http://www.billiger-surfen.de/tarifmodelle.php3?name=meOme&verbindungsnbz=aktiv9&gueltigab=2005-11-03&g
ueltigbis=gueltigbis
INFO: Tarif: aktiv9
INFO: Username: frei wählbar
INFO: Password: nicht leer
INFO: Number: 019285530
INFO: +++DEBUG: provc '0.98' , provcc '0.00' MAGIC '3,5'.
INFO: +++DEBUG: provc '0' , provcc '0.00' MAGIC '3,5'.
...

Another question is for me, how you defined the MAGIC
values?

E.g. MAGIC[1,1] = 3.0; should be [1,1] = 2.5; because
2,5 min on 1sec interval
and MAGIC[1,60] = 3.5; should be MAGIC[1,60] = 3.0;
because 2,5 min on 3x1min interval
and so on.

Why did you have other MAGICs?

Kindly regards,
Erik

Discussion


Log in to post a comment.

MongoDB Logo MongoDB