ctmm-initiative / ctmm

Continuous-Time Movement Modeling. Functions for identifying, fitting, and applying continuous-space, continuous-time stochastic movement models to animal tracking data.
http://biology.umd.edu/movement.html
43 stars 10 forks source link

Possible bug in as.telemetry() #33

Closed taoofcoffee closed 4 years ago

taoofcoffee commented 4 years ago

After updating ctmm to the newest development version (0.5.7), I am getting an error when trying to create a telemetry object from a move object. The error thrown is:

Error in if (any(NAS)) { : missing value where TRUE/FALSE needed

When I used traceback(), it appears the error occurs when looking for HDOP values, i.e. the try.dop function. When I rolled back to ctmm 0.5.6 and run the same code, I have no problems with the as.telemetry function. (I get a printout when it looks for HDOP values: "HDOP values not found. Using ambiguous DOP values. Minimum sampling interval of 1 hours in W0104.")

Here is the code I am running (within a for loop):

bearMove <- move(x=byYear[[i]][["x"]], y=byYear[[i]][["y"]], time=as.POSIXct(byYear[[i]][["GMT.date"]], format="%Y-%m-%d %H:%M:%S", tz="UTC"), data=byYear[[i]], proj=CRS("+proj=tmerc +lat_0=0 +lon_0=15.80827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs"), animal=byYear[[i]][["ID"]], sensor="GPS")

bearTelem <- as.telemetry(bearMove)

The object 'byYear' is a list containing hourly GPS locations for all the bears in my study area by year (14 elements). There are around 50 individual bears' data in each year in the list.

Please let me know if you require further documentation.

chfleming commented 4 years ago

Sorry about that. I just fleshed out the support for ARGOS-GPS hybrid data. It should be working now.

taoofcoffee commented 4 years ago

It's working; thanks for the speedy update!