Re: [fpc-pascal] convert "epoch" to UTC

2012-01-16 Thread waldo kitty
On 1/16/2012 14:49, Sven Barth wrote: On 16.01.2012 20:06, waldo kitty wrote: with this TLE epoch number, 12013.93338171, ya feed it like so... var JEpoch : double; DT : TDateTime; [...] JEpoch := getJulianDay_SatEpoch(12,013.93338171); [...] if TryJulianDateToDateTime(JEpoch,DT) then writeln(

[fpc-pascal] Would someone be willing to build the skeleton of a simple application for me?

2012-01-16 Thread hdv . jadev
Hi, I am not really sure if this type of message is appreciated on this list or not. I tried looking it up on the Lazarus-site, but didn't find anything on it. My apologies if you think I shouldn't have sent this. Quite a few years ago I was a reasonably decent Delphi programmer. But after my

Re: [fpc-pascal] tthread.waitfor with timeout

2012-01-16 Thread Jonas Maebe
On 16 Jan 2012, at 22:25, Jorge Aldo G. de F. Junior wrote: > is there a way to do the equivalent of waifor but with some kind of timeout ? No. And at least the Unix pthreads library does not offer such an API, so it can't be added without some kind of emulation either (adding an extra event pe

[fpc-pascal] tthread.waitfor with timeout

2012-01-16 Thread Jorge Aldo G. de F. Junior
hi ! while working on my pascal actor model concurrency framework i hit a problem with the way tthread is currently implemented. i need to quit all actors (threads) before closing the main application. this is done by waitfor/free each actor until none is left in the pool of locally running actor

Re: [fpc-pascal] convert "epoch" to UTC

2012-01-16 Thread Mark Morgan Lloyd
waldo kitty wrote: Don't know whether any of this will help that actually looks very similar to some of my old TP/BP 6/7 time libraries that i created because there was not much available out there when i needed it... the one part that hit me the most was that the fractional days stuff is l

Re: [fpc-pascal] convert "epoch" to UTC

2012-01-16 Thread Sven Barth
On 16.01.2012 20:06, waldo kitty wrote: with this TLE epoch number, 12013.93338171, ya feed it like so... var JEpoch : double; DT : TDateTime; [...] JEpoch := getJulianDay_SatEpoch(12,013.93338171); [...] if TryJulianDateToDateTime(JEpoch,DT) then writeln(FormatDateTime(' MM DD hh:mm:ss',DT

Re: [fpc-pascal] convert "epoch" to UTC

2012-01-16 Thread waldo kitty
On 1/16/2012 13:38, Mark Morgan Lloyd wrote: waldo kitty wrote: i think i might be able to do something with the JulianToDateTime once i get the base year portion converted to a true julian... i spotted some C# code while doing a bit of research earlier (see below)... it appears to convert the

Re: [fpc-pascal] convert "epoch" to UTC

2012-01-16 Thread waldo kitty
On 1/16/2012 12:54, Ralf A. Quint wrote: At 09:40 AM 1/16/2012, Sven Barth wrote: Well... I would say the same as FPC's "floor" routine ( http://www.freepascal.org/docs-html/rtl/math/floor.html ) does ;) Well... someone might want to check the example for that function ;) +1 especially sinc

Re: [fpc-pascal] convert "epoch" to UTC

2012-01-16 Thread waldo kitty
On 1/16/2012 12:40, Sven Barth wrote: On 16.01.2012 17:57, waldo kitty wrote: [TRIM] looks like it should be easy to convert to pascal, too ;) just gotta find out what that "floor" routine does ;) Well... I would say the same as FPC's "floor" routine ( http://www.freepascal.org/docs-html/rtl/

Re: [fpc-pascal] convert "epoch" to UTC

2012-01-16 Thread Mark Morgan Lloyd
waldo kitty wrote: i think i might be able to do something with the JulianToDateTime once i get the base year portion converted to a true julian... i spotted some C# code while doing a bit of research earlier (see below)... it appears to convert the year to a julian year and then add the decim

Re: [fpc-pascal] convert "epoch" to UTC

2012-01-16 Thread Ralf A. Quint
At 09:40 AM 1/16/2012, Sven Barth wrote: Well... I would say the same as FPC's "floor" routine ( http://www.freepascal.org/docs-html/rtl/math/floor.html ) does ;) Well... someone might want to check the example for that function ;) Ralf ___ fpc-pa

Re: [fpc-pascal] convert "epoch" to UTC

2012-01-16 Thread Sven Barth
On 16.01.2012 17:57, waldo kitty wrote: Especially you can try JulianToDateTime and UnixToDateTime. Both return a TDateTime which you can convert to a string using FormatDateTime ( http://www.freepascal.org/docs-html/rtl/sysutils/datetimetostring.html ) or DateTimeToStr ( http://www.freepascal.or

Re: [fpc-pascal] Re: convert "epoch" to UTC

2012-01-16 Thread waldo kitty
On 1/16/2012 10:00, Jeff Wormsley wrote: I went here: http://www.satellite-calculations.com/TLETracker/SatTracker.htm funny thing, that! when i woke up this morning and went researching, that was the first site that uncle google showed me, too :lol: It had the TLE for Galaxy 15 as follows:

Re: [fpc-pascal] convert "epoch" to UTC (waldo kitty)

2012-01-16 Thread waldo kitty
On 1/16/2012 09:44, edgar jordan wrote: 12 == 2012 013 == 13th day of the year .9338171 * 24 == 22.4116104 hours i typoed the above... it should be .93338171 * 24 == 22.40116104 hours .4114104 * 60 == 24.696624 minutes so this becomes .40116104 * 60 == 24.0696624 minutes which then leads

Re: [fpc-pascal] convert "epoch" to UTC

2012-01-16 Thread waldo kitty
On 1/16/2012 06:22, Sven Barth wrote: Am 16.01.2012 04:10 schrieb "waldo kitty" > > > i'm needing to convert a "UTC epoch" date to a "standard time string"... by > that, i mean that i want to get something like "2011-01-13 22:24:04" out of > the "epoch" number 12013.9338171... TYPO ALERT!

Re: [fpc-pascal] Re: convert "epoch" to UTC

2012-01-16 Thread Jeff Wormsley
I went here: http://www.satellite-calculations.com/TLETracker/SatTracker.htm It had the TLE for Galaxy 15 as follows: GALAXY 15 1 28884U 05041A 10133.62484064 .0085 0-0 1-3 0 8291 2 28884 000.1391 078.0756 0002640 331.8937 274.1784 01.00285599 16790 And did these calculations

[fpc-pascal] convert "epoch" to UTC (waldo kitty)

2012-01-16 Thread edgar jordan
12 == 2012 013 == 13th day of the year .9338171 * 24 == 22.4116104 hours .4114104 * 60 == 24.696624 minutes The decimal portion of hours doesn't match the one multiplied by 60. I just thought it's the one causing the discrepancy. ___ fpc-pascal maillist

Re: [fpc-pascal] Postscriptcanvas

2012-01-16 Thread David Copeland
This would be for printing. -Original Message- From: Felipe Monteiro de Carvalho Reply-to: FPC-Pascal users discussions To: FPC-Pascal users discussions Subject: Re: [fpc-pascal] Postscriptcanvas Date: Sun, 15 Jan 2012 13:11:13 -0200 On Fri, Jan 13, 2012 at 3:31 PM, David Copeland wr

[fpc-pascal] Re: convert "epoch" to UTC

2012-01-16 Thread Lukasz Sokol
On 16/01/2012 03:09, waldo kitty wrote: > > i'm needing to convert a "UTC epoch" date to a "standard time > string"... by that, i mean that i want to get something like > "2011-01-13 22:24:04" out of the "epoch" number 12013.9338171... > > the above "epoch" number is (supposedly) built like this.

Re: [fpc-pascal] convert "epoch" to UTC

2012-01-16 Thread Sven Barth
Am 16.01.2012 04:10 schrieb "waldo kitty" : > > > i'm needing to convert a "UTC epoch" date to a "standard time string"... by that, i mean that i want to get something like "2011-01-13 22:24:04" out of the "epoch" number 12013.9338171... > > the above "epoch" number is (supposedly) built like this.