Notifications
Clear all

Do any of you surveyors use MATLAB

11 Posts
6 Users
0 Reactions
2 Views
(@olemanriver)
Posts: 2432
Famed Member Registered
Topic starter
 

I was wondering if anyone uses MATLAB in their companies as part of any workflows. I used it in another setting and was wondering if anyone uses it at all. It is very powerful and many things can be automated and it can be used with other programs like python etc. Most of what we do is within our cad or survey programs so it is probably not cost effective to have it in a business setting. But as i sit here and relax I was just thinking if it would be justified in purchasing.?ÿ

 
Posted : 22/12/2022 7:19 pm
(@bill93)
Posts: 9834
 

I used Matlab, what is now a long time ago. It is a programming language, so you need to be comfortable with those concepts and its own rules that are not just like C or Basic.

Many useful things can be done with only a few commands. You can enter commands one at a time and see the results, or run full programs.

I liked its ability to customize graphs. Its library includes a large number of higher math functions.

It is especially efficient at quickly making computations on large vectors and arrays if you learn the right syntax to let it work as vectors instead of do loops.

 
Posted : 23/12/2022 5:40 am
(@toeknee)
Posts: 71
Trusted Member Registered
 

I use GNU Octave, though?ÿfor non-surveying calculations. ?ÿFree. ?ÿMostly compatible with MATLAB ?ÿ

Very useful.

https://gnu.org/software/octave/

 
Posted : 23/12/2022 5:56 am
(@olemanriver)
Posts: 2432
Famed Member Registered
Topic starter
 

@bill93 yes MATLAB is a powerful package. ?ÿ It is used a lot where I worked before and for transformations adjustments and all for orbital science etc. ?ÿI was just wondering if anyone used it in daily work flows or not. I reckon most software we have today probably has a MATLAB basis built in or similar. Or was used as a check. I have been slowly reading some of the help tools for using python macros to customize some things i. Trimble Business Center. ?ÿI am no code writer but have used MATLAB and did a little with python. But I had a lot of help from the computer savvy folks doing some things in python. ?ÿI was thinking of taking a basic python course and such as I have some deliverable reports that are done daily and truly not advanced but was looking at the potential to automate them a bit more. ?ÿIts those 15 to 30 minutes of workflow that if I could cut down because they are repetitive that would give me double the time on something else. ?ÿWe all know if it takes 10 minutes to do a task itself and That alone gets done often in long run its worth the time savings. And its more time saved than the actual function itself because you have to move in and out to a different project etc. ?ÿThe simple small things add up and from my experience its always the little things that get overlooked that cause the big traffic jam . The 5 minute task cost us hours as an example. ?ÿBut 30 minutes a day over the course of a project adds up.

 
Posted : 23/12/2022 6:15 am
(@rover83)
Posts: 2346
Noble Member Registered
 

I used Matlab in school, when I went back for my four-year degree. It had been a mandated course right up until the year I was set to take it, but I needed another class' worth of credits so I just went ahead and took it.

I was taking Spatial Data Adjustments II at the same time, so I worked up a Matlab routine that would parse a RW5, extract all the observations and run LSA on it.

I'm not that great at coding, so it's a testament to how easy Matlab is to work with. I can see the applications for surveying if one did not have access to the industry programs, but it requires not only good coding skills, but knowledge of the underlying math, as well as knowledge of surveying/geomatics.

If I had the money I'd keep Matlab around permanently to play with, but a grand per year is still pretty steep.

 
Posted : 23/12/2022 6:33 am
(@olemanriver)
Posts: 2432
Famed Member Registered
Topic starter
 

@rover83 yes for sure. ?ÿYou can do a lot of work on the qa/qc of lidar etc. and other things with MatLab for sure. Remote sensing is a perfect tool for matlab. ?ÿBut then like you stated one must understand the underlying math and understand colors in signature form and numerical value for all colors. ?ÿThat is how I started with remote sensing and such was all about numbers vs colors and signature returns. ?ÿBut i love colors i use to keep color pencils and highlighters to organize field data on plans etc. ?ÿback when plans were rolled up and rolled out on a hood of a truck etc. i use it still comparing things etc. ?ÿi see all the folks getting into mobile lidar now. And ortho photogrammetry with drones etc. ?ÿi see a lot of mistakes and a lot of good ?ÿpractices as well. I need to dive into this myself as it has been a while since i did ortho with imagery and remote sensing msi xray hsi but not much on private sector side. So i need to get my head wrapped around it and see how i can apply what i have done before.

 
Posted : 23/12/2022 7:01 am
(@geeoddmike)
Posts: 1556
Noble Member Registered
 

Matlab does have a ƒ??Home licenseƒ? that is NOT available for government, academic, commercial or other institutional use. Cost is 149USD; Toolboxes are 45USD each.

I have been using it regularly for a couple decades as a professional and as an academic. Since retiring I obtained my own copies. My old 2011 MacBook ran it fine until it topped out at the High Sierra O/S update and became unreliable. Along with my new MacBook Pro M1 chip, I bought a new Home license. Works fine.

While there are a number of functions available in the Mapping Toolbox that could make my work easier, I choose to create my own. There are a number of sources for MatLab scripts and functions. I recommend those developed and posted for ƒ??freeƒ? use by Prof Kai Borre. He co-wrote with Prof Gil Strang the texts ƒ??Linear Algebra,Geodesy, and GPSƒ? and ƒ??Algorithms for GPS.ƒ??ÿ

Some of his scripts are available on GitHub here: https://github.com/mfkiwl/borre--easySuite

In addition to the Mapping Toolbox, I would also recommend the Matlab Symbolic Toolbox.

Getting back to the OP, I do not know whether Matlab would fit well within the workflow of most surveying or GPS packages at the local firm level.

There are free Matlab-like packages. I have used the Scilab package and found it quite capable. IMO, none of the alternatives are as well integrated.

Link to Matlab products site: https://www.mathworks.com/products.html?s_tid=gn_ps

?ÿ

?ÿ

3A0B9278 69AA 4C81 BD66 92D84CCF98A3

?ÿ

 
Posted : 23/12/2022 2:04 pm
(@olemanriver)
Posts: 2432
Famed Member Registered
Topic starter
 

@geeoddmike Thank you. I did not know about the home license. I new about all the toolbox and such. I might buy the home license just for myself to play with. Thank you for passing the information along.

 
Posted : 23/12/2022 3:50 pm
(@aliquot)
Posts: 2318
Noble Member Registered
 

I have used MATLAB but not for surveying. The calculations for surveying are usually simple enough if the software we already have can't already do it an excel spreadsheet can handle it fine.?ÿ

 
Posted : 24/12/2022 7:08 am
(@geeoddmike)
Posts: 1556
Noble Member Registered
 

@aliquot?ÿ

While I imagine your software does the cartesian to geodetic coordinate transformations, doing so via spreadsheet requires more effort (and expertise) than I have ever managed.

Shown below is Prof Kai Borre's code including multiple reference ellipsoids and formatted output. This problem requires iteration.

Matlab is so much clearer and powerful than spreadsheets. Of course, I gave up on them in the 1990s when many of their functions were shown to be subpar. I imagine they have improved since then.

Last time I bought a car I did create a spreadsheet to explore various options. Choose the right tool for the task...?ÿ

function [b,l,h] = cart2geo(X,Y,Z,i)
%CART2GEO Conversion of Cartesian coordinates (X,Y,Z) to geographical
% coordinates (phi,lambda,h) on a selected reference ellipsoid
% Choices i of Reference Ellipsoid for Geographical Coordinates
% 1. International Ellipsoid 1924
% 2. International Ellipsoid 1967
% 3. World Geodetic System 1972
% 4. Geodetic Reference System 1980
% 5. World Geodetic System 1984
?ÿ
%Kai Borre 10-13-98
%Copyright (c) by Kai Borre
%$Revision: 1.0 $ $Date: 1998/10/23 $
?ÿ
a = [6378388 6378160 6378135 6378137 6378137];
f = [1/297 1/298.247 1/298.26 1/298.257222101 1/298.257223563];
?ÿ
lambda = atan2(Y,X);
ex2 = (2-f(i))*f(i)/((1-f(i))^2);
c = a(i)*sqrt(1+ex2);
phi = atan(Z/((sqrt(X^2+Y^2)*(1-(2-f(i)))*f(i))));
?ÿ
h = 0.1; oldh = 0;
while abs(h-oldh) > 1.e-12
oldh = h;
N = c/sqrt(1+ex2*cos(phi)^2);
phi = atan(Z/((sqrt(X^2+Y^2)*(1-(2-f(i))*f(i)*N/(N+h)))));
h = sqrt(X^2+Y^2)/cos(phi)-N;
end
?ÿ
phi = phi*180/pi;
b = zeros(1,3);
b(1) = fix(phi);
b(2) = fix(rem(phi,b(1,1))*60);
b(3) = (phi-b(1,1)-b(1,2)/60)*3600;
lambda = lambda*180/pi;
l = zeros(1,3);
l(1) = fix(lambda);
l(2) = fix(rem(lambda,l(1,1))*60);
l(3) = (lambda-l(1,1)-l(1,2)/60)*3600;
fprintf('n phi =%3.0f %3.0f %8.5f',b(1),b(2),b(3))
fprintf('n lambda =%3.0f %3.0f %8.5f',l(1),l(2),l(3))
fprintf('n h =%14.3fn',h)
%%%%%%%%%%%%%% end cart2geo.m %%%%%%%%%%%%%%%%%%%
 
Posted : 24/12/2022 12:18 pm
(@aliquot)
Posts: 2318
Noble Member Registered
 

@geeoddmike yes these days survey specific software makes it just button pushing. Matlab is definitely more powerful than Excell, but you can do a lot with Excell, especially if you have a little programing experience.?ÿ When I first started working for a surveyor I did a set of transformations from state plane to geodetic with Excell, because Carlson hadn't added the capability to deal with geodetic bearings yet.

For the very heavy stuff I used FORTRAN.?ÿ

 
Posted : 24/12/2022 2:07 pm
Share: