emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Solar orbit statistics and your agenda
@ 2018-11-07 13:58 Eric S Fraga
  2018-11-20 19:12 ` Alan E. Davis
  0 siblings, 1 reply; 8+ messages in thread
From: Eric S Fraga @ 2018-11-07 13:58 UTC (permalink / raw)
  To: emacs-orgmode

Time for a very geeky post...

Recently, on the remind (diary tool I used to use) mailing list,
somebody posted a script for converting solar data (perihelion, equinox,
...) to remind input.  I've done the same for org so if you're
interested in that kind of information and want your agenda to show
this, here is the script:

#+begin_src shell :results output raw
  tmpfile=$(mktemp /tmp/date.XXXXXX)
  for year in $(seq 2018 2068)
  do
      links http://aa.usno.navy.mil/seasons?year=${year} -dump | \
          grep -E 'helion|quinox|olstice' > ${tmpfile}
      while read -r line
      do
          item=$(echo $line | awk '{print $1}')
          date="$(echo $line | awk '{print $5 " " $4 " " $3}') ${year}"
          isodate=$(date --date="${date}" +"%Y-%m-%d %H:%M")
          echo "** <${isodate}> $item"
      done < ${tmpfile}
  done
  rm ${tmpfile}
#+end_src

Notes:

1. this is for Linux and assumes bash as the shell.
2. the default is UTC (and this is where I wish org supported time
   zones...).
3. I believe the URL for the US Naval Observatory in the code above
   accepts "?tz=N?dst=M" for different time zones (some index N) and
   daylight savings options (M set to 0 or 1 maybe?) but I haven't
   played with these options.
4. you will need to install "links".

Enjoy but use at own risk etc. ;-)

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.1.11-620-ga548e4

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Solar orbit statistics and your agenda
  2018-11-07 13:58 Solar orbit statistics and your agenda Eric S Fraga
@ 2018-11-20 19:12 ` Alan E. Davis
  2018-11-21  6:41   ` Eric S Fraga
  0 siblings, 1 reply; 8+ messages in thread
From: Alan E. Davis @ 2018-11-20 19:12 UTC (permalink / raw)
  To: org-mode

[-- Attachment #1: Type: text/plain, Size: 2350 bytes --]

Eric:

This is extremely useful.   I found some documentation on the site, re the
API.  I am way over my head here, but I need (for one) data on Lunar
Declination over, say, a year, but really month-by-month.  Is there a "for
Dummies" to get this data off of this server?  A cookbook?  Can I do
something like this?

grep -E 'oon&&eclin' >${tmpfile}

?

Thank you again.





On Wed, Nov 7, 2018 at 5:59 AM Eric S Fraga <esflists@gmail.com> wrote:

> Time for a very geeky post...
>
> Recently, on the remind (diary tool I used to use) mailing list,
> somebody posted a script for converting solar data (perihelion, equinox,
> ...) to remind input.  I've done the same for org so if you're
> interested in that kind of information and want your agenda to show
> this, here is the script:
>
> #+begin_src shell :results output raw
>   tmpfile=$(mktemp /tmp/date.XXXXXX)
>   for year in $(seq 2018 2068)
>   do
>       links http://aa.usno.navy.mil/seasons?year=${year} -dump | \
>           grep -E 'helion|quinox|olstice' > ${tmpfile}
>       while read -r line
>       do
>           item=$(echo $line | awk '{print $1}')
>           date="$(echo $line | awk '{print $5 " " $4 " " $3}') ${year}"
>           isodate=$(date --date="${date}" +"%Y-%m-%d %H:%M")
>           echo "** <${isodate}> $item"
>       done < ${tmpfile}
>   done
>   rm ${tmpfile}
> #+end_src
>
> Notes:
>
> 1. this is for Linux and assumes bash as the shell.
> 2. the default is UTC (and this is where I wish org supported time
>    zones...).
> 3. I believe the URL for the US Naval Observatory in the code above
>    accepts "?tz=N?dst=M" for different time zones (some index N) and
>    daylight savings options (M set to 0 or 1 maybe?) but I haven't
>    played with these options.
> 4. you will need to install "links".
>
> Enjoy but use at own risk etc. ;-)
>
> --
> Eric S Fraga via Emacs 27.0.50, Org release_9.1.11-620-ga548e4
>
>

-- 
[Fill in the blanks]

The use of corrupt manipulations and blatant rhetorical ploys ...---
outright lying, flagwaving, personal attacks, setting up phony
alternatives, misdirection, jargon-mongering, evading key issues, feigning
disinterested objectivity, willful misunderstanding of other points of
view---suggests that ... lacks both credibility and evidence.

             ---- Edward Tufte (in context of making presentations)

[-- Attachment #2: Type: text/html, Size: 3769 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Solar orbit statistics and your agenda
  2018-11-20 19:12 ` Alan E. Davis
@ 2018-11-21  6:41   ` Eric S Fraga
  2018-11-21  9:24     ` Alan E. Davis
  0 siblings, 1 reply; 8+ messages in thread
From: Eric S Fraga @ 2018-11-21  6:41 UTC (permalink / raw)
  To: Alan E. Davis; +Cc: org-mode

On Tuesday, 20 Nov 2018 at 11:12, Alan E. Davis wrote:
> Eric:
>
> This is extremely useful.   

Glad you liked it.  Strangely enough, they seem to have changed the
format of output (now sending json) so the script no longer works.

> I found some documentation on the site, re the API.

What is the link for the API information?  With that, I may be able to
help answer your question about getting lunar declination data off the
server.

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.1.14-1035-gfeb442

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Solar orbit statistics and your agenda
  2018-11-21  6:41   ` Eric S Fraga
@ 2018-11-21  9:24     ` Alan E. Davis
  2018-11-21 10:55       ` Eric S Fraga
  0 siblings, 1 reply; 8+ messages in thread
From: Alan E. Davis @ 2018-11-21  9:24 UTC (permalink / raw)
  To: org-mode


[-- Attachment #1.1: Type: text/plain, Size: 1527 bytes --]

I will search for the API page later.  It seems to me that the site was not
behaving normally today, and I struggled to find that page.  I may have
printed it!

Meanwhile, I was able to use a part of the script to get sun information,
but nothing for the moon?   I wanted to get series of declinations through
the month.  Attached is the test script I used, and it worked even when I
could not locate the pages any other way!

The same thing for :erigee" did not work.

Alan Davis

On Tue, Nov 20, 2018 at 10:41 PM Eric S Fraga <esflists@gmail.com> wrote:

> On Tuesday, 20 Nov 2018 at 11:12, Alan E. Davis wrote:
> > Eric:
> >
> > This is extremely useful.
>
> Glad you liked it.  Strangely enough, they seem to have changed the
> format of output (now sending json) so the script no longer works.
>
> > I found some documentation on the site, re the API.
>
> What is the link for the API information?  With that, I may be able to
> help answer your question about getting lunar declination data off the
> server.
>
> --
> Eric S Fraga via Emacs 27.0.50, Org release_9.1.14-1035-gfeb442
>


-- 
[Fill in the blanks]

The use of corrupt manipulations and blatant rhetorical ploys ...---
outright lying, flagwaving, personal attacks, setting up phony
alternatives, misdirection, jargon-mongering, evading key issues, feigning
disinterested objectivity, willful misunderstanding of other points of
view---suggests that ... lacks both credibility and evidence.

             ---- Edward Tufte (in context of making presentations)

[-- Attachment #1.2: Type: text/html, Size: 2403 bytes --]

[-- Attachment #2: Perihelion-test-info.sh --]
[-- Type: application/x-shellscript, Size: 496 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Solar orbit statistics and your agenda
  2018-11-21  9:24     ` Alan E. Davis
@ 2018-11-21 10:55       ` Eric S Fraga
  2018-11-21 19:04         ` Alan E. Davis
  0 siblings, 1 reply; 8+ messages in thread
From: Eric S Fraga @ 2018-11-21 10:55 UTC (permalink / raw)
  To: Alan E. Davis; +Cc: org-mode

On Wednesday, 21 Nov 2018 at 01:24, Alan E. Davis wrote:
> Meanwhile, I was able to use a part of the script to get sun information,
> but nothing for the moon?   

I did not see anything related to lunar data.  Maybe elsewhere on the site?
-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.1.14-1034-gafcb1d

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Solar orbit statistics and your agenda
  2018-11-21 10:55       ` Eric S Fraga
@ 2018-11-21 19:04         ` Alan E. Davis
  2018-11-28  7:08           ` Alan E. Davis
  0 siblings, 1 reply; 8+ messages in thread
From: Alan E. Davis @ 2018-11-21 19:04 UTC (permalink / raw)
  To: org-mode

[-- Attachment #1: Type: text/plain, Size: 1263 bytes --]

Hello, Eric:

Since I don't need to automate anything or directly pipe the data into any
other processes, I have taken a leap of faith and used the JPL Horizons
Ephemeris Web interface to generate an ephemeris for the Moon's (they say
"Luna"---nice!) declination.  This I can edit wtih Emacs to get the data I
need.

Had I time enough, it would be cool to interface that in a more interesting
way.

Thank you for the advice.

Alan

On Wed, Nov 21, 2018 at 2:55 AM Eric S Fraga <esflists@gmail.com> wrote:

> On Wednesday, 21 Nov 2018 at 01:24, Alan E. Davis wrote:
> > Meanwhile, I was able to use a part of the script to get sun information,
> > but nothing for the moon?
>
> I did not see anything related to lunar data.  Maybe elsewhere on the site?
> --
> Eric S Fraga via Emacs 27.0.50, Org release_9.1.14-1034-gafcb1d
>


-- 
[Fill in the blanks]

The use of corrupt manipulations and blatant rhetorical ploys ...---
outright lying, flagwaving, personal attacks, setting up phony
alternatives, misdirection, jargon-mongering, evading key issues, feigning
disinterested objectivity, willful misunderstanding of other points of
view---suggests that ... lacks both credibility and evidence.

             ---- Edward Tufte (in context of making presentations)

[-- Attachment #2: Type: text/html, Size: 2154 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Solar orbit statistics and your agenda
  2018-11-21 19:04         ` Alan E. Davis
@ 2018-11-28  7:08           ` Alan E. Davis
  2018-11-28 15:12             ` Eric S Fraga
  0 siblings, 1 reply; 8+ messages in thread
From: Alan E. Davis @ 2018-11-28  7:08 UTC (permalink / raw)
  To: org-mode

[-- Attachment #1: Type: text/plain, Size: 2151 bytes --]

Eric:

I was able to access the API docs (requiring, with my Firefox, to accept a
security exception.)

https://aa.usno.navy.mil/data/docs/api.php

I have to move on.  I have found that XEphem's Moon declination output is
excellent, so I only have to convert the time format.

Thank you for your help,

Alan

On Wed, Nov 21, 2018 at 11:04 AM Alan E. Davis <lngndvs@gmail.com> wrote:

> Hello, Eric:
>
> Since I don't need to automate anything or directly pipe the data into any
> other processes, I have taken a leap of faith and used the JPL Horizons
> Ephemeris Web interface to generate an ephemeris for the Moon's (they say
> "Luna"---nice!) declination.  This I can edit wtih Emacs to get the data I
> need.
>
> Had I time enough, it would be cool to interface that in a more
> interesting way.
>
> Thank you for the advice.
>
> Alan
>
> On Wed, Nov 21, 2018 at 2:55 AM Eric S Fraga <esflists@gmail.com> wrote:
>
>> On Wednesday, 21 Nov 2018 at 01:24, Alan E. Davis wrote:
>> > Meanwhile, I was able to use a part of the script to get sun
>> information,
>> > but nothing for the moon?
>>
>> I did not see anything related to lunar data.  Maybe elsewhere on the
>> site?
>> --
>> Eric S Fraga via Emacs 27.0.50, Org release_9.1.14-1034-gafcb1d
>>
>
>
> --
> [Fill in the blanks]
>
> The use of corrupt manipulations and blatant rhetorical ploys ...---
> outright lying, flagwaving, personal attacks, setting up phony
> alternatives, misdirection, jargon-mongering, evading key issues, feigning
> disinterested objectivity, willful misunderstanding of other points of
> view---suggests that ... lacks both credibility and evidence.
>
>              ---- Edward Tufte (in context of making presentations)
>
>
>


-- 
[Fill in the blanks]

The use of corrupt manipulations and blatant rhetorical ploys ...---
outright lying, flagwaving, personal attacks, setting up phony
alternatives, misdirection, jargon-mongering, evading key issues, feigning
disinterested objectivity, willful misunderstanding of other points of
view---suggests that ... lacks both credibility and evidence.

             ---- Edward Tufte (in context of making presentations)

[-- Attachment #2: Type: text/html, Size: 3987 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Solar orbit statistics and your agenda
  2018-11-28  7:08           ` Alan E. Davis
@ 2018-11-28 15:12             ` Eric S Fraga
  0 siblings, 0 replies; 8+ messages in thread
From: Eric S Fraga @ 2018-11-28 15:12 UTC (permalink / raw)
  To: Alan E. Davis; +Cc: org-mode

On Tuesday, 27 Nov 2018 at 23:08, Alan E. Davis wrote:
> Eric:
>
> I was able to access the API docs (requiring, with my Firefox, to
> accept a security exception.)
>
> https://aa.usno.navy.mil/data/docs/api.php

Very useful.  Thanks.  With wget, I had to add --no-check-certificate to get anywhere.  Now just need to write some code to interpret the JSON output!

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.1.14-1035-gfeb442

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-11-28 15:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-07 13:58 Solar orbit statistics and your agenda Eric S Fraga
2018-11-20 19:12 ` Alan E. Davis
2018-11-21  6:41   ` Eric S Fraga
2018-11-21  9:24     ` Alan E. Davis
2018-11-21 10:55       ` Eric S Fraga
2018-11-21 19:04         ` Alan E. Davis
2018-11-28  7:08           ` Alan E. Davis
2018-11-28 15:12             ` Eric S Fraga

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).