diff options
Diffstat (limited to 'inst/ned2ecefv.m')
-rw-r--r-- | inst/ned2ecefv.m | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/inst/ned2ecefv.m b/inst/ned2ecefv.m index 7bdc137..f94e4f1 100644 --- a/inst/ned2ecefv.m +++ b/inst/ned2ecefv.m @@ -1,6 +1,6 @@ -## Copyright (c) 2014-2020 Michael Hirsch, Ph.D. -## Copyright (c) 2013-2020 Felipe Geremia Nievinski -## Copyright (C) 2020 Philip Nienhuis +## Copyright (c) 2014-2022 Michael Hirsch, Ph.D. +## Copyright (c) 2013-2022 Felipe Geremia Nievinski +## Copyright (C) 2020-2022 Philip Nienhuis ## ## Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions are met: @@ -69,7 +69,7 @@ ## w = 1000.0 ## @end example ## -## @seealso {ecef2nedv, ned2aer, ned2ecef, ned2geodetic} +## @seealso{ecef2nedv, ned2aer, ned2ecef, ned2geodetic} ## @end deftypefn ## Function adapted by anonymous contributor, see: @@ -106,11 +106,11 @@ function [u, v, w] = ned2ecefv (n, e, d, lat, lon, angleUnit = "degrees") error ("ned2ecefv: illegal input for 'angleUnit'"); endif - t = cos(lat) .* -d .- sin(lat) .* n; - w = sin(lat) .* -d .+ cos(lat) .* n; + t = cos(lat) .* -d - sin(lat) .* n; + w = sin(lat) .* -d + cos(lat) .* n; - u = cos(lon) .* t .- sin(lon) .* e; - v = sin(lon) .* t .+ cos(lon) .* e; + u = cos(lon) .* t - sin(lon) .* e; + v = sin(lon) .* t + cos(lon) .* e; endfunction |