Re: [weewx-user] Re: Pyehpem and International Space Station

2020-02-11 Thread Kevin Davis
Ugh, duh.  Thanks.

On Tue, Feb 11, 2020 at 12:48 PM Glenn McKechnie 
wrote:

> pass is a reserved word. It's a statement with a meaning of its own so
> the python interpretor does not understand its use as a variable name.
>
> Rename it to something else -   iss_pass  ?
>
> On 12/02/2020, Kevin Davis  wrote:
> > What am I missing here?
> >
> > String in my iss_all.json file:
> > #set global $iss_all = [["Tue Feb 11 10:54 am","SW/10","NE/9","69","6min
> > 45sec"],["Tue Feb 11 12:31 pm","W/10","NE/9","33","6min 16sec"],["Tue Feb
> > 11 02:09 pm","WNW/10","ENE/9","28","6min 3sec"],["Tue Feb 11 03:46
> > pm","WNW/10","E/9","72","6min 46sec"],["Tue Feb 11 05:23
> > pm","W/10","SSE/9","19","5min 0sec"],["Wed Feb 12 10:07
> > am","SSW/10","ENE/9","43","6min 24sec"],["Wed Feb 12 11:44
> > am","WSW/10","NE/9","41","6min 29sec"],["Wed Feb 12 01:21
> > pm","WNW/10","NE/9","27","5min 57sec"],["Wed Feb 12 02:58
> > pm","WNW/10","E/9","51","6min 38sec"],["Wed Feb 12 04:35
> > pm","W/10","SE/9","30","6min 9sec"],["Thu Feb 13 09:20
> > am","S/11","ENE/9","27","5min 40sec"],["Thu Feb 13 10:56
> > am","WSW/10","NE/9","54","6min 41sec"],["Thu Feb 13 12:33
> > pm","WNW/10","NE/9","27","5min 58sec"],["Thu Feb 13 02:10
> > pm","WNW/10","ENE/9","39","6min 27sec"],["Thu Feb 13 03:47
> > pm","W/10","SE/9","47","6min 38sec"],["Fri Feb 14 08:33
> > am","SSE/10","E/9","17","4min 39sec"],["Fri Feb 14 10:08
> > am","SW/10","NE/9","78","6min 47sec"],["Fri Feb 14 11:46
> > am","W/10","NE/9","29","6min 4sec"],["Fri Feb 14 01:23
> > pm","WNW/10","ENE/9","32","6min 12sec"],["Fri Feb 14 03:00
> > pm","WNW/10","ESE/9","76","6min 47sec"],["Fri Feb 14 04:38
> > pm","WSW/10","S/9","12","2min 53sec"],["Sat Feb 15 07:47
> > am","SE/10","ESE/9","10","1min 39sec"],["Sat Feb 15 09:20
> > am","SW/10","NE/9","69","6min 44sec"],["Sat Feb 15 10:58
> > am","W/10","NE/9","33","6min 16sec"],["Sat Feb 15 12:35
> > pm","WNW/10","ENE/9","28","6min 3sec"],["Sat Feb 15 02:12
> > pm","WNW/10","E/9","72","6min 47sec"],["Sat Feb 15 03:49
> > pm","W/10","SSE/9","19","5min 0sec"],["Sun Feb 16 08:33
> > am","SSW/10","ENE/9","43","6min 23sec"],["Sun Feb 16 10:10
> > am","WSW/10","NE/9","41","6min 28sec"]]
> >
> > From my iss.inc template
> >   
> > 
> > Start Time
> > Rise
> > Set
> > Max
> > Length of Pass
> > 
> > #include "iss_all.json"
> > #for $pass in $iss_all
> > 
> > $pass[0]
> > $pass[1]
> > $pass[2]
> > $pass[3]
> > $pass[4]
> > 
> > #end for
> >   
> >
> >
> > My error:
> > Feb 11 10:23:02 corbett wee_reports[31488]:   Traceback (most recent
> > call last):
> > Feb 11 10:23:02 corbett wee_reports[31488]: File
> > "/usr/share/weewx/weewx/cheetahgenerator.py", line 332, in generate
> > Feb 11 10:23:02 corbett wee_reports[31488]: 
> >  fd.write(str(compiled_template))
> > Feb 11 10:23:02 corbett wee_reports[31488]: File
> > "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1005, in
> > __str__
> > Feb 11 10:23:02 corbett wee_reports[31488]:   rc = getattr(self,
> > mainMethName)()
> > Feb 11 10:23:02 corbett wee_reports[31488]: File
> > "_etc_weewx_skins_Seasons_index_html_tmpl.py", line 258, in respond
> > Feb 11 10:23:02 corbett wee_reports[31488]: File
> > "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1597, in
> > _handleCheetahInclude
> > Feb 11 10:23:02 corbett wee_reports[31488]: 
> nestedTemplateClass =
> > compiler.compile(source=source, file=file)
> > Feb 11 10:23:02 corbett wee_reports[31488]: File
> > "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 796, in
> > compile
> > Feb 11 10:23:02 corbett wee_reports[31488]:   raise e
> > Feb 11 10:23:02 corbett wee_reports[31488]: File
> > "_etc_weewx_skins_Seasons_iss_incwk.py", line 144
> > Feb 11 10:23:02 corbett wee_reports[31488]:   for pass in
> > VFFSL(SL,"iss_all",True): # generated from line 21, col 2
> > Feb 11 10:23:02 corbett wee_reports[31488]:  ^
> > Feb 11 10:23:02 corbett wee_reports[31488]:   SyntaxError: invalid
> > syntax
> >
> > On Mon, Feb 10, 2020 at 9:43 AM Kevin Davis  wrote:
> >
> >> Very cool.  Thanks for the input.   Certainly helps me to see a working
> >> example!
> >>
> >> On Mon, Feb 10, 2020 at 9:40 AM Walter Smith  wrote:
> >>
> >>> Doing something very similar.  Cron job at midnight, Python script to
> >>> format a list of stuff from Skyfield I want to display in my template.
> >>> Prefix the list with a "#set global" line:
> >>>
> >>> with open('skyprint2A.txt','w') as f3:
> >>>f3.write('#set global $skytext2 = ')
> >>>json.dump(l_out_lines_txt, f3)
> >>>
> >>> which gives a file containing:
> >>>
> >>> #set global $skytext2 = [["Mon Feb 10", "06:57 AM", "Sun Rises 01:08
> >>> earlier Length of Day 10:30:46 02:19 

Re: [weewx-user] Re: Pyehpem and International Space Station

2020-02-11 Thread Glenn McKechnie
pass is a reserved word. It's a statement with a meaning of its own so
the python interpretor does not understand its use as a variable name.

Rename it to something else -   iss_pass  ?

On 12/02/2020, Kevin Davis  wrote:
> What am I missing here?
>
> String in my iss_all.json file:
> #set global $iss_all = [["Tue Feb 11 10:54 am","SW/10","NE/9","69","6min
> 45sec"],["Tue Feb 11 12:31 pm","W/10","NE/9","33","6min 16sec"],["Tue Feb
> 11 02:09 pm","WNW/10","ENE/9","28","6min 3sec"],["Tue Feb 11 03:46
> pm","WNW/10","E/9","72","6min 46sec"],["Tue Feb 11 05:23
> pm","W/10","SSE/9","19","5min 0sec"],["Wed Feb 12 10:07
> am","SSW/10","ENE/9","43","6min 24sec"],["Wed Feb 12 11:44
> am","WSW/10","NE/9","41","6min 29sec"],["Wed Feb 12 01:21
> pm","WNW/10","NE/9","27","5min 57sec"],["Wed Feb 12 02:58
> pm","WNW/10","E/9","51","6min 38sec"],["Wed Feb 12 04:35
> pm","W/10","SE/9","30","6min 9sec"],["Thu Feb 13 09:20
> am","S/11","ENE/9","27","5min 40sec"],["Thu Feb 13 10:56
> am","WSW/10","NE/9","54","6min 41sec"],["Thu Feb 13 12:33
> pm","WNW/10","NE/9","27","5min 58sec"],["Thu Feb 13 02:10
> pm","WNW/10","ENE/9","39","6min 27sec"],["Thu Feb 13 03:47
> pm","W/10","SE/9","47","6min 38sec"],["Fri Feb 14 08:33
> am","SSE/10","E/9","17","4min 39sec"],["Fri Feb 14 10:08
> am","SW/10","NE/9","78","6min 47sec"],["Fri Feb 14 11:46
> am","W/10","NE/9","29","6min 4sec"],["Fri Feb 14 01:23
> pm","WNW/10","ENE/9","32","6min 12sec"],["Fri Feb 14 03:00
> pm","WNW/10","ESE/9","76","6min 47sec"],["Fri Feb 14 04:38
> pm","WSW/10","S/9","12","2min 53sec"],["Sat Feb 15 07:47
> am","SE/10","ESE/9","10","1min 39sec"],["Sat Feb 15 09:20
> am","SW/10","NE/9","69","6min 44sec"],["Sat Feb 15 10:58
> am","W/10","NE/9","33","6min 16sec"],["Sat Feb 15 12:35
> pm","WNW/10","ENE/9","28","6min 3sec"],["Sat Feb 15 02:12
> pm","WNW/10","E/9","72","6min 47sec"],["Sat Feb 15 03:49
> pm","W/10","SSE/9","19","5min 0sec"],["Sun Feb 16 08:33
> am","SSW/10","ENE/9","43","6min 23sec"],["Sun Feb 16 10:10
> am","WSW/10","NE/9","41","6min 28sec"]]
>
> From my iss.inc template
>   
> 
> Start Time
> Rise
> Set
> Max
> Length of Pass
> 
> #include "iss_all.json"
> #for $pass in $iss_all
> 
> $pass[0]
> $pass[1]
> $pass[2]
> $pass[3]
> $pass[4]
> 
> #end for
>   
>
>
> My error:
> Feb 11 10:23:02 corbett wee_reports[31488]:   Traceback (most recent
> call last):
> Feb 11 10:23:02 corbett wee_reports[31488]: File
> "/usr/share/weewx/weewx/cheetahgenerator.py", line 332, in generate
> Feb 11 10:23:02 corbett wee_reports[31488]: 
>  fd.write(str(compiled_template))
> Feb 11 10:23:02 corbett wee_reports[31488]: File
> "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1005, in
> __str__
> Feb 11 10:23:02 corbett wee_reports[31488]:   rc = getattr(self,
> mainMethName)()
> Feb 11 10:23:02 corbett wee_reports[31488]: File
> "_etc_weewx_skins_Seasons_index_html_tmpl.py", line 258, in respond
> Feb 11 10:23:02 corbett wee_reports[31488]: File
> "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1597, in
> _handleCheetahInclude
> Feb 11 10:23:02 corbett wee_reports[31488]:   nestedTemplateClass =
> compiler.compile(source=source, file=file)
> Feb 11 10:23:02 corbett wee_reports[31488]: File
> "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 796, in
> compile
> Feb 11 10:23:02 corbett wee_reports[31488]:   raise e
> Feb 11 10:23:02 corbett wee_reports[31488]: File
> "_etc_weewx_skins_Seasons_iss_incwk.py", line 144
> Feb 11 10:23:02 corbett wee_reports[31488]:   for pass in
> VFFSL(SL,"iss_all",True): # generated from line 21, col 2
> Feb 11 10:23:02 corbett wee_reports[31488]:  ^
> Feb 11 10:23:02 corbett wee_reports[31488]:   SyntaxError: invalid
> syntax
>
> On Mon, Feb 10, 2020 at 9:43 AM Kevin Davis  wrote:
>
>> Very cool.  Thanks for the input.   Certainly helps me to see a working
>> example!
>>
>> On Mon, Feb 10, 2020 at 9:40 AM Walter Smith  wrote:
>>
>>> Doing something very similar.  Cron job at midnight, Python script to
>>> format a list of stuff from Skyfield I want to display in my template.
>>> Prefix the list with a "#set global" line:
>>>
>>> with open('skyprint2A.txt','w') as f3:
>>>f3.write('#set global $skytext2 = ')
>>>json.dump(l_out_lines_txt, f3)
>>>
>>> which gives a file containing:
>>>
>>> #set global $skytext2 = [["Mon Feb 10", "06:57 AM", "Sun Rises 01:08
>>> earlier Length of Day 10:30:46 02:19 longer"], ["Mon Feb 10", "07:41
>>> AM",
>>> "Mercury Rises  52% Illuminated"], ["Mon Feb 10", "08:08 AM", "Moon
>>> Sets"],
>>> ["Mon Feb 10", "08:42 AM", "Venus Rises  70% Illuminated"], ["Mon Feb
>>> 10",
>>> "05:28 PM", "Sun Sets 01:11 later"], ["Mon Feb 10", "07:01 PM", "Mercury
>>> Sets"]

[weewx-user] Re: Pyehpem and International Space Station

2020-02-11 Thread Walter Smith
Cheetah doesn't like $pass as a variable name.  It must confuse Cheetah, 
there's a #pass directive.  Try a different variable name there.

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/1a95dd2a-d15a-4220-9ffe-8f2a1569033e%40googlegroups.com.


Re: [weewx-user] Re: Pyehpem and International Space Station

2020-02-11 Thread Kevin Davis
What am I missing here?

String in my iss_all.json file:
#set global $iss_all = [["Tue Feb 11 10:54 am","SW/10","NE/9","69","6min
45sec"],["Tue Feb 11 12:31 pm","W/10","NE/9","33","6min 16sec"],["Tue Feb
11 02:09 pm","WNW/10","ENE/9","28","6min 3sec"],["Tue Feb 11 03:46
pm","WNW/10","E/9","72","6min 46sec"],["Tue Feb 11 05:23
pm","W/10","SSE/9","19","5min 0sec"],["Wed Feb 12 10:07
am","SSW/10","ENE/9","43","6min 24sec"],["Wed Feb 12 11:44
am","WSW/10","NE/9","41","6min 29sec"],["Wed Feb 12 01:21
pm","WNW/10","NE/9","27","5min 57sec"],["Wed Feb 12 02:58
pm","WNW/10","E/9","51","6min 38sec"],["Wed Feb 12 04:35
pm","W/10","SE/9","30","6min 9sec"],["Thu Feb 13 09:20
am","S/11","ENE/9","27","5min 40sec"],["Thu Feb 13 10:56
am","WSW/10","NE/9","54","6min 41sec"],["Thu Feb 13 12:33
pm","WNW/10","NE/9","27","5min 58sec"],["Thu Feb 13 02:10
pm","WNW/10","ENE/9","39","6min 27sec"],["Thu Feb 13 03:47
pm","W/10","SE/9","47","6min 38sec"],["Fri Feb 14 08:33
am","SSE/10","E/9","17","4min 39sec"],["Fri Feb 14 10:08
am","SW/10","NE/9","78","6min 47sec"],["Fri Feb 14 11:46
am","W/10","NE/9","29","6min 4sec"],["Fri Feb 14 01:23
pm","WNW/10","ENE/9","32","6min 12sec"],["Fri Feb 14 03:00
pm","WNW/10","ESE/9","76","6min 47sec"],["Fri Feb 14 04:38
pm","WSW/10","S/9","12","2min 53sec"],["Sat Feb 15 07:47
am","SE/10","ESE/9","10","1min 39sec"],["Sat Feb 15 09:20
am","SW/10","NE/9","69","6min 44sec"],["Sat Feb 15 10:58
am","W/10","NE/9","33","6min 16sec"],["Sat Feb 15 12:35
pm","WNW/10","ENE/9","28","6min 3sec"],["Sat Feb 15 02:12
pm","WNW/10","E/9","72","6min 47sec"],["Sat Feb 15 03:49
pm","W/10","SSE/9","19","5min 0sec"],["Sun Feb 16 08:33
am","SSW/10","ENE/9","43","6min 23sec"],["Sun Feb 16 10:10
am","WSW/10","NE/9","41","6min 28sec"]]

>From my iss.inc template
  

Start Time
Rise
Set
Max
Length of Pass

#include "iss_all.json"
#for $pass in $iss_all

$pass[0]
$pass[1]
$pass[2]
$pass[3]
$pass[4]

#end for
  


My error:
Feb 11 10:23:02 corbett wee_reports[31488]:   Traceback (most recent
call last):
Feb 11 10:23:02 corbett wee_reports[31488]: File
"/usr/share/weewx/weewx/cheetahgenerator.py", line 332, in generate
Feb 11 10:23:02 corbett wee_reports[31488]: 
 fd.write(str(compiled_template))
Feb 11 10:23:02 corbett wee_reports[31488]: File
"/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1005, in
__str__
Feb 11 10:23:02 corbett wee_reports[31488]:   rc = getattr(self,
mainMethName)()
Feb 11 10:23:02 corbett wee_reports[31488]: File
"_etc_weewx_skins_Seasons_index_html_tmpl.py", line 258, in respond
Feb 11 10:23:02 corbett wee_reports[31488]: File
"/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1597, in
_handleCheetahInclude
Feb 11 10:23:02 corbett wee_reports[31488]:   nestedTemplateClass =
compiler.compile(source=source, file=file)
Feb 11 10:23:02 corbett wee_reports[31488]: File
"/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 796, in compile
Feb 11 10:23:02 corbett wee_reports[31488]:   raise e
Feb 11 10:23:02 corbett wee_reports[31488]: File
"_etc_weewx_skins_Seasons_iss_incwk.py", line 144
Feb 11 10:23:02 corbett wee_reports[31488]:   for pass in
VFFSL(SL,"iss_all",True): # generated from line 21, col 2
Feb 11 10:23:02 corbett wee_reports[31488]:  ^
Feb 11 10:23:02 corbett wee_reports[31488]:   SyntaxError: invalid
syntax

On Mon, Feb 10, 2020 at 9:43 AM Kevin Davis  wrote:

> Very cool.  Thanks for the input.   Certainly helps me to see a working
> example!
>
> On Mon, Feb 10, 2020 at 9:40 AM Walter Smith  wrote:
>
>> Doing something very similar.  Cron job at midnight, Python script to
>> format a list of stuff from Skyfield I want to display in my template.
>> Prefix the list with a "#set global" line:
>>
>> with open('skyprint2A.txt','w') as f3:
>>f3.write('#set global $skytext2 = ')
>>json.dump(l_out_lines_txt, f3)
>>
>> which gives a file containing:
>>
>> #set global $skytext2 = [["Mon Feb 10", "06:57 AM", "Sun Rises 01:08
>> earlier Length of Day 10:30:46 02:19 longer"], ["Mon Feb 10", "07:41 AM",
>> "Mercury Rises  52% Illuminated"], ["Mon Feb 10", "08:08 AM", "Moon Sets"],
>> ["Mon Feb 10", "08:42 AM", "Venus Rises  70% Illuminated"], ["Mon Feb 10",
>> "05:28 PM", "Sun Sets 01:11 later"], ["Mon Feb 10", "07:01 PM", "Mercury
>> Sets"], ["Mon Feb 10", "07:20 PM", "Moon Rises  95% Illuminated"], ["Mon
>> Feb 10", "08:59 PM", "Venus Sets"], ["Tue Feb 11", "06:56 AM", "Sun Rises
>> 01:10 earlier Length of Day 10:33:07 02:21 longer"], ["Tue Feb 11", "07:38
>> AM", "Mercury Rises  47% Illuminated"], ["Tue Feb 11", "08:41 AM", "Venus
>> Rises  70% Illuminated"], ["Tue Feb 11", "08:43 AM", "Moon Sets"], ["Tue
>> Feb 11", "05:29 PM", "Sun Sets 01:11 later"], [

Re: [weewx-user] Re: Pyehpem and International Space Station

2020-02-10 Thread Kevin Davis
Very cool.  Thanks for the input.   Certainly helps me to see a working
example!

On Mon, Feb 10, 2020 at 9:40 AM Walter Smith  wrote:

> Doing something very similar.  Cron job at midnight, Python script to
> format a list of stuff from Skyfield I want to display in my template.
> Prefix the list with a "#set global" line:
>
> with open('skyprint2A.txt','w') as f3:
>f3.write('#set global $skytext2 = ')
>json.dump(l_out_lines_txt, f3)
>
> which gives a file containing:
>
> #set global $skytext2 = [["Mon Feb 10", "06:57 AM", "Sun Rises 01:08
> earlier Length of Day 10:30:46 02:19 longer"], ["Mon Feb 10", "07:41 AM",
> "Mercury Rises  52% Illuminated"], ["Mon Feb 10", "08:08 AM", "Moon Sets"],
> ["Mon Feb 10", "08:42 AM", "Venus Rises  70% Illuminated"], ["Mon Feb 10",
> "05:28 PM", "Sun Sets 01:11 later"], ["Mon Feb 10", "07:01 PM", "Mercury
> Sets"], ["Mon Feb 10", "07:20 PM", "Moon Rises  95% Illuminated"], ["Mon
> Feb 10", "08:59 PM", "Venus Sets"], ["Tue Feb 11", "06:56 AM", "Sun Rises
> 01:10 earlier Length of Day 10:33:07 02:21 longer"], ["Tue Feb 11", "07:38
> AM", "Mercury Rises  47% Illuminated"], ["Tue Feb 11", "08:41 AM", "Venus
> Rises  70% Illuminated"], ["Tue Feb 11", "08:43 AM", "Moon Sets"], ["Tue
> Feb 11", "05:29 PM", "Sun Sets 01:11 later"], ["Tue Feb 11", "07:02 PM",
> "Mercury Sets"], ["Tue Feb 11", "08:34 PM", "Moon Rises  89% Illuminated"],
> ["Tue Feb 11", "09:01 PM", "Venus Sets"], ["Sat Feb 15", "04:17 PM", "Moon
> Phase Last Quarter"], ["Thu Mar 19", "10:49 PM", "Vernal Equinox"]]
>
> then in my template:
>
> #include "skyprint2A.txt"
>
> Sky Events
>   
>  
> Date
> Time
> Event
>  
>  #for $seq1 in $skytext2
> 
>$seq1[0]
>$seq1[1]
>$seq1[2]
> 
>  #end for
>   
>
> --
> You received this message because you are subscribed to the Google Groups
> "weewx-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to weewx-user+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-user/7e38d3ef-7a1c-4c6b-973a-b877ff72dc56%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/CAHiQ_B0Y3WfcX%2BeT6Gt%2BbCr4W9-%3DftYTV7YSLphrvmDfWpLVzw%40mail.gmail.com.


[weewx-user] Re: Pyehpem and International Space Station

2020-02-10 Thread Walter Smith
Doing something very similar.  Cron job at midnight, Python script to 
format a list of stuff from Skyfield I want to display in my template.  
Prefix the list with a "#set global" line:

with open('skyprint2A.txt','w') as f3:
   f3.write('#set global $skytext2 = ')
   json.dump(l_out_lines_txt, f3)

which gives a file containing:

#set global $skytext2 = [["Mon Feb 10", "06:57 AM", "Sun Rises 01:08 
earlier Length of Day 10:30:46 02:19 longer"], ["Mon Feb 10", "07:41 AM", 
"Mercury Rises  52% Illuminated"], ["Mon Feb 10", "08:08 AM", "Moon Sets"], 
["Mon Feb 10", "08:42 AM", "Venus Rises  70% Illuminated"], ["Mon Feb 10", 
"05:28 PM", "Sun Sets 01:11 later"], ["Mon Feb 10", "07:01 PM", "Mercury 
Sets"], ["Mon Feb 10", "07:20 PM", "Moon Rises  95% Illuminated"], ["Mon 
Feb 10", "08:59 PM", "Venus Sets"], ["Tue Feb 11", "06:56 AM", "Sun Rises 
01:10 earlier Length of Day 10:33:07 02:21 longer"], ["Tue Feb 11", "07:38 
AM", "Mercury Rises  47% Illuminated"], ["Tue Feb 11", "08:41 AM", "Venus 
Rises  70% Illuminated"], ["Tue Feb 11", "08:43 AM", "Moon Sets"], ["Tue 
Feb 11", "05:29 PM", "Sun Sets 01:11 later"], ["Tue Feb 11", "07:02 PM", 
"Mercury Sets"], ["Tue Feb 11", "08:34 PM", "Moon Rises  89% Illuminated"], 
["Tue Feb 11", "09:01 PM", "Venus Sets"], ["Sat Feb 15", "04:17 PM", "Moon 
Phase Last Quarter"], ["Thu Mar 19", "10:49 PM", "Vernal Equinox"]]

then in my template:

#include "skyprint2A.txt"
  
Sky Events
  
 
Date
Time
Event
 
 #for $seq1 in $skytext2

   $seq1[0]
   $seq1[1]
   $seq1[2]

 #end for
  

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/7e38d3ef-7a1c-4c6b-973a-b877ff72dc56%40googlegroups.com.


Re: [weewx-user] Re: Pyehpem and International Space Station

2020-02-09 Thread Kevin Davis
That certainly seems the easiest way, I just have a FOMO on doing it the
"right" way.  LOL.

Thanks for the input and that's probably what I'll stick with for now
then.  Just pretty it up and call it a day.

On Sun, Feb 9, 2020 at 8:51 AM vince  wrote:

> On Sunday, February 9, 2020 at 8:42:58 AM UTC-8, Kevin Davis wrote:
>>
>> I'm not using Pyephem for calculating these, I'm using Skyfield and I
>> have written iss.py to build the data set.
>>
>> Sorry if I'm asking a remedial question.  I'm still wrapping my head
>> around Python and OO programming.
>>
>>>
>>>
> The results change 'very' rarely, so personally I'd just call your python
> script via cron daily or so, writing the output file you are already
> including in your weewx template.
>
> If you want to change your .inc file format, you could do it in your
> python script (ie, making it write prettier HTML etc.)
>
> --
> You received this message because you are subscribed to the Google Groups
> "weewx-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to weewx-user+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-user/d0c8319c-dfbf-40c8-999f-a39e98320d2f%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/CAHiQ_B0P7pdRC8pymrqLEW%3DZ4wZLj4vwaLyMV%3D_cfXhKYETGSw%40mail.gmail.com.


Re: [weewx-user] Re: Pyehpem and International Space Station

2020-02-09 Thread p q
I don't see anything improper about doing it the way you're doing it. It's
not following the general architecture for Weewx, but if it works for you
and you're learning, I think you should keep at it.

To make it look better, take a look at the tables that are already in this
skin - either using the browser debugging tools are the template itself.
You can add HTML coding to your output before you include it and to fix the
formatting.

I'm doing something similar with getting earthquake data from USGS onto my
site.


On Sun, Feb 9, 2020 at 8:42 AM Kevin Davis  wrote:

> I'm not using Pyephem for calculating these, I'm using Skyfield and I have
> written iss.py to build the data set.
>
> Sorry if I'm asking a remedial question.  I'm still wrapping my head
> around Python and OO programming.
>
> On Sun, Feb 9, 2020 at 8:35 AM Thomas Keffer  wrote:
>
>> See the section *Adding new bodies to the almanac
>> *
>>  in
>> the Customizing Guide for instructions.
>>
>> On Sun, Feb 9, 2020 at 8:30 AM Kevin Davis  wrote:
>>
>>> Ok, I'm getting a little closer, but I'm struggling on how to
>>> incorporate this directly into the weewx reporting system.
>>>
>>> I have written a Python program which builds(currently ugly) a data set
>>> of ISS passes.  I am  buildiing a file called iss.inc, outisde of weewx
>>> through a daily cron job, and simply doing a #include in index.html.tmpl
>>> skin.
>>>
>>> What is the proper way to fold this into the normal reporting cycle?
>>>
>>> wx.ke7k.com
>>>
>>> On Saturday, February 1, 2020 at 4:21:29 PM UTC-8, Kevin Davis wrote:

 Has anybody played with adding upcoming sightings to there page?

 Adding it to pyehpem seems easy enough, just brainstorming a way to
 loop through to produce the next X number of sightings.


 --
>>> You received this message because you are subscribed to the Google
>>> Groups "weewx-user" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to weewx-user+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/weewx-user/fe750d4d-27ed-4c68-b7a2-f47e01436a11%40googlegroups.com
>>> 
>>> .
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "weewx-user" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to weewx-user+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/weewx-user/CAPq0zEBHiC%2B%2BxqQvkEyFL6Na_fmfibeh9uy6NFgweN6v148GMQ%40mail.gmail.com
>> 
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "weewx-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to weewx-user+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-user/CAHiQ_B3xbS%3D3N8Tmk70z-sgdOSdmW4v46oThRK4icAx5p6L1EA%40mail.gmail.com
> 
> .
>


-- 
Peter Quinn
(415)794-2264

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/CAA1SM2385UknXXpp-zXpGP1JpBuhadJieY3iKhb2pgO4DCjpDA%40mail.gmail.com.


Re: [weewx-user] Re: Pyehpem and International Space Station

2020-02-09 Thread vince
On Sunday, February 9, 2020 at 8:42:58 AM UTC-8, Kevin Davis wrote:
>
> I'm not using Pyephem for calculating these, I'm using Skyfield and I have 
> written iss.py to build the data set. 
>
> Sorry if I'm asking a remedial question.  I'm still wrapping my head 
> around Python and OO programming.   
>
>>
>>
The results change 'very' rarely, so personally I'd just call your python 
script via cron daily or so, writing the output file you are already 
including in your weewx template.

If you want to change your .inc file format, you could do it in your python 
script (ie, making it write prettier HTML etc.) 

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/d0c8319c-dfbf-40c8-999f-a39e98320d2f%40googlegroups.com.


Re: [weewx-user] Re: Pyehpem and International Space Station

2020-02-09 Thread Kevin Davis
I'm not using Pyephem for calculating these, I'm using Skyfield and I have
written iss.py to build the data set.

Sorry if I'm asking a remedial question.  I'm still wrapping my head around
Python and OO programming.

On Sun, Feb 9, 2020 at 8:35 AM Thomas Keffer  wrote:

> See the section *Adding new bodies to the almanac
> * 
> in
> the Customizing Guide for instructions.
>
> On Sun, Feb 9, 2020 at 8:30 AM Kevin Davis  wrote:
>
>> Ok, I'm getting a little closer, but I'm struggling on how to incorporate
>> this directly into the weewx reporting system.
>>
>> I have written a Python program which builds(currently ugly) a data set
>> of ISS passes.  I am  buildiing a file called iss.inc, outisde of weewx
>> through a daily cron job, and simply doing a #include in index.html.tmpl
>> skin.
>>
>> What is the proper way to fold this into the normal reporting cycle?
>>
>> wx.ke7k.com
>>
>> On Saturday, February 1, 2020 at 4:21:29 PM UTC-8, Kevin Davis wrote:
>>>
>>> Has anybody played with adding upcoming sightings to there page?
>>>
>>> Adding it to pyehpem seems easy enough, just brainstorming a way to loop
>>> through to produce the next X number of sightings.
>>>
>>>
>>> --
>> You received this message because you are subscribed to the Google Groups
>> "weewx-user" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to weewx-user+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/weewx-user/fe750d4d-27ed-4c68-b7a2-f47e01436a11%40googlegroups.com
>> 
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "weewx-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to weewx-user+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-user/CAPq0zEBHiC%2B%2BxqQvkEyFL6Na_fmfibeh9uy6NFgweN6v148GMQ%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/CAHiQ_B3xbS%3D3N8Tmk70z-sgdOSdmW4v46oThRK4icAx5p6L1EA%40mail.gmail.com.


Re: [weewx-user] Re: Pyehpem and International Space Station

2020-02-09 Thread Thomas Keffer
See the section *Adding new bodies to the almanac
*
in
the Customizing Guide for instructions.

On Sun, Feb 9, 2020 at 8:30 AM Kevin Davis  wrote:

> Ok, I'm getting a little closer, but I'm struggling on how to incorporate
> this directly into the weewx reporting system.
>
> I have written a Python program which builds(currently ugly) a data set of
> ISS passes.  I am  buildiing a file called iss.inc, outisde of weewx
> through a daily cron job, and simply doing a #include in index.html.tmpl
> skin.
>
> What is the proper way to fold this into the normal reporting cycle?
>
> wx.ke7k.com
>
> On Saturday, February 1, 2020 at 4:21:29 PM UTC-8, Kevin Davis wrote:
>>
>> Has anybody played with adding upcoming sightings to there page?
>>
>> Adding it to pyehpem seems easy enough, just brainstorming a way to loop
>> through to produce the next X number of sightings.
>>
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "weewx-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to weewx-user+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-user/fe750d4d-27ed-4c68-b7a2-f47e01436a11%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/CAPq0zEBHiC%2B%2BxqQvkEyFL6Na_fmfibeh9uy6NFgweN6v148GMQ%40mail.gmail.com.


[weewx-user] Re: Pyehpem and International Space Station

2020-02-09 Thread Kevin Davis
Ok, I'm getting a little closer, but I'm struggling on how to incorporate 
this directly into the weewx reporting system.

I have written a Python program which builds(currently ugly) a data set of 
ISS passes.  I am  buildiing a file called iss.inc, outisde of weewx 
through a daily cron job, and simply doing a #include in index.html.tmpl 
skin.  

What is the proper way to fold this into the normal reporting cycle?

wx.ke7k.com

On Saturday, February 1, 2020 at 4:21:29 PM UTC-8, Kevin Davis wrote:
>
> Has anybody played with adding upcoming sightings to there page?
>
> Adding it to pyehpem seems easy enough, just brainstorming a way to loop 
> through to produce the next X number of sightings. 
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/fe750d4d-27ed-4c68-b7a2-f47e01436a11%40googlegroups.com.


Re: [weewx-user] Re: Pyehpem and International Space Station

2020-02-03 Thread Kevin Davis
I would love to do some moon-bounce!  Looks like so much fun and lots to
learn.  I have a pi-star here on the bench to build but haven't gotten
around to it yet, but I do stay pretty active on All-Star.  Usually
connected to the East Coast Reflector.

 While I've been a programmer for 25+ years(IBM mainframes), this project
is actually my first Python attempt and basically my first experience with
object oriented taboot.   Below is what I've got so far for building the
next few passes of the ISS.

Perhaps you could explain to me the difference in "passes through the
minimum elevation" vs. at the horizon?

I'm trying to get any pass that goes over 10deg.  The only issue I'm having
is it giving me a rise and set time and degree that are below 10, so
perhaps I'm not calling it correctly.


from skyfield.api import Topos, load
from datetime import timedelta

# Load TLE Information Feed
tle_url = 'http://celestrak.com/NORAD/elements/stations.txt'
satellites = load.tle(tle_url, reload=True)

# Create ISS object
iss = satellites['ISS (ZARYA)']

# Create Corbett object
corbett = Topos('45.27 N', '122.40 W')

# Create Timescale object
ts = load.timescale()

# Calculate/Output TLE Epoch Staleness value
current_time = ts.now()
epoch_stale_days = current_time - iss.epoch
if epoch_stale_days > 0:
  epoch_stale_direction = 'past'
else:
  epoch_stale_direction = 'before'
print('{:.3f} days {} ISS TLE Epoch'.format(epoch_stale_days,
epoch_stale_direction))


# Calculate passes over the next X days
to_time = ts.utc(current_time.utc_datetime() + timedelta(days=2))
t, events = iss.find_events(corbett, current_time, to_time,
altitude_degrees=10.0)
for ti, event in zip(t, events):
name = ('Rise', 'Culminate','Set')[event]
difference = iss - corbett
topocentric = difference.at(ti)
alt, az, distance = topocentric.altaz()
print('{} @ {} -  Bearing: {}  Altitude:
{}'.format(name,ti.utc_iso(),int(az.degrees),int(alt.degrees)))

On Mon, Feb 3, 2020 at 5:33 PM Susan Mackay  wrote:

> Had my 40m WSPR transmitter running last night and made it to just south
>> of you,  into Tasmania to VK7JJ; 13127 km away from me using 200 mw!
>>
> Very impressive! I've not got into WSPR myself - I'm more of a D-Star
> girl. Next you should try a moon bounce.
> I've been playing with the 'find_events' function (it is brand new; as in
> only a few days old) and it gives you the rise and set times of the
> satellite as it passes through the minimum elevation that you set - and NOT
> the actual rise and set times at the horizon. I've communicated with the
> author about this to suggest that there should be an option as to which
> rise/set times it gives you. I'm also looking at the source code to see if
> there is an easy way around this.
> Susan VK3ANZ
>
> --
> You received this message because you are subscribed to the Google Groups
> "weewx-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to weewx-user+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-user/9be14a75-9358-444b-b444-c2e26aa9d95e%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/CAHiQ_B1X3aNRahRZYaxK6kLEFq_obEjgzP_1H3vTrqgKjEejfw%40mail.gmail.com.


Re: [weewx-user] Re: Pyehpem and International Space Station

2020-02-03 Thread Susan Mackay

>
> Had my 40m WSPR transmitter running last night and made it to just south 
> of you,  into Tasmania to VK7JJ; 13127 km away from me using 200 mw!
>
Very impressive! I've not got into WSPR myself - I'm more of a D-Star girl. 
Next you should try a moon bounce.
I've been playing with the 'find_events' function (it is brand new; as in 
only a few days old) and it gives you the rise and set times of the 
satellite as it passes through the minimum elevation that you set - and NOT 
the actual rise and set times at the horizon. I've communicated with the 
author about this to suggest that there should be an option as to which 
rise/set times it gives you. I'm also looking at the source code to see if 
there is an easy way around this.
Susan VK3ANZ

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/9be14a75-9358-444b-b444-c2e26aa9d95e%40googlegroups.com.


Re: [weewx-user] Re: Pyehpem and International Space Station

2020-02-03 Thread Kevin Davis
And additionally Susan, apropos of nothing, but I noticed you're a ham, as
am I; KE7K here.

Had my 40m WSPR transmitter running last night and made it to just south of
you,  into Tasmania to VK7JJ; 13127 km away from me using 200 mw!

7 3

On Mon, Feb 3, 2020 at 7:14 AM Kevin Davis  wrote:

> Thanks a lot Susan!  That's exactly what I was looking for.
>
> On Sun, Feb 2, 2020 at 6:32 PM Susan Mackay  wrote:
>
>> Also consider using SkyField instead of PyEphem as it is newer and
>> supported.
>> Look at https://rhodesmill.org/skyfield/earth-satellites.html and the
>> example under the title 'Finding when a satellite rises and sets'
>> Susan
>>
>> On Sunday, February 2, 2020 at 11:21:29 AM UTC+11, Kevin Davis wrote:
>>>
>>> Has anybody played with adding upcoming sightings to there page?
>>>
>>> Adding it to pyehpem seems easy enough, just brainstorming a way to loop
>>> through to produce the next X number of sightings.
>>>
>>>
>>> --
>> You received this message because you are subscribed to the Google Groups
>> "weewx-user" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to weewx-user+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/weewx-user/dd7c0dc8-8388-4308-917a-ab8f03420740%40googlegroups.com
>> 
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/CAHiQ_B2_1H0oVHZN-V1MwfAiXDbG5Cc8Uh4EKR3WUD2NocQkrQ%40mail.gmail.com.


Re: [weewx-user] Re: Pyehpem and International Space Station

2020-02-03 Thread Kevin Davis
Thanks a lot Susan!  That's exactly what I was looking for.

On Sun, Feb 2, 2020 at 6:32 PM Susan Mackay  wrote:

> Also consider using SkyField instead of PyEphem as it is newer and
> supported.
> Look at https://rhodesmill.org/skyfield/earth-satellites.html and the
> example under the title 'Finding when a satellite rises and sets'
> Susan
>
> On Sunday, February 2, 2020 at 11:21:29 AM UTC+11, Kevin Davis wrote:
>>
>> Has anybody played with adding upcoming sightings to there page?
>>
>> Adding it to pyehpem seems easy enough, just brainstorming a way to loop
>> through to produce the next X number of sightings.
>>
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "weewx-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to weewx-user+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-user/dd7c0dc8-8388-4308-917a-ab8f03420740%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/CAHiQ_B1N8oowJBt8V8MeekkXC7roh9kwCe_UFWfPwF3SDN13fg%40mail.gmail.com.


[weewx-user] Re: Pyehpem and International Space Station

2020-02-02 Thread Susan Mackay
Also consider using SkyField instead of PyEphem as it is newer and 
supported.
Look at https://rhodesmill.org/skyfield/earth-satellites.html and the 
example under the title 'Finding when a satellite rises and sets'
Susan

On Sunday, February 2, 2020 at 11:21:29 AM UTC+11, Kevin Davis wrote:
>
> Has anybody played with adding upcoming sightings to there page?
>
> Adding it to pyehpem seems easy enough, just brainstorming a way to loop 
> through to produce the next X number of sightings. 
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/dd7c0dc8-8388-4308-917a-ab8f03420740%40googlegroups.com.