I am sorry for the double post, but I think this got lost in the end of a previous post that was already answered.
I receive two error messages when using the functions map.FLightR.ggmap and plot_util_distr:
Error: longitude of center must be between -180 and 180 degrees. note ggmap uses lon/lat, not lat/lon.
In addition: Warning message:
In min(Result$Results$Quantiles$Medianlon[twilights.index][Result$Results$Quantiles$Medianlon[twilights.index] > :
no non-missing arguments to min; returning Inf
Interestingly this only happens when either using certain grid boundaries for the spatial extent or if the bird under investigation uses certain areas, I am not quite sure what the pattern is.
So far I could trigger the error as soon as I extended the right boundary above lon -160 e.g.,
Grid<-make.grid(left=160, bottom=-80, right=-140, top=-10,
will trigger it while
Grid<-make.grid(left=160, bottom=-80, right=-160, top=-10,
does not produce an error.
UPDATE: It actually seems to occur when a position with longitude >-160 (e.g., -140) is plotted! However, it also occurs sometimes if e.g., longitude >-140 is used.
My feel is that this is also a ggmap related issue and may once again have to do with the dateline.
2. running plot_util_distr error
I don't think it is related as it is a sp error, but I get an error message when running plot_util_distr:
+ dates=data.frame(as.POSIXct('2016-03-03'), as.POSIXct('2016-08-07')),
+ add.scale.bar=TRUE, percentiles=0.5)
function will plot 308 twilights
Error in sp::CRS(aeqd) : major axis or radius = 0 or not given
I am very thankful about your comments on this.
All the best and keep up the great work Eldar!,