navigation.hac: Compute bearing, navigated distance and speed

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/navigation.hac.R

Description

This function computes navigation course (bearing), navigated distance, time diference and navigation speed between GPS fixes in position data imported from an HAC file.

Usage

1

Arguments

pos

geographic position data from an HAC file, as imported with position.hac.

Details

The bearing and navigated distance are computed with functions bearingRhumb and distVincentyEllipsoid from package geosphere. This function is intended to be called inside read.echogram, rather than being used directly.

Value

A data frame with seven variables:

time.cpu

date and time from the computer CPU during data acquisition.

lon

longitudes.

lat

latitudes.

bearing

navigation course between two consecutive GPS fixes.

navdist

navigated distance between two consecutive GPS fixes.

time.dif

time difference between two consecutive GPS fixes.

navspeed

navigation speed between two consecutive GPS fixes.

Author(s)

Héctor Villalobos

See Also

position.hac, bearingRhumb, distVincentyEllipsoid.

Examples

1
2
3
4
5
 hacfile <- system.file("hac", "D20150510-T202221.hac", package="echogram")
 pos <- position.hac( hacfile )
 pos
 pos2 <- navigation.hac(pos)
 pos2

Example output

              time.gps            time.cpu       lon      lat
1  2015-05-10 20:22:23 2015-05-10 20:22:23 -110.8760 27.83284
2  2015-05-10 20:22:25 2015-05-10 20:22:25 -110.8761 27.83285
3  2015-05-10 20:22:27 2015-05-10 20:22:27 -110.8761 27.83285
4  2015-05-10 20:22:29 2015-05-10 20:22:29 -110.8762 27.83285
5  2015-05-10 20:22:31 2015-05-10 20:22:31 -110.8763 27.83286
6  2015-05-10 20:22:33 2015-05-10 20:22:33 -110.8763 27.83286
7  2015-05-10 20:22:35 2015-05-10 20:22:35 -110.8764 27.83287
8  2015-05-10 20:22:37 2015-05-10 20:22:37 -110.8765 27.83287
9  2015-05-10 20:22:39 2015-05-10 20:22:39 -110.8765 27.83288
10 2015-05-10 20:22:41 2015-05-10 20:22:41 -110.8766 27.83289
11 2015-05-10 20:22:43 2015-05-10 20:22:43 -110.8767 27.83289
12 2015-05-10 20:22:45 2015-05-10 20:22:45 -110.8768 27.83290
13 2015-05-10 20:22:47 2015-05-10 20:22:47 -110.8768 27.83291
14 2015-05-10 20:22:49 2015-05-10 20:22:49 -110.8769 27.83292
15 2015-05-10 20:22:51 2015-05-10 20:22:51 -110.8770 27.83292
16 2015-05-10 20:22:53 2015-05-10 20:22:53 -110.8770 27.83293
17 2015-05-10 20:22:55 2015-05-10 20:22:55 -110.8771 27.83294
18 2015-05-10 20:22:57 2015-05-10 20:22:57 -110.8772 27.83295
19 2015-05-10 20:22:59 2015-05-10 20:22:59 -110.8772 27.83296
20 2015-05-10 20:23:01 2015-05-10 20:23:01 -110.8773 27.83297
21 2015-05-10 20:23:03 2015-05-10 20:23:03 -110.8774 27.83299
22 2015-05-10 20:23:05 2015-05-10 20:23:05 -110.8774 27.83300
23 2015-05-10 20:23:07 2015-05-10 20:23:07 -110.8775 27.83301
24 2015-05-10 20:23:09 2015-05-10 20:23:09 -110.8776 27.83303
25 2015-05-10 20:23:11 2015-05-10 20:23:11 -110.8776 27.83304
26 2015-05-10 20:23:13 2015-05-10 20:23:13 -110.8777 27.83305
27 2015-05-10 20:23:15 2015-05-10 20:23:15 -110.8778 27.83307
28 2015-05-10 20:23:17 2015-05-10 20:23:17 -110.8778 27.83308
29 2015-05-10 20:23:19 2015-05-10 20:23:19 -110.8779 27.83310
30 2015-05-10 20:23:21 2015-05-10 20:23:21 -110.8780 27.83311
31 2015-05-10 20:23:23 2015-05-10 20:23:23 -110.8780 27.83312
32 2015-05-10 20:23:25 2015-05-10 20:23:25 -110.8781 27.83313
33 2015-05-10 20:23:27 2015-05-10 20:23:27 -110.8781 27.83315
34 2015-05-10 20:23:29 2015-05-10 20:23:29 -110.8782 27.83316
35 2015-05-10 20:23:31 2015-05-10 20:23:31 -110.8783 27.83317
36 2015-05-10 20:23:33 2015-05-10 20:23:33 -110.8783 27.83318
37 2015-05-10 20:23:35 2015-05-10 20:23:35 -110.8784 27.83319
38 2015-05-10 20:23:37 2015-05-10 20:23:37 -110.8785 27.83321
39 2015-05-10 20:23:39 2015-05-10 20:23:39 -110.8785 27.83322
40 2015-05-10 20:23:41 2015-05-10 20:23:41 -110.8786 27.83323
41 2015-05-10 20:23:43 2015-05-10 20:23:43 -110.8786 27.83324
42 2015-05-10 20:23:45 2015-05-10 20:23:45 -110.8787 27.83326
43 2015-05-10 20:23:47 2015-05-10 20:23:47 -110.8788 27.83327
44 2015-05-10 20:23:49 2015-05-10 20:23:49 -110.8788 27.83328
45 2015-05-10 20:23:51 2015-05-10 20:23:51 -110.8789 27.83329
46 2015-05-10 20:23:53 2015-05-10 20:23:53 -110.8790 27.83331
47 2015-05-10 20:23:55 2015-05-10 20:23:55 -110.8790 27.83332
48 2015-05-10 20:23:57 2015-05-10 20:23:57 -110.8791 27.83333
49 2015-05-10 20:23:59 2015-05-10 20:23:59 -110.8792 27.83334
50 2015-05-10 20:24:01 2015-05-10 20:24:01 -110.8792 27.83335
51 2015-05-10 20:24:03 2015-05-10 20:24:03 -110.8793 27.83337
52 2015-05-10 20:24:05 2015-05-10 20:24:05 -110.8794 27.83338
53 2015-05-10 20:24:07 2015-05-10 20:24:07 -110.8794 27.83339
54 2015-05-10 20:24:09 2015-05-10 20:24:09 -110.8795 27.83340
55 2015-05-10 20:24:11 2015-05-10 20:24:11 -110.8796 27.83341
56 2015-05-10 20:24:13 2015-05-10 20:24:13 -110.8796 27.83342
57 2015-05-10 20:24:15 2015-05-10 20:24:15 -110.8797 27.83343
58 2015-05-10 20:24:17 2015-05-10 20:24:17 -110.8798 27.83344
59 2015-05-10 20:24:19 2015-05-10 20:24:19 -110.8798 27.83345
60 2015-05-10 20:24:21 2015-05-10 20:24:21 -110.8799 27.83346
61 2015-05-10 20:24:23 2015-05-10 20:24:23 -110.8800 27.83347
62 2015-05-10 20:24:25 2015-05-10 20:24:25 -110.8800 27.83348
63 2015-05-10 20:24:27 2015-05-10 20:24:27 -110.8801 27.83349
64 2015-05-10 20:24:29 2015-05-10 20:24:29 -110.8802 27.83351
65 2015-05-10 20:24:31 2015-05-10 20:24:31 -110.8802 27.83352
66 2015-05-10 20:24:33 2015-05-10 20:24:33 -110.8803 27.83353
67 2015-05-10 20:24:35 2015-05-10 20:24:35 -110.8804 27.83355
68 2015-05-10 20:24:37 2015-05-10 20:24:37 -110.8804 27.83356
69 2015-05-10 20:24:39 2015-05-10 20:24:39 -110.8805 27.83358
70 2015-05-10 20:24:41 2015-05-10 20:24:41 -110.8806 27.83359
71 2015-05-10 20:24:43 2015-05-10 20:24:43 -110.8806 27.83361
72 2015-05-10 20:24:45 2015-05-10 20:24:45 -110.8807 27.83362
73 2015-05-10 20:24:47 2015-05-10 20:24:47 -110.8808 27.83364
74 2015-05-10 20:24:49 2015-05-10 20:24:49 -110.8809 27.83365
75 2015-05-10 20:24:51 2015-05-10 20:24:51 -110.8809 27.83367
76 2015-05-10 20:24:53 2015-05-10 20:24:53 -110.8810 27.83369
77 2015-05-10 20:24:55 2015-05-10 20:24:55 -110.8811 27.83370
78 2015-05-10 20:24:57 2015-05-10 20:24:57 -110.8811 27.83372
79 2015-05-10 20:24:59 2015-05-10 20:24:59 -110.8812 27.83374
              time.cpu       lon      lat  bearing     navdist     time.dif
1  2015-05-10 20:22:23 -110.8760 27.83284 270.9669 0.000000000 0.0000000000
2  2015-05-10 20:22:25 -110.8761 27.83285 273.6972 0.003564426 0.0005522222
3  2015-05-10 20:22:27 -110.8761 27.83285 272.8147 0.003731187 0.0005555556
4  2015-05-10 20:22:29 -110.8762 27.83285 272.7746 0.003674696 0.0005588889
5  2015-05-10 20:22:31 -110.8763 27.83286 276.4517 0.003727826 0.0005555556
6  2015-05-10 20:22:33 -110.8763 27.83286 274.5532 0.003746986 0.0005555556
7  2015-05-10 20:22:35 -110.8764 27.83287 276.2740 0.003788526 0.0005555556
8  2015-05-10 20:22:37 -110.8765 27.83287 274.8965 0.003852723 0.0005555556
9  2015-05-10 20:22:39 -110.8765 27.83288 275.3834 0.003523455 0.0005555556
10 2015-05-10 20:22:41 -110.8766 27.83289 276.4517 0.003846677 0.0005555556
11 2015-05-10 20:22:43 -110.8767 27.83289 277.3639 0.003746985 0.0005555556
12 2015-05-10 20:22:45 -110.8768 27.83290 278.0456 0.003754144 0.0005522222
13 2015-05-10 20:22:47 -110.8768 27.83291 275.3834 0.003867562 0.0005555556
14 2015-05-10 20:22:49 -110.8769 27.83292 278.8989 0.003846676 0.0005550000
15 2015-05-10 20:22:51 -110.8770 27.83292 277.5780 0.003499223 0.0005561111
16 2015-05-10 20:22:53 -110.8770 27.83293 279.1766 0.003648651 0.0005555556
17 2015-05-10 20:22:55 -110.8771 27.83294 279.7225 0.003771271 0.0005555556
18 2015-05-10 20:22:57 -110.8772 27.83295 279.3073 0.003561354 0.0005588889
19 2015-05-10 20:22:59 -110.8772 27.83296 280.9710 0.003718761 0.0005522222
20 2015-05-10 20:23:01 -110.8773 27.83297 282.1988 0.003792099 0.0005555556
21 2015-05-10 20:23:03 -110.8774 27.83299 281.1261 0.003699808 0.0005555556
22 2015-05-10 20:23:05 -110.8774 27.83300 282.1988 0.003739881 0.0005550000
23 2015-05-10 20:23:07 -110.8775 27.83301 282.3754 0.003699808 0.0005475000
24 2015-05-10 20:23:09 -110.8776 27.83303 283.4365 0.003647821 0.0005675000
25 2015-05-10 20:23:11 -110.8776 27.83304 283.6885 0.003881876 0.0005436111
26 2015-05-10 20:23:13 -110.8777 27.83305 282.7439 0.003557566 0.0005555556
27 2015-05-10 20:23:15 -110.8778 27.83307 283.6213 0.003543953 0.0005636111
28 2015-05-10 20:23:17 -110.8778 27.83308 283.7669 0.003830143 0.0005555556
29 2015-05-10 20:23:19 -110.8779 27.83310 283.9912 0.003284993 0.0005555556
30 2015-05-10 20:23:21 -110.8780 27.83311 283.4888 0.003233337 0.0005555556
31 2015-05-10 20:23:23 -110.8780 27.83312 283.3910 0.003609283 0.0005555556
32 2015-05-10 20:23:25 -110.8781 27.83313 282.3106 0.003115850 0.0005475000
33 2015-05-10 20:23:27 -110.8781 27.83315 284.1060 0.003102607 0.0005555556
34 2015-05-10 20:23:29 -110.8782 27.83316 281.0325 0.003454260 0.0005636111
35 2015-05-10 20:23:31 -110.8783 27.83317 282.1047 0.003142668 0.0005469444
36 2015-05-10 20:23:33 -110.8783 27.83318 283.8942 0.003154608 0.0005555556
37 2015-05-10 20:23:35 -110.8784 27.83319 281.3446 0.003505887 0.0005555556
38 2015-05-10 20:23:37 -110.8785 27.83321 281.7921 0.003362988 0.0005555556
39 2015-05-10 20:23:39 -110.8785 27.83322 283.5496 0.003531297 0.0005680556
40 2015-05-10 20:23:41 -110.8786 27.83323 284.1060 0.003336693 0.0005436111
41 2015-05-10 20:23:43 -110.8786 27.83324 282.3754 0.003454257 0.0005555556
42 2015-05-10 20:23:45 -110.8787 27.83326 283.3390 0.003647813 0.0005555556
43 2015-05-10 20:23:47 -110.8788 27.83327 282.1555 0.003388441 0.0005555556
44 2015-05-10 20:23:49 -110.8788 27.83328 280.8337 0.003427201 0.0005555556
45 2015-05-10 20:23:51 -110.8789 27.83329 283.6886 0.003519616 0.0005550000
46 2015-05-10 20:23:53 -110.8790 27.83331 281.4496 0.003557558 0.0005555556
47 2015-05-10 20:23:55 -110.8790 27.83332 280.5177 0.003635521 0.0005555556
48 2015-05-10 20:23:57 -110.8791 27.83333 281.2856 0.003624178 0.0005555556
49 2015-05-10 20:23:59 -110.8792 27.83334 280.8337 0.003687681 0.0005555556
50 2015-05-10 20:24:01 -110.8792 27.83335 281.6184 0.003519614 0.0005555556
51 2015-05-10 20:24:03 -110.8793 27.83337 280.8202 0.003583391 0.0005555556
52 2015-05-10 20:24:05 -110.8794 27.83338 280.0203 0.003844329 0.0005555556
53 2015-05-10 20:24:07 -110.8794 27.83339 279.3073 0.003456514 0.0005555556
54 2015-05-10 20:24:09 -110.8795 27.83340 281.2856 0.003718746 0.0005680556
55 2015-05-10 20:24:11 -110.8796 27.83341 279.8692 0.003687678 0.0005350000
56 2015-05-10 20:24:13 -110.8796 27.83342 279.4418 0.003508914 0.0005555556
57 2015-05-10 20:24:15 -110.8797 27.83343 279.3073 0.003666256 0.0005555556
58 2015-05-10 20:24:17 -110.8798 27.83344 279.8692 0.003718745 0.0005555556
59 2015-05-10 20:24:19 -110.8798 27.83345 278.7662 0.003508913 0.0005555556
60 2015-05-10 20:24:21 -110.8799 27.83346 280.2193 0.003551775 0.0005555556
61 2015-05-10 20:24:23 -110.8800 27.83347 280.3664 0.003728839 0.0005555556
62 2015-05-10 20:24:25 -110.8800 27.83348 283.2947 0.003676494 0.0005555556
63 2015-05-10 20:24:27 -110.8801 27.83349 280.3664 0.003661032 0.0005636111
64 2015-05-10 20:24:29 -110.8802 27.83351 283.2947 0.003676493 0.0005555556
65 2015-05-10 20:24:31 -110.8802 27.83352 282.3754 0.003661031 0.0005475001
66 2015-05-10 20:24:33 -110.8803 27.83353 281.8604 0.003647804 0.0005636111
67 2015-05-10 20:24:35 -110.8804 27.83355 284.4134 0.003803863 0.0005475001
68 2015-05-10 20:24:37 -110.8804 27.83356 284.0064 0.003623625 0.0005555556
69 2015-05-10 20:24:39 -110.8805 27.83358 283.8113 0.003726787 0.0005761111
70 2015-05-10 20:24:41 -110.8806 27.83359 284.0064 0.003778435 0.0005350000
71 2015-05-10 20:24:43 -110.8806 27.83361 283.8113 0.003726786 0.0005555556
72 2015-05-10 20:24:45 -110.8807 27.83362 284.0064 0.003778434 0.0005555556
73 2015-05-10 20:24:47 -110.8808 27.83364 285.7860 0.003726785 0.0005555556
74 2015-05-10 20:24:49 -110.8809 27.83365 284.4924 0.003757402 0.0005555556
75 2015-05-10 20:24:51 -110.8809 27.83367 285.5684 0.003844586 0.0005636111
76 2015-05-10 20:24:53 -110.8810 27.83369 284.0065 0.003808634 0.0005475001
77 2015-05-10 20:24:55 -110.8811 27.83370 285.1503 0.003726783 0.0005555556
78 2015-05-10 20:24:57 -110.8811 27.83372 287.3881 0.003911257 0.0005555556
79 2015-05-10 20:24:59 -110.8812 27.83374       NA 0.003621383 0.0005555556
   navspeed
1  0.000000
2  6.454695
3  6.716136
4  6.575003
5  6.710088
6  6.744575
7  6.819347
8  6.934901
9  6.342218
10 6.924019
11 6.744573
12 6.798250
13 6.961612
14 6.930948
15 6.292310
16 6.567572
17 6.788287
18 6.372204
19 6.734174
20 6.825777
21 6.659655
22 6.738523
23 6.757640
24 6.427878
25 7.140906
26 6.403619
27 6.287940
28 6.894257
29 5.912987
30 5.820007
31 6.496709
32 5.691050
33 5.584692
34 6.128800
35 5.745864
36 5.678294
37 6.310597
38 6.053379
39 6.216465
40 6.138014
41 6.217663
42 6.566064
43 6.099194
44 6.168961
45 6.341651
46 6.403605
47 6.543939
48 6.523520
49 6.637825
50 6.335305
51 6.450103
52 6.919792
53 6.221725
54 6.546448
55 6.892856
56 6.316046
57 6.599260
58 6.693741
59 6.316044
60 6.393194
61 6.711911
62 6.617689
63 6.495671
64 6.617687
65 6.686814
66 6.472202
67 6.947695
68 6.522524
69 6.468869
70 7.062496
71 6.708215
72 6.801182
73 6.708214
74 6.763323
75 6.821345
76 6.956409
77 6.708210
78 7.040262
79 6.518490

echogram documentation built on Dec. 16, 2019, 9:30 a.m.