Path: csiph.com!weretis.net!feeder4.news.weretis.net!feeder5.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Karl Ratzsch Newsgroups: comp.graphics.apps.gnuplot Subject: Re: Ephemerides data Date: Sun, 20 Aug 2017 23:59:14 -0300 Organization: solani.org Lines: 63 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: solani.org 1503284354 28077 eJwNwoERwEAEBMCW+HMi5eDpv4RkdglX78ecbtxfk1WZ1ITNBCS2sV4i43fu2dRTgcCRsn4/LPwRfA== (21 Aug 2017 02:59:14 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Mon, 21 Aug 2017 02:59:14 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 X-NNTP-Posting-Host: eJwNyMkBwDAIA7CVAgEXj1Ou/Udo9ZRfCOoxOMzX99LCmNrUUfrU33NeGWgvt6KyeNiZGzK0DxhJEX4= In-Reply-To: Content-Language: de-DE-1901 Cancel-Lock: sha1:nLY4th7vrk5VydN7r2vw1x+rGe4= X-User-ID: eJwNwoERwCAIBLCVBJ5XxgGU/UdoL3GjsDfohM/vXEbayifEC0103VF3NJZYb5bjKCqyB7Y/F0oQzw== Xref: csiph.com comp.graphics.apps.gnuplot:3716 Am 20.08.2017 um 22:56 schrieb Karl Ratzsch: > Am 20.08.2017 um 10:36 schrieb robertvanpass@gmail.com: >> Hi, >> >> I have difficulties to plot ephemerides data. >> They are generated by SkytechX in the following format: >> >> Date;Time;Local R.A.;Local Dec.; >> 8/20/2017;12:00:00 UTC+1.0;10h 35m 50.60s;+03° 47' 15.38"; >> 8/21/2017;12:00:00 UTC+1.0;10h 33m 13.63s;+04° 02' 23.70"; >> 8/22/2017;12:00:00 UTC+1.0;10h 30m 23.99s;+04° 20' 34.64"; >> ... >> >> The column "Local R.A." is in time format: Hours Minits Seconds, >> should be converted to: Hours + Minits/60 + Seconds/3600. >> >> Column "Local Dec." is in angle format: Degrees Arcminits Arcseconds, >> should be converted to Degrees + Arcminits/60 + Arcseconds/3600. >> >> So the first record should become: >> 8/20/2017;12:00:00 UTC+1.0;10.587606;3.787606"; > > $dat << EOD > 8/20/2017;12:00:00 UTC+1.0;10h 35m 50.60s;+03° 47' 15.38"; > 8/21/2017;12:00:00 UTC+1.0;10h 33m 13.63s;+04° 02' 23.70"; > 8/22/2017;12:00:00 UTC+1.0;10h 30m 23.99s;+04° 20' 34.64"; > EOD > > set dataf sep "; \" > set table > > plot $dat us \ > (timecolumn(1,"%d/%m/%Y")):\ > (timecolumn(2,"%H:%M:%S")):\ > (timecolumn(4,"%Hh %Mm %Ss")/3600):\ > (($7+$8/60+$9/3600)) w table > > gives > > 1.53369e+009 43200 10.5974 3.78761 > 1.53636e+009 43200 10.5538 4.03992 > 1.53896e+009 43200 10.5067 4.34296 > > > This ignores the timezone specifier, I'm not sure how to catch that. Wasn't hard: set dataf sep "; " # the backslash was nonsense set table plot $dat us \ (timecolumn(1,"%d/%m/%Y")):\ (timecolumn(2,"%H:%M:%S")+strcol(3)[4:8]*3600):\ (timecolumn(4,"%Hh %Mm %Ss")/3600):\ (($7+$8/60+$9/3600)) w table Expects the format "UTC+x.y" or "UTC-x.y", anything else fails of course.