GAS Meter - How to program?

C

Chris

I would be grateful if anyone could help me with this problem,
perhaps by suggesting suitable freeware,
or maybe by pointing me to sources of help.

SITUATION: I take gas meter readings at random intervals;
sometimes seven days might elapse between readings,
sometimes seventeen.

REQUIREMENT: I want to know how much gas has been used in the year up to any
day.
The day might not be one on which I took a meter reading.
Also, the day 365 days before that might also be one for which the meter was
not read.
I would assume linear interpolation between two adjacent readings.

QUESTIONS: What would be the best way of doing this?
Spreadsheet?
Database?
Python or similar?
Anything else?
 
G

Grzegorz Rumatowski

Dnia Thu, 3 Nov 2005 06:45:47 -0000, Chris napisa³(a):
QUESTIONS: What would be the best way of doing this?
Spreadsheet?
Maybe

Database?

Overkill. Flat file is enough. If you would like use a DB, use SQLite
(www.sqlite.org)
Python or similar?

sed & awk are enough
Anything else?

You may look for some PHP scripts for a webbased interface for thing like
this.

HTH

Gregory
 
A

Al Klein

QUESTIONS: What would be the best way of doing this?

For your personal use?
.... On a desktop?
.... On a PDA?
For web use for others?

What the additional (if any) needs are will determine whether you need
anything more than a simple program or spreadsheet.
 
C

Chris

Al Klein said:
For your personal use? Yes.
... On a desktop? Yes. Or laptop :)
... On a PDA? Haven't got one.
For web use for others?
Others might find it useful.
Who knows what anything might lead to?
What the additional (if any) needs are will determine whether you need
anything more than a simple program or spreadsheet.

What I want to be able to do is to tell the gas company that in the 365
days up to a particular day I used a certain volume of gas.

It's amazingly easy to do with paper and pencil - but I thought it would
be a good use for the computer!

So let's consider the following scenario.
There are readings for these days:

Day number Meter reading
3 4993
13 5003
..
<snip - lots of other readings>
..
374 37900
379 38400

Now then, let's say I want the consumption for the 365 days ending on
day number 375.

I need the meter readings for day 375 and for day 10.

I can estimate those readings quite accurately by interpolating between
days 374 and 379 ... to get a reading for day 375
and also between days 3 and 13 ... to get a reading for day 10.

That will give me a reading of 38000 for day 375
and a reading of 5000 for day 10.

So my usage for the 365 days ending on day 375 is 33000 cubic metres.
 
A

Al Klein

Others might find it useful.
Who knows what anything might lead to?

What I want to be able to do is to tell the gas company that in the 365
days up to a particular day I used a certain volume of gas.

It's amazingly easy to do with paper and pencil - but I thought it would
be a good use for the computer!

So let's consider the following scenario.
There are readings for these days:

Day number Meter reading
3 4993
13 5003
.
<snip - lots of other readings>
.
374 37900
379 38400

Now then, let's say I want the consumption for the 365 days ending on
day number 375.

I need the meter readings for day 375 and for day 10.

I can estimate those readings quite accurately by interpolating between
days 374 and 379 ... to get a reading for day 375
and also between days 3 and 13 ... to get a reading for day 10.

That will give me a reading of 38000 for day 375
and a reading of 5000 for day 10.

So my usage for the 365 days ending on day 375 is 33000 cubic metres.

Trivial programming. Slightly less than trivial, but not difficult,
spreadsheet design. If you know how to do it (including the
interpolation) on paper - which it seems you do.

But you're assuming the gas company will accept your assumption of
linear usage. (Not that it would make all that much difference. If
you had readings for day 9 and day 380, the difference in money
between the 365 days you want and the 370 days you have probably
wouldn't amount to more than a few pennies.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top