Create a trajectory object from simple matrix input.

make_trajectory(
  data,
  system = "ellipsoidal",
  start_time = NULL,
  name = NULL,
  ...
)

Arguments

data

A multiple-column matrix. The first column corresponds to the measurment time (in seconds); columns 2, 3 and 4 corresponds to the positions (with the order lat, long and alt (in rad) if ellipsoidal coord or x_N, x_E and x_D for NED coord); columns 5, 6 and 7 (optional) corresponds to the attitude (with the order roll, pitch and yaw); columns 8, 9 and 10 (optional) corresponds to the velocity along the same axes are columns 2, 3 and 4.

system

A string corresponding to the coordinate system (possible choices: ellipsoidal or ned) considered.

start_time

A string (optional) corresponding to the start time for the trajectory.

name

A string (optional) corresponding to the name of the dataset.

...

Additional arguments.

Value

An object of class trajectory.

Author

Davide Cucci, Lionel Voirol, Mehran Khaghani, Stéphane Guerrier

Examples

n <- 100
dat <- cbind(
  seq(from = 0, to = 60 * 60, length.out = n),
  46.204391 * pi / 180 + cumsum(rnorm(n)) / 10^5,
  6.143158 * pi / 180 + cumsum(rnorm(n)) / 10^5,
  375 + cumsum(rnorm(n))
)
traj <- make_trajectory(data = dat, name = "My cool data")
traj
#> Data Name: My cool data 
#> 
#> Data preview:
#> 
#>                 time               lat               lon              alt
#>   1                0 0.806409472498766  0.10723435429535 374.448205135929
#>   2 36.3636363636364  0.80640118051553 0.107202853014698 375.634327299308
#>   3 72.7272727272727 0.806412133447948 0.107192303409058  373.99881372665
#>   4 109.090909090909 0.806431558865824  0.10718762776968 373.672482330218
#>   5 145.454545454545 0.806456701941143 0.107189770728349 373.400776006953
#> ---                                                                      
#>  96 3454.54545454545 0.806448500439421 0.107208624470677 373.325073675173
#>  97 3490.90909090909 0.806452689679109 0.107214976512166 374.717951154007
#>  98 3527.27272727273 0.806441709177659 0.107225938172067 375.748142185684
#>  99 3563.63636363636 0.806434842905906 0.107244925728175 375.437629203789
#> 100             3600  0.80643496282316 0.107244581934708 376.515185907189
#> 
plot(traj)