rrskybox / ImagePlanner

Windows Astro-Imaging Planning Tool utilizing TheSky Pro
2 stars 1 forks source link

Altitude Graph Does not Match TSX #10

Closed astromiester1 closed 11 months ago

astromiester1 commented 11 months ago

For some reason, Image planner shows M33 at 40 degs at 8pm tonight ont my locale but inside TSX M33 is at -2 degs at 8PM..

Any idea why things might be off?

astromiester1 commented 11 months ago

Another Test using TSX using Image planner at 10 pm tonight sept 4th lat 28 06 17 North, Long 80 34 7 West shows altitude of M33 at 14 degs but Image planner at same time on Altitude graph shows it at 50 degs. Its almost like the Lat Lon from TSX isn't getting into the image planner correctly.. Any ideas?

rrskybox commented 11 months ago

I think I must have butchered something in the UTC calculation somewhere. I'm getting the correct altitudes for my location, but getting incorrect altitudes when I enter your coordinates/time zone. The altitudes seem to be displaced by 3 hours east. This worked in the past so I must have modified something relatively recently, maybe in the astro-math library. I'll do some digging and get back to you.

astromiester1 commented 11 months ago

Ok... Will Stand bye... Thanks Dale

rrskybox commented 11 months ago

I probably found the problem and it was in the code that determines the location offset to UTC. The newest build (92) seems to be working but keep an eye out for anything that I might have broken in the process. I'll run some more tests over the next few days or so.

astromiester1 commented 11 months ago

Cool beans...Will try after dinner.

astromiester1 commented 11 months ago

Something isnt right... The altitude graph is showing times from 430AM to 630AM for altitude > 30degs. The window says to image from 456AM to 642AM for M91 my local in December for example.

rrskybox commented 11 months ago

Yep. The times are still not correcting right when looking at dates outside the current daylight savings time period. That is, all the dates that are DST seem to work correctly, all the dates that are not in DST have the altitudes an hour off. TSX is NOT helping me here so I've got to come up with something else to try. Standby.

astromiester1 commented 11 months ago

Roger that...

rrskybox commented 11 months ago

Build94. Most (possibly all) of the discrepancies w/r/t altitude and moon rise/set times appear to be beaten into submission. I still don't know exactly why they showed up now. Something may have changed in TSX or they were hiding there all along. I don't want to spend the time to go back and look. There are still a number of edge conditions that I need to check and that may take some time.

The "solution" entailed writing a general daylight savings time converter based on TSX daylight saving option (DSO) in the Location definition. There are some thirty or so DSO's in TSX, but Build 94 supports just three -- US/Canada, Europe and None. I may add others by request and/or as time and attitude permit. Wacky Australia is probably first on the list, but I wanted to get an initial build out first.

Please give it a roll and report anything out of sorts. Thanks.

astromiester1 commented 11 months ago

Ok Will do today...I compare it with astro planner. Has a nice graph for each object for altitude for whole year. Its free as well. Dale

rrskybox commented 11 months ago

Astroplanner was the first automation I ever used. Great little product. CCD Navigator is another one I used for quite a while, but it costs you a bit. There are some websites out there that provide some similar tools as well. Image Planner, at the outset, was intended to help me to quickly pick the best weeks for imaging specific targets throughout the year, in anticipation of potential camping trips and star parties. I couldn't find an app that did that. I wanted to be able to see a visual representation of the visibility of a given target for the whole year in one screen. As with most code, it sort of evolved from there. But, for me, it doesn't matter what the altitude of a given target is on a particular night, only that it is above a certain altitude on a relatively moon-free night.

astromiester1 commented 11 months ago

Ok... Looked at it a bit... I did M51 as test on my local and a few boxes different than 4.0.0.92 from what I can see.

But, one thing I notice is on the altitude graph 4.0.0.92 had info for when to start and end times for imaging plus moon up and moon phase %. This info is gone in 4.0.0.94. Just Moonrise before imaging and Moonrise after imaging labels only with no data.

astromiester1 commented 11 months ago

TSX and AP agree on M51 on my location.. Basically, > 30degs altitude from April to Aug with peak on 5/5/24 62 degs. Image planner has extra months of visibilty > 30 degs which is incorrect.. Dec, Jan, Feb and Mar.... So, maybe assume 4 months are incorrect on all targets maybe...

astromiester1 commented 11 months ago

Is there any way to add a time period in image planner? Say, 8pm to 2AM in morning over 30 degs? Maybe, you could also point me to the place in code where most of changes would be.. Its strange how it worked for your location. If you used a fixed local, maybe I could just change it to mine in a separate build local to my machine. Just some thoughts...

rrskybox commented 11 months ago

Build 96:

  1. Start and end times in the Altitude Graph description are back. My bad.
  2. Noticed that the data for the last days of the month were misplaced in Build 94. I missed this in Build 92 because I've been on the road for the past week using a laptop that didn't show the bottom of the application screen. It's fixed. My bad again.
  3. The "extra" months don't seem to be. For instance, TSX shows M51 at 30 degrees on 2/5/23 at 12AM for your location (see below). Telescopius.com confirms. Do I have your location incorrect maybe? It may be a misunderstanding on how Image Link works. First, each date is a "Session" date, meaning that the data covers the time from 12 noon on that date to 12 noon on the next day. For instance, session date 2/4 covers the time period from 12 noon 2/4 to 12 noon 2/5. So, if a target rises above the minimum altitude on 2/5 at 1am, then Image Planner should show visibility on session date 2/4 starting at 1 am and going until whenever the target drops below the minimum altitude. The Visibility duration is also constrained by astronomical twilight and dawn. So, if a target rises above minimum altitude at 2pm and sets at 4pm, then Image Planner will report no visibility. Be that as it may, post an equivalent screen shot so perhaps I can see the discrepancy you reported.
  4. Image Planner was specifically intended to be independent of the local (PC) time. The intent is that one could use it for a planning session anywhere in the world if need be, irrespective of where home was. However, it's a lot of code and I very possibly could have inadvertently used computer time somewhere and can't find it now. One thing, though: you can't change the TSX Location in the middle of an Image Planner session. If you change the TSX Location you have to restart Image Planner. This "feature" is a performance hack.
  5. What do you see as the benefit for limiting the session scope more than the current astronomical twilight and dawn while generating an annual visibility survey? You can look at the cell data or the altitude window for any given day and see when the target is visible. Being perfectly honest, this seems like unnecessary complexity to me (which means that it might be an opportunity for confusion). However, if you wanted to play with it on your personal fork, the twilight and dawn time constraints are applied in the SunCycle method in the DailyPosition.cs module. I'm guessing that modifying those might get you what you want.

image

astromiester1 commented 11 months ago

My location in TSX is 28 06 17 N by 80 34 47 W -5 time zone 3 meter elevation.. Pretty close to yours.

On item 5. If I want the time period on the graph to reflect times from say 8pm to 2am or 5pm to 2am respectively, where in code would I make this change.. I don't have a remote setup to close if it rains. Have to do manually, so I would like the image planner to reflect those imaging times available and remove all times like 4 and 6AM in the morning when I won't be imaging.

astromiester1 commented 11 months ago

Test case M20 shows time different than TSX for observation altitude over time. Example TSX shows almost an 1 hour of time for M20 on Oct 1st from 8PM(35 deg) to 8:54PM(30degs) above 30degs but Image planner says 30 minutes worth above 30degs for that day.

rrskybox commented 11 months ago

Astronomical twilight is 8:23PM EDT at your location. Imaging from 8:23PM to 8:51PM (below 30 degrees) would be about a half hour.

rrskybox commented 11 months ago

As to adding a filter for other time periods, there are a couple of possibilities that I can think of. The first is as I mentioned above which is to try modifying the SunCycle method in the DailyPosition module. This is found in the AstroMath library. This method produces a list of rise and set times for the sun which are used in Image Planner to bracket available periods for imaging. Personally, I wouldn't mess with that as that library supports a number of other applications, but you might be able to modify it to use something other than astronomical twilight and dawn time limits.

Another possible path is to do post processing on the whole datagrid screen. You could add a method that runs after the screen is populated to filter all the entries based on their contents. There are two possible inputs to use from each cell that could be parsed -- the cell text or the cell tool tip. Once populated, both contain a text string that could be read and modified, or just change the color accordingly. The method that produces the datagrid is GenerateCalendar() in the FormImagePlanner.cs module. You could add a call to your post processor immediately before the return from GenerateCalendar(). Alternatively, you could write a stub for GenerateCalendar() that calls that method (renamed or aliased) then your post processor before returning.

Hope that helps.

astromiester1 commented 11 months ago

Hmmm. Have to chew on that... I know in telescpious, you can pick a best observation time to display the curve of an object for the whole year displaying altitude... Ie. 9PM for summer DST and use say 6PM for non DST in winter. Depending on the time you pick, the curve changes of course...