Hi,
I know that Christmas Eve (2015) is supposed to be a full moon. I wanted to compute the time from 12/23/15 (~ 3:15 pm EST) to the full moon. I thought I might have been able to use NSolve and Now to solve for when MoonPhase[...]==1.
In[16]:= NSolve[{MoonPhase[Now + Quantity[x, "Days"]] == 1}, x]
During evaluation of In[16]:= MoonPhase::dtspec: Wed 23 Dec 2015 15:03:23GMT-5.+xdays is not a valid date specification. >>
During evaluation of In[16]:= MoonPhase::dtspec: Wed 23 Dec 2015 15:03:23GMT-5.+xdays is not a valid date specification. >>
During evaluation of In[16]:= MoonPhase::dtspec: Wed 23 Dec 2015 15:03:23GMT-5.+xdays is not a valid date specification. >>
During evaluation of In[16]:= General::stop: Further output of MoonPhase::dtspec will be suppressed during this calculation. >>
During evaluation of In[16]:= NSolve::units: NSolve was unable to determine the units of quantities that appear in the input. >>
Out[16]= NSolve[{MoonPhase[
DateObject[{2015, 12, 23},
TimeObject[{15, 3, 23.0076}, TimeZone -> -5.],
TimeZone -> -5.] + Quantity[x, "Days"]] == 1}, x]
Additionally, the following code does not work:
NSolve[{MoonPhase[Now + x*Quantity[1, "Days"]] == 1}, x]
Anyone have suggestions or is this just not an acceptable way to solve the problem? I know I can always just create an interpolating function of MoonPhase over the course of a few days, then solving for the time until the full moon from that data. However, I wanted to solve this directly and to know that limitations of using equations with units and/or functions that provide data (e.g. distances between locations, MoonPhases, etc.).
Thanks, Joe