Month: June 2024
Script Error for Shared Mailbox Threshold Report
Hello All
Am getting the below error , while am trying to run the below script
i would like to get the report on exchange server 2019 to find the list of shared mailboxes whose shared mailbox near filled with specific Percentage
Could someone run the script and help me please
Say of example : if any shared mailbox reach 50 % of usage . it should get give in the report
==================================================================
$ThresholdPercentage = 50 # Example: 90%
# Get all mailboxes and their quotas
$mailboxes = Get-Mailbox -ResultSize Unlimited
foreach ($mailbox in $mailboxes) {
# Calculate the usage percentage
if ($mailbox.ProhibitSendReceiveQuota -ne “unlimited”) {
$quota = [int]$mailbox.ProhibitSendReceiveQuota
$usage = [int]$mailbox.TotalItemSize.Value.ToBytes() / $quota * 100
}
else {
# If the quota is unlimited, consider it as 0% usage (since it’s not limited)
$usage = 0
}
# Check if usage exceeds the threshold
if ($usage -ge $ThresholdPercentage) {
# Output or process the mailbox as needed
Write-Host “Mailbox $($mailbox.DisplayName) ($($mailbox.PrimarySmtpAddress)) is at $($usage)% of quota.”
# Optionally, you can output to a CSV file or perform other actions
# Example: $mailbox | Select DisplayName, PrimarySmtpAddress, @{Name=”UsagePercentage”;Expression={$usage}} | Export-Csv -Path “MailboxUsageReport.csv” -Append -NoTypeInformation
}
}
===========================================================
Hello All Am getting the below error , while am trying to run the below script i would like to get the report on exchange server 2019 to find the list of shared mailboxes whose shared mailbox near filled with specific Percentage Could someone run the script and help me please Say of example : if any shared mailbox reach 50 % of usage . it should get give in the report ==================================================================$ThresholdPercentage = 50 # Example: 90%# Get all mailboxes and their quotas$mailboxes = Get-Mailbox -ResultSize Unlimited foreach ($mailbox in $mailboxes) { # Calculate the usage percentage if ($mailbox.ProhibitSendReceiveQuota -ne “unlimited”) { $quota = [int]$mailbox.ProhibitSendReceiveQuota $usage = [int]$mailbox.TotalItemSize.Value.ToBytes() / $quota * 100 } else { # If the quota is unlimited, consider it as 0% usage (since it’s not limited) $usage = 0 } # Check if usage exceeds the threshold if ($usage -ge $ThresholdPercentage) { # Output or process the mailbox as needed Write-Host “Mailbox $($mailbox.DisplayName) ($($mailbox.PrimarySmtpAddress)) is at $($usage)% of quota.” # Optionally, you can output to a CSV file or perform other actions # Example: $mailbox | Select DisplayName, PrimarySmtpAddress, @{Name=”UsagePercentage”;Expression={$usage}} | Export-Csv -Path “MailboxUsageReport.csv” -Append -NoTypeInformation }}=========================================================== Read More
How to convert matlab to python?
I use library compiler to convert matlab code to python, my code listed. The conversion is successful but I can’t use the code in python.
Matlab Code:
classdef testApp
properties
a1 = 0;
a2 = 0;
end
methods
function obj = start(obj,x1,x2)
obj.a1 = x1;
obj.a2 = x2;
end
end
end
Python Code:
import matlab
import testApp
aaa = testApp.initialize()
a = aaa.start(1,2)
vv = 1
Error:
SystemError: Error in MATLAB Compiler SDK for Python. Details: An error occurred during evaluation of the function start. Details: Function start not found in Python package.I use library compiler to convert matlab code to python, my code listed. The conversion is successful but I can’t use the code in python.
Matlab Code:
classdef testApp
properties
a1 = 0;
a2 = 0;
end
methods
function obj = start(obj,x1,x2)
obj.a1 = x1;
obj.a2 = x2;
end
end
end
Python Code:
import matlab
import testApp
aaa = testApp.initialize()
a = aaa.start(1,2)
vv = 1
Error:
SystemError: Error in MATLAB Compiler SDK for Python. Details: An error occurred during evaluation of the function start. Details: Function start not found in Python package. I use library compiler to convert matlab code to python, my code listed. The conversion is successful but I can’t use the code in python.
Matlab Code:
classdef testApp
properties
a1 = 0;
a2 = 0;
end
methods
function obj = start(obj,x1,x2)
obj.a1 = x1;
obj.a2 = x2;
end
end
end
Python Code:
import matlab
import testApp
aaa = testApp.initialize()
a = aaa.start(1,2)
vv = 1
Error:
SystemError: Error in MATLAB Compiler SDK for Python. Details: An error occurred during evaluation of the function start. Details: Function start not found in Python package. matlab, python MATLAB Answers — New Questions
Generate Low Frequency using ePWM module
Dear Sir,
I would like to generate low frequency PWM using ePWM module. I use F28377D to generate it in simulink as [1].
I try to generate 50 hz frequency using prescaller divider as shown [2], the detail implementation purposed in simulation of as shown in [3].Also the ePWM setting as in [4]
"however, there is no output in ePWM pinout"
Could you please to assist me pelase ?Dear Sir,
I would like to generate low frequency PWM using ePWM module. I use F28377D to generate it in simulink as [1].
I try to generate 50 hz frequency using prescaller divider as shown [2], the detail implementation purposed in simulation of as shown in [3].Also the ePWM setting as in [4]
"however, there is no output in ePWM pinout"
Could you please to assist me pelase ? Dear Sir,
I would like to generate low frequency PWM using ePWM module. I use F28377D to generate it in simulink as [1].
I try to generate 50 hz frequency using prescaller divider as shown [2], the detail implementation purposed in simulation of as shown in [3].Also the ePWM setting as in [4]
"however, there is no output in ePWM pinout"
Could you please to assist me pelase ? c2000, f28377d, epwm MATLAB Answers — New Questions
Generate deadband smaller than Ts (sample time)
Hi,
I am working with MPC for control inverter.
the output MPC connected to GPIO DO.
however i need to add deadband between MPC and GPIO.
Ts = 50e-6. and i would like to generate deadband 1e-6.
1.how to generate deadband smaller than Ts in C2000 Simulink ?
2. If there is possible to use ePWM module, hiw to set up ePWM module ?Hi,
I am working with MPC for control inverter.
the output MPC connected to GPIO DO.
however i need to add deadband between MPC and GPIO.
Ts = 50e-6. and i would like to generate deadband 1e-6.
1.how to generate deadband smaller than Ts in C2000 Simulink ?
2. If there is possible to use ePWM module, hiw to set up ePWM module ? Hi,
I am working with MPC for control inverter.
the output MPC connected to GPIO DO.
however i need to add deadband between MPC and GPIO.
Ts = 50e-6. and i would like to generate deadband 1e-6.
1.how to generate deadband smaller than Ts in C2000 Simulink ?
2. If there is possible to use ePWM module, hiw to set up ePWM module ? c2000, mpc, gpio, epwm, simulink MATLAB Answers — New Questions
Can we join CSSP (Microsoft Cloud Storage Partner Program) and sell to customer PaaS service?
Can we join CSSP (Microsoft Cloud Storage Partner Program) to do the integration with Microsoft Office 365, build a functionality of compose and edit documents online on the web browser and sell to customer as PaaS service? Customer wants to store files in their private cloud.
Can we join CSSP (Microsoft Cloud Storage Partner Program) to do the integration with Microsoft Office 365, build a functionality of compose and edit documents online on the web browser and sell to customer as PaaS service? Customer wants to store files in their private cloud. Read More
Shortcut to Open Windows 11 Copilot and Microphone
I’d like a shortcut to start Copilot and open the microphone so that I can immediately ask my question.
Currently, I press Win + C to open Copilot, but then I have to click the microphone to start asking my questions.
Is there a way to open Copilot in some way that lets me just start talking?
I’d like a shortcut to start Copilot and open the microphone so that I can immediately ask my question.Currently, I press Win + C to open Copilot, but then I have to click the microphone to start asking my questions. Is there a way to open Copilot in some way that lets me just start talking? Read More
fixing clock frequency and sample time of control system model using hdl coder
I have built a fixed point PID controller in simulink and could generate the code using hdl coder for programming FPGA. The generated verilog code has additional inputs such as clock, clock enable. During simulation, I fixed the sample time of the discrete models to .01 seconds. I am unable to understand the difference between the input clock and the sample time. Could you please clarify? (btw My FPGA recieves external clock of 50MHz)I have built a fixed point PID controller in simulink and could generate the code using hdl coder for programming FPGA. The generated verilog code has additional inputs such as clock, clock enable. During simulation, I fixed the sample time of the discrete models to .01 seconds. I am unable to understand the difference between the input clock and the sample time. Could you please clarify? (btw My FPGA recieves external clock of 50MHz) I have built a fixed point PID controller in simulink and could generate the code using hdl coder for programming FPGA. The generated verilog code has additional inputs such as clock, clock enable. During simulation, I fixed the sample time of the discrete models to .01 seconds. I am unable to understand the difference between the input clock and the sample time. Could you please clarify? (btw My FPGA recieves external clock of 50MHz) pid MATLAB Answers — New Questions
How to Imorting a text file containig indexes and the coressponding elements of a matrix to matlab?
want to get a matrix from a text file that contains the corresponding elements and there indexes.want to get a matrix from a text file that contains the corresponding elements and there indexes. want to get a matrix from a text file that contains the corresponding elements and there indexes. .matrix file MATLAB Answers — New Questions
Find the max of a vector recursive
Hello all,
Im trying to find the max value of an element in a vector, for learning purposes Ineed to do this recursive. I have been trying this all over again but something goes terribly worng. Could anybody point out to me what I am doing wrong? Thanks in advance.
function output = recursive_max(input)
%%Write a function called recursive_max that finds the maximum element in a
%%vector. You are not allowed to use loops or any built-in functions other
%%than length. The sole output argument is the maximum value in the input
%%vector. Hint: the maximum value of a vector is the larger of its first
%%element and the maximum of the rest of the elements.
l = length(input);
if l == 1
output = recursive_max(input(end))
else
if input(end-1) >= input(end)
input(end) = [];
recursive_max(input);
end
input(end-1) = []
end
endHello all,
Im trying to find the max value of an element in a vector, for learning purposes Ineed to do this recursive. I have been trying this all over again but something goes terribly worng. Could anybody point out to me what I am doing wrong? Thanks in advance.
function output = recursive_max(input)
%%Write a function called recursive_max that finds the maximum element in a
%%vector. You are not allowed to use loops or any built-in functions other
%%than length. The sole output argument is the maximum value in the input
%%vector. Hint: the maximum value of a vector is the larger of its first
%%element and the maximum of the rest of the elements.
l = length(input);
if l == 1
output = recursive_max(input(end))
else
if input(end-1) >= input(end)
input(end) = [];
recursive_max(input);
end
input(end-1) = []
end
end Hello all,
Im trying to find the max value of an element in a vector, for learning purposes Ineed to do this recursive. I have been trying this all over again but something goes terribly worng. Could anybody point out to me what I am doing wrong? Thanks in advance.
function output = recursive_max(input)
%%Write a function called recursive_max that finds the maximum element in a
%%vector. You are not allowed to use loops or any built-in functions other
%%than length. The sole output argument is the maximum value in the input
%%vector. Hint: the maximum value of a vector is the larger of its first
%%element and the maximum of the rest of the elements.
l = length(input);
if l == 1
output = recursive_max(input(end))
else
if input(end-1) >= input(end)
input(end) = [];
recursive_max(input);
end
input(end-1) = []
end
end recursion MATLAB Answers — New Questions
How can I hide the gear icon?
I want to be able to hide the gear icon for a group in SharePoint online. Basically only owners/admins should be able to see the gear. What is the best way to get this done? Is there an extension for this?
Thanks for all the ideas.
I want to be able to hide the gear icon for a group in SharePoint online. Basically only owners/admins should be able to see the gear. What is the best way to get this done? Is there an extension for this?Thanks for all the ideas. Read More
New Column in SharePoint List based on another column
Hi
I have an existing SharePoint list with 600+ rows where I’m trying to add an additional column based of an existing column.
Existing Column is Product and is a text field that contains the product description in the format: colour range type
e.g.
Blue RangeName TypeName
Dark Blue RangeName TypeName
Light Blue RangeName TypeName
I want my new column to extract the Colour from the product text.( Where colour may be more than 1 word)
I’m struggling to work out how I can do this. I essentially need to remove the last 2 words from the product text to obtain the colour.
Does anyone have any suggestions?
Thanks
Hi I have an existing SharePoint list with 600+ rows where I’m trying to add an additional column based of an existing column.Existing Column is Product and is a text field that contains the product description in the format: colour range type e.g.Blue RangeName TypeNameDark Blue RangeName TypeNameLight Blue RangeName TypeName I want my new column to extract the Colour from the product text.( Where colour may be more than 1 word) I’m struggling to work out how I can do this. I essentially need to remove the last 2 words from the product text to obtain the colour. Does anyone have any suggestions? Thanks Read More
Azure AI Search for offloading cross partition queries in Cosmos Db?
HI Azure Cosmos Db team,
We were testing on a design to use Azure AI Search indexing on Cosmos Db and use AI Search for cross partition queries that was coming to cosmos db.AI Search will return the unique Id that can be used for point read in Cosmos Db. Apart from having eventual consistency always when incorporating this design which is a disadvantage can we guarantee accuracy with Azure AI Search equality and greater than filters for transactional workloads? We can ensure cosmos db will give the correct response ( accurate) when requested with a query for transactional workloads? We are not utilizing synapse link because of concurrency and API Centric application architecture.
With Regards,
Nitin Rahim
HI Azure Cosmos Db team, We were testing on a design to use Azure AI Search indexing on Cosmos Db and use AI Search for cross partition queries that was coming to cosmos db.AI Search will return the unique Id that can be used for point read in Cosmos Db. Apart from having eventual consistency always when incorporating this design which is a disadvantage can we guarantee accuracy with Azure AI Search equality and greater than filters for transactional workloads? We can ensure cosmos db will give the correct response ( accurate) when requested with a query for transactional workloads? We are not utilizing synapse link because of concurrency and API Centric application architecture. With Regards,Nitin Rahim Read More
Powershell JEA – WMI Queries
Hi,
I’m looking at using PowerShell JEA to run some WMI queries aimed at monitoring servers. Is this possible? An example of the query is below.
The objective is to prevent the service account used by the monitoring application from having local administrator access.
Hi, I’m looking at using PowerShell JEA to run some WMI queries aimed at monitoring servers. Is this possible? An example of the query is below. The objective is to prevent the service account used by the monitoring application from having local administrator access. SELECT Name,VolumeName,FileSystem from Win32_LogicalDiskWHERE DriveType=’3’SELECT Name fromWin32_PerfRawData_PerfDisk_LogicalDiskSELECT Name fromWin32_PerfRawData_PerfDisk_PhysicalDisk Read More
How to add SE module in GoogLeNet for classification?
How to add SE module in GoogLeNet for classification?How to add SE module in GoogLeNet for classification? How to add SE module in GoogLeNet for classification? googlenet, semodule, classification MATLAB Answers — New Questions
How to fix: “This pc doesn’t meet the minimum requirements for Windows 11”
I’m trying to upgrade my old PC to Windows 11, but I’m encountering a problem. The error message says, “This PC doesn’t meet the minimum requirements for Windows 11.” Despite having upgraded the hardware over the years, including adding more RAM and storage, the issue persists. I’ve checked that the processor should be compatible and have enabled both Secure Boot and TPM 2.0 in the BIOS. Despite these efforts, I still can’t proceed with the installation. I’m looking for advice on how to identify and fix whatever is causing this incompatibility, so I can successfully upgrade my PC to Windows 11. Any help would be greatly appreciated.
I’m trying to upgrade my old PC to Windows 11, but I’m encountering a problem. The error message says, “This PC doesn’t meet the minimum requirements for Windows 11.” Despite having upgraded the hardware over the years, including adding more RAM and storage, the issue persists. I’ve checked that the processor should be compatible and have enabled both Secure Boot and TPM 2.0 in the BIOS. Despite these efforts, I still can’t proceed with the installation. I’m looking for advice on how to identify and fix whatever is causing this incompatibility, so I can successfully upgrade my PC to Windows 11. Any help would be greatly appreciated. Read More
Excel Labs Add-in fails to load (“internal error”)
Installed Excel Labs Add-in from MS Store. Icon appears in ribbon. When clicked, “loading appears” for several secs. Then “Failed to Load” and “internal error” messages appear. Retried and reinstalled many times with same result.
MSO 2019
MS Windows 10 Home
Installed Excel Labs Add-in from MS Store. Icon appears in ribbon. When clicked, “loading appears” for several secs. Then “Failed to Load” and “internal error” messages appear. Retried and reinstalled many times with same result.MSO 2019MS Windows 10 Home Read More
Sending the form response itself to approvers
Hello all,
I had an issue regarding sending a form response to specific approvers, where I wanted to allow approvers to receive a link or file of the filled-out form in the same format as if the user is reading their own filled out form, instead of sending approvers the dynamic values inside the form.
Is there any way to generate a link or some other possible method? Any help would be greatly appreciated.
Hello all, I had an issue regarding sending a form response to specific approvers, where I wanted to allow approvers to receive a link or file of the filled-out form in the same format as if the user is reading their own filled out form, instead of sending approvers the dynamic values inside the form. Is there any way to generate a link or some other possible method? Any help would be greatly appreciated. Read More
Customers asking to contact Microsoft support directly while under CSP?
Hi folks
How do you deal with a customer who wants to connect with Microsoft support directly instead of relaying their issues through CSP?
Some are legitimate issue and some are minor. However, customer is not willing to pay CSP for Azure support for example.
Also, is there a way for them to get access to support at a direct level if they are under Azure CSP?
Thank you in advance.
Hi folksHow do you deal with a customer who wants to connect with Microsoft support directly instead of relaying their issues through CSP?Some are legitimate issue and some are minor. However, customer is not willing to pay CSP for Azure support for example. Also, is there a way for them to get access to support at a direct level if they are under Azure CSP? Thank you in advance. Read More
How do I disable the Close button at the top right corner of figure window and the Close option in the title bar menu in MATLAB 7.6 (R2008a)?
I want to disable the Close button on the upper left corner of a figure window and the Close menu item in the Title bar menu in a GUI application.I want to disable the Close button on the upper left corner of a figure window and the Close menu item in the Title bar menu in a GUI application. I want to disable the Close button on the upper left corner of a figure window and the Close menu item in the Title bar menu in a GUI application. disable, close, button, closerequestfcn MATLAB Answers — New Questions
SURVEY BY MULTIPLE BACKSIGHT ANGLE MEASUREMENT
Calculate the approximate PT-TM06 coordinates of the point (M0, P0) using one of the methods taught in theoretical classes (e.g., Mayer’s method), using three of the targeted points (the configuration of the three chosen points should be the most appropriate for resolving the simple inverse intersection); you may (and should) also solve the problem graphically.
Determine the corrections to the coordinates (ΔM, ΔP) and the zero limb bearing (R0) using the Least Squares Method (LSM), using the algorithm for indirect measurements given in theoretical classes.
Determine the adjusted coordinates of the point in question and its elevation, taking the average (most probable value) of all obtained elevation values for the point; given the distance to the targeted points, you should consider the curvature of the Earth and the atmospheric refraction effect (k=0.14) in the elevation calculation.
I can atatch the measurements
The first point i was able to do (i think), the rest is what messes with my train of though
%Pontos visados
%Clérigos
clr_M = -40420.448;
clr_P = 164167.927;
clr_H = 141.13;
%Direta Progressiva (dp)
clr_ah_dp = 102.8444;
clr_av_dp = 97.7522;
%Inversa Regressiva (ir)
clr_ah_ir = 302.8566;
clr_av_ir = 302.2442;
%Inversa Progressiva (ip)
clr_ah_ip = 302.8561;
clr_av_ip = 302.2467;
%Direta Regressiva (dr)
clr_ah_dr = 102.8617;
clr_av_dr = 97.7503;
%Câmara municipal do porto
cm_M = -40088.726;
cm_P = 164636.884;
cm_H = 152.33;
%Direta Progressiva (dp)
cm_ah_dp = 129.6582;
cm_av_dp = 97.4767;
%Inversa Regressiva (ir)
cm_ah_ir = 329.6599;
cm_av_ir = 302.5056;
%Inversa Progressiva (ip)
cm_ah_ip =329.6628;
cm_av_ip =302.3095;
%Direta Regressiva (dr)
cm_ah_dr = 129.6708;
cm_av_dr = 97.4755;
%igreja da lapa
il_M = -40209.736;
il_P = 165426.432;
il_H = 176.03;
%Direta Progressiva (dp)
il_ah_dp = 137.6340 ;
il_av_dp = 97.6790;
%Inversa Regressiva (ir)
il_ah_ir = 337.6339;
il_av_ir = 302.3148;
%Inversa Progressiva (ip)
il_ah_ip = 337.6455;
il_av_ip = 302.3175;
%Direta Regressiva (dr)
il_ah_dr = 137.6501;
il_av_dr = 97.6786;
%Jornal de Noticias
jn_M = -39934.342;
jn_P = 165011.012;
jn_H = 170.79;
%Direta Progressiva (dp)
jn_ah_dp = 141.7560;
jn_av_dp = 97.2225;
%Inversa Regressiva (ir)
jn_ah_ir = 341.7596;
jn_av_ir = 302.7853;
%Inversa Progressiva (ip)
jn_ah_ip = 341.7649;
jn_av_ip = 302.7908;
%Direta Regressiva (dr)
jn_ah_dr = 141.7680;
jn_av_dr = 97.2106;
%Depósito de água
da_M = -39336.276;
da_P = 165413.16;
da_H = 185.48;
%Direta Progressiva (dp)
da_ah_dp = 163.9711;
da_av_dp = 97.1290;
%Inversa Regressiva (ir)
da_ah_ir = 363.9730;
da_av_ir = 302.8053;
%Inversa Progressiva (ip)
da_ah_ip = 363.9772;
da_av_ip = 302.8023;
%Direta Regressiva (dr)
da_ah_dr = 163.9848;
da_av_dr = 97.1911;
%Igreja do Bonfim
ib_M = -38614.9280;
ib_P = 164792.1040;
ib_H = 162.20;
%Direta Progressiva (dp)
ib_ah_dp = 194.7617;
ib_av_dp = 97.3887;
%Inversa Regressiva (ir)
ib_ah_ir = 394.7702;
ib_av_ir = 302.5992;
%Inversa Progressiva (ip)
ib_ah_ip = 394.7724;
ib_av_ip = 302.5994;
%Direta Regressiva (dr)
ib_ah_dr = 194.7772;
ib_av_dr = 97.3917;
%Gondomar(v.g.)
g_M = -33142.6520;
g_P = 163536.09;
g_H = 203.27;
%Direta Progressiva (dp)
g_ah_dp = 260.0913;
g_av_dp = 98.9460;
%Inversa Regressiva (ir)
g_ah_ir = 60.0908;
g_av_ir = 301.0498;
%Inversa Progressiva (ip)
g_ah_ip = 60.0992;
g_av_ip = 301.0477;
%Direta Regressiva (dr)
g_ah_dr = 260.0978;
g_av_dr = 98.9363;
%
%3 Pontos- Jornal de noticias, Igreja do bonfim e depósito de água-
dir_clr = ((clr_ah_dp+clr_ah_ir-200+clr_ah_ip-200+clr_ah_dr)/4)*(180/200);
dir_cm = ((cm_ah_dp+cm_ah_ir-200+cm_ah_ip-200+cm_ah_dr)/4)*(180/200);
dir_il = ((il_ah_dp+il_ah_ir-200+il_ah_ip-200+il_ah_dr)/4)*(180/200);
dir_jn = ((jn_ah_dp+jn_ah_ir-200+jn_ah_ip-200+jn_ah_dr)/4)*(180/200);
dir_da = ((da_ah_dp+da_ah_ir-200+da_ah_ip-200+da_ah_dr)/4)*(180/200);
dir_ib = ((ib_ah_dp+ib_ah_ir-200+ib_ah_ip-200+ib_ah_dr)/4)*(180/200);
dir_g = ((g_ah_dp+g_ah_ir-200+g_ah_ip-200+g_ah_dr+400)/4)*(180/200);
%Calculo rumos BA e BC (ponto A – Câmara do Porto, B- Depósito de água e C-
%Igreja do bonfim)
R_BA = atand((cm_M-da_M)/(cm_P-da_P))+180;
R_BC = atand((ib_M-da_M)/(ib_P-da_P))+180;
%Calculo do angulo phi
a_phi=R_BA-R_BC;
%Calculo distâncias horizontais
d_BA = sqrt((cm_M-da_M)^2+(cm_P-da_P)^2);
d_BC = sqrt((ib_M-da_M)^2+(ib_P-da_P)^2);
%Calculo do R
a_alpha = dir_da – dir_cm;
a_beta = dir_ib – dir_da;
R = 360-(a_alpha+a_beta+a_phi);
%Calculo do S
S=(d_BC+sind(a_alpha))/(d_BA*sind(a_beta));
%Calculo do gama
a_gama = atand(sind(R)/(S+cosd(R)))+90;
%Calculo tetha
a_theta=R-a_gama;
%calculo phi1
a_phi1= 180-(a_theta+a_alpha);
%Calculo distancia Camara do Porto(A) ao ponto P(local observação)
d_AP=d_BA*((sind(a_phi1))/sind(a_alpha));
%Calculo Rumo AP
RAP = R_BA-180+a_theta;
%Coordenadas aproximadas M0 e P0
M0 = cm_M + d_AP*sind(RAP);
P0 = cm_P + d_AP*cosd(RAP);
%Distancia ao ponto aproximado
d_clr = sqrt((M0-clr_M)^2+(P0-clr_P)^2);
d_cm = sqrt((M0-cm_M)^2+(P0-cm_P)^2);
d_il = sqrt((M0-il_M)^2+(P0-il_P)^2);
d_jn = sqrt((M0-jn_M)^2+(P0-jn_P)^2);
d_da = sqrt((M0-da_M)^2+(P0-da_P)^2);
d_ib = sqrt((M0-ib_M)^2+(P0-ib_P)^2);
d_g = sqrt((M0-g_M)^2+(P0-g_P)^2);
%Rumos ao ponto aproximado
r_clr = atand((clr_M-M0)/(clr_P-P0));
r_cm = atand((cm_M-M0)/(cm_P-P0));
r_il = atand((il_M-M0)/(il_P-P0))+360;
r_jn = atand((jn_M-M0)/(jn_P-P0));
r_da = atand((da_M-M0)/(da_P-P0));
r_ib = atand((ib_M-M0)/(ib_P-P0))+360;
r_g = atand((g_M-M0)/(g_P-P0))+360;
%Matriz dos coeficientes
A = [-(clr_P-P0)/d_clr^2*180/pi (clr_M-M0)/d_clr^2*180/pi -1;
-(cm_P-P0)/d_cm^2*180/pi (cm_M-M0)/d_cm^2*180/pi -1;
-(il_P-P0)/d_il^2*180/pi (il_M-M0)/d_il^2*180/pi -1;
-(jn_P-P0)/d_jn^2*180/pi (jn_M-M0)/d_jn^2*180/pi -1;
-(da_P-P0)/d_da^2*180/pi (da_M-M0)/d_da^2*180/pi -1;
-(ib_P-P0)/d_ib^2*180/pi (ib_M-M0)/d_ib^2*180/pi -1;
-(g_P-P0)/d_g^2*180/pi (g_M-M0)/d_g^2*180/pi -1];
%Vetor b
b = [dir_clr-r_clr;
dir_cm-r_cm;
dir_il-r_il;
dir_jn-r_jn;
dir_da-r_da;
dir_ib-r_ib;
dir_g-r_g];
%Matriz dos pesos
W=eye(7);
%Matriz equações normais
N=A’*W*A ;
%Calculo correções coordenadas
delta = inv(N) * A’ * W * b;
%coordenadas compensadas
M0_f=M0+delta(1);
P0_f=P0+delta(2);Calculate the approximate PT-TM06 coordinates of the point (M0, P0) using one of the methods taught in theoretical classes (e.g., Mayer’s method), using three of the targeted points (the configuration of the three chosen points should be the most appropriate for resolving the simple inverse intersection); you may (and should) also solve the problem graphically.
Determine the corrections to the coordinates (ΔM, ΔP) and the zero limb bearing (R0) using the Least Squares Method (LSM), using the algorithm for indirect measurements given in theoretical classes.
Determine the adjusted coordinates of the point in question and its elevation, taking the average (most probable value) of all obtained elevation values for the point; given the distance to the targeted points, you should consider the curvature of the Earth and the atmospheric refraction effect (k=0.14) in the elevation calculation.
I can atatch the measurements
The first point i was able to do (i think), the rest is what messes with my train of though
%Pontos visados
%Clérigos
clr_M = -40420.448;
clr_P = 164167.927;
clr_H = 141.13;
%Direta Progressiva (dp)
clr_ah_dp = 102.8444;
clr_av_dp = 97.7522;
%Inversa Regressiva (ir)
clr_ah_ir = 302.8566;
clr_av_ir = 302.2442;
%Inversa Progressiva (ip)
clr_ah_ip = 302.8561;
clr_av_ip = 302.2467;
%Direta Regressiva (dr)
clr_ah_dr = 102.8617;
clr_av_dr = 97.7503;
%Câmara municipal do porto
cm_M = -40088.726;
cm_P = 164636.884;
cm_H = 152.33;
%Direta Progressiva (dp)
cm_ah_dp = 129.6582;
cm_av_dp = 97.4767;
%Inversa Regressiva (ir)
cm_ah_ir = 329.6599;
cm_av_ir = 302.5056;
%Inversa Progressiva (ip)
cm_ah_ip =329.6628;
cm_av_ip =302.3095;
%Direta Regressiva (dr)
cm_ah_dr = 129.6708;
cm_av_dr = 97.4755;
%igreja da lapa
il_M = -40209.736;
il_P = 165426.432;
il_H = 176.03;
%Direta Progressiva (dp)
il_ah_dp = 137.6340 ;
il_av_dp = 97.6790;
%Inversa Regressiva (ir)
il_ah_ir = 337.6339;
il_av_ir = 302.3148;
%Inversa Progressiva (ip)
il_ah_ip = 337.6455;
il_av_ip = 302.3175;
%Direta Regressiva (dr)
il_ah_dr = 137.6501;
il_av_dr = 97.6786;
%Jornal de Noticias
jn_M = -39934.342;
jn_P = 165011.012;
jn_H = 170.79;
%Direta Progressiva (dp)
jn_ah_dp = 141.7560;
jn_av_dp = 97.2225;
%Inversa Regressiva (ir)
jn_ah_ir = 341.7596;
jn_av_ir = 302.7853;
%Inversa Progressiva (ip)
jn_ah_ip = 341.7649;
jn_av_ip = 302.7908;
%Direta Regressiva (dr)
jn_ah_dr = 141.7680;
jn_av_dr = 97.2106;
%Depósito de água
da_M = -39336.276;
da_P = 165413.16;
da_H = 185.48;
%Direta Progressiva (dp)
da_ah_dp = 163.9711;
da_av_dp = 97.1290;
%Inversa Regressiva (ir)
da_ah_ir = 363.9730;
da_av_ir = 302.8053;
%Inversa Progressiva (ip)
da_ah_ip = 363.9772;
da_av_ip = 302.8023;
%Direta Regressiva (dr)
da_ah_dr = 163.9848;
da_av_dr = 97.1911;
%Igreja do Bonfim
ib_M = -38614.9280;
ib_P = 164792.1040;
ib_H = 162.20;
%Direta Progressiva (dp)
ib_ah_dp = 194.7617;
ib_av_dp = 97.3887;
%Inversa Regressiva (ir)
ib_ah_ir = 394.7702;
ib_av_ir = 302.5992;
%Inversa Progressiva (ip)
ib_ah_ip = 394.7724;
ib_av_ip = 302.5994;
%Direta Regressiva (dr)
ib_ah_dr = 194.7772;
ib_av_dr = 97.3917;
%Gondomar(v.g.)
g_M = -33142.6520;
g_P = 163536.09;
g_H = 203.27;
%Direta Progressiva (dp)
g_ah_dp = 260.0913;
g_av_dp = 98.9460;
%Inversa Regressiva (ir)
g_ah_ir = 60.0908;
g_av_ir = 301.0498;
%Inversa Progressiva (ip)
g_ah_ip = 60.0992;
g_av_ip = 301.0477;
%Direta Regressiva (dr)
g_ah_dr = 260.0978;
g_av_dr = 98.9363;
%
%3 Pontos- Jornal de noticias, Igreja do bonfim e depósito de água-
dir_clr = ((clr_ah_dp+clr_ah_ir-200+clr_ah_ip-200+clr_ah_dr)/4)*(180/200);
dir_cm = ((cm_ah_dp+cm_ah_ir-200+cm_ah_ip-200+cm_ah_dr)/4)*(180/200);
dir_il = ((il_ah_dp+il_ah_ir-200+il_ah_ip-200+il_ah_dr)/4)*(180/200);
dir_jn = ((jn_ah_dp+jn_ah_ir-200+jn_ah_ip-200+jn_ah_dr)/4)*(180/200);
dir_da = ((da_ah_dp+da_ah_ir-200+da_ah_ip-200+da_ah_dr)/4)*(180/200);
dir_ib = ((ib_ah_dp+ib_ah_ir-200+ib_ah_ip-200+ib_ah_dr)/4)*(180/200);
dir_g = ((g_ah_dp+g_ah_ir-200+g_ah_ip-200+g_ah_dr+400)/4)*(180/200);
%Calculo rumos BA e BC (ponto A – Câmara do Porto, B- Depósito de água e C-
%Igreja do bonfim)
R_BA = atand((cm_M-da_M)/(cm_P-da_P))+180;
R_BC = atand((ib_M-da_M)/(ib_P-da_P))+180;
%Calculo do angulo phi
a_phi=R_BA-R_BC;
%Calculo distâncias horizontais
d_BA = sqrt((cm_M-da_M)^2+(cm_P-da_P)^2);
d_BC = sqrt((ib_M-da_M)^2+(ib_P-da_P)^2);
%Calculo do R
a_alpha = dir_da – dir_cm;
a_beta = dir_ib – dir_da;
R = 360-(a_alpha+a_beta+a_phi);
%Calculo do S
S=(d_BC+sind(a_alpha))/(d_BA*sind(a_beta));
%Calculo do gama
a_gama = atand(sind(R)/(S+cosd(R)))+90;
%Calculo tetha
a_theta=R-a_gama;
%calculo phi1
a_phi1= 180-(a_theta+a_alpha);
%Calculo distancia Camara do Porto(A) ao ponto P(local observação)
d_AP=d_BA*((sind(a_phi1))/sind(a_alpha));
%Calculo Rumo AP
RAP = R_BA-180+a_theta;
%Coordenadas aproximadas M0 e P0
M0 = cm_M + d_AP*sind(RAP);
P0 = cm_P + d_AP*cosd(RAP);
%Distancia ao ponto aproximado
d_clr = sqrt((M0-clr_M)^2+(P0-clr_P)^2);
d_cm = sqrt((M0-cm_M)^2+(P0-cm_P)^2);
d_il = sqrt((M0-il_M)^2+(P0-il_P)^2);
d_jn = sqrt((M0-jn_M)^2+(P0-jn_P)^2);
d_da = sqrt((M0-da_M)^2+(P0-da_P)^2);
d_ib = sqrt((M0-ib_M)^2+(P0-ib_P)^2);
d_g = sqrt((M0-g_M)^2+(P0-g_P)^2);
%Rumos ao ponto aproximado
r_clr = atand((clr_M-M0)/(clr_P-P0));
r_cm = atand((cm_M-M0)/(cm_P-P0));
r_il = atand((il_M-M0)/(il_P-P0))+360;
r_jn = atand((jn_M-M0)/(jn_P-P0));
r_da = atand((da_M-M0)/(da_P-P0));
r_ib = atand((ib_M-M0)/(ib_P-P0))+360;
r_g = atand((g_M-M0)/(g_P-P0))+360;
%Matriz dos coeficientes
A = [-(clr_P-P0)/d_clr^2*180/pi (clr_M-M0)/d_clr^2*180/pi -1;
-(cm_P-P0)/d_cm^2*180/pi (cm_M-M0)/d_cm^2*180/pi -1;
-(il_P-P0)/d_il^2*180/pi (il_M-M0)/d_il^2*180/pi -1;
-(jn_P-P0)/d_jn^2*180/pi (jn_M-M0)/d_jn^2*180/pi -1;
-(da_P-P0)/d_da^2*180/pi (da_M-M0)/d_da^2*180/pi -1;
-(ib_P-P0)/d_ib^2*180/pi (ib_M-M0)/d_ib^2*180/pi -1;
-(g_P-P0)/d_g^2*180/pi (g_M-M0)/d_g^2*180/pi -1];
%Vetor b
b = [dir_clr-r_clr;
dir_cm-r_cm;
dir_il-r_il;
dir_jn-r_jn;
dir_da-r_da;
dir_ib-r_ib;
dir_g-r_g];
%Matriz dos pesos
W=eye(7);
%Matriz equações normais
N=A’*W*A ;
%Calculo correções coordenadas
delta = inv(N) * A’ * W * b;
%coordenadas compensadas
M0_f=M0+delta(1);
P0_f=P0+delta(2); Calculate the approximate PT-TM06 coordinates of the point (M0, P0) using one of the methods taught in theoretical classes (e.g., Mayer’s method), using three of the targeted points (the configuration of the three chosen points should be the most appropriate for resolving the simple inverse intersection); you may (and should) also solve the problem graphically.
Determine the corrections to the coordinates (ΔM, ΔP) and the zero limb bearing (R0) using the Least Squares Method (LSM), using the algorithm for indirect measurements given in theoretical classes.
Determine the adjusted coordinates of the point in question and its elevation, taking the average (most probable value) of all obtained elevation values for the point; given the distance to the targeted points, you should consider the curvature of the Earth and the atmospheric refraction effect (k=0.14) in the elevation calculation.
I can atatch the measurements
The first point i was able to do (i think), the rest is what messes with my train of though
%Pontos visados
%Clérigos
clr_M = -40420.448;
clr_P = 164167.927;
clr_H = 141.13;
%Direta Progressiva (dp)
clr_ah_dp = 102.8444;
clr_av_dp = 97.7522;
%Inversa Regressiva (ir)
clr_ah_ir = 302.8566;
clr_av_ir = 302.2442;
%Inversa Progressiva (ip)
clr_ah_ip = 302.8561;
clr_av_ip = 302.2467;
%Direta Regressiva (dr)
clr_ah_dr = 102.8617;
clr_av_dr = 97.7503;
%Câmara municipal do porto
cm_M = -40088.726;
cm_P = 164636.884;
cm_H = 152.33;
%Direta Progressiva (dp)
cm_ah_dp = 129.6582;
cm_av_dp = 97.4767;
%Inversa Regressiva (ir)
cm_ah_ir = 329.6599;
cm_av_ir = 302.5056;
%Inversa Progressiva (ip)
cm_ah_ip =329.6628;
cm_av_ip =302.3095;
%Direta Regressiva (dr)
cm_ah_dr = 129.6708;
cm_av_dr = 97.4755;
%igreja da lapa
il_M = -40209.736;
il_P = 165426.432;
il_H = 176.03;
%Direta Progressiva (dp)
il_ah_dp = 137.6340 ;
il_av_dp = 97.6790;
%Inversa Regressiva (ir)
il_ah_ir = 337.6339;
il_av_ir = 302.3148;
%Inversa Progressiva (ip)
il_ah_ip = 337.6455;
il_av_ip = 302.3175;
%Direta Regressiva (dr)
il_ah_dr = 137.6501;
il_av_dr = 97.6786;
%Jornal de Noticias
jn_M = -39934.342;
jn_P = 165011.012;
jn_H = 170.79;
%Direta Progressiva (dp)
jn_ah_dp = 141.7560;
jn_av_dp = 97.2225;
%Inversa Regressiva (ir)
jn_ah_ir = 341.7596;
jn_av_ir = 302.7853;
%Inversa Progressiva (ip)
jn_ah_ip = 341.7649;
jn_av_ip = 302.7908;
%Direta Regressiva (dr)
jn_ah_dr = 141.7680;
jn_av_dr = 97.2106;
%Depósito de água
da_M = -39336.276;
da_P = 165413.16;
da_H = 185.48;
%Direta Progressiva (dp)
da_ah_dp = 163.9711;
da_av_dp = 97.1290;
%Inversa Regressiva (ir)
da_ah_ir = 363.9730;
da_av_ir = 302.8053;
%Inversa Progressiva (ip)
da_ah_ip = 363.9772;
da_av_ip = 302.8023;
%Direta Regressiva (dr)
da_ah_dr = 163.9848;
da_av_dr = 97.1911;
%Igreja do Bonfim
ib_M = -38614.9280;
ib_P = 164792.1040;
ib_H = 162.20;
%Direta Progressiva (dp)
ib_ah_dp = 194.7617;
ib_av_dp = 97.3887;
%Inversa Regressiva (ir)
ib_ah_ir = 394.7702;
ib_av_ir = 302.5992;
%Inversa Progressiva (ip)
ib_ah_ip = 394.7724;
ib_av_ip = 302.5994;
%Direta Regressiva (dr)
ib_ah_dr = 194.7772;
ib_av_dr = 97.3917;
%Gondomar(v.g.)
g_M = -33142.6520;
g_P = 163536.09;
g_H = 203.27;
%Direta Progressiva (dp)
g_ah_dp = 260.0913;
g_av_dp = 98.9460;
%Inversa Regressiva (ir)
g_ah_ir = 60.0908;
g_av_ir = 301.0498;
%Inversa Progressiva (ip)
g_ah_ip = 60.0992;
g_av_ip = 301.0477;
%Direta Regressiva (dr)
g_ah_dr = 260.0978;
g_av_dr = 98.9363;
%
%3 Pontos- Jornal de noticias, Igreja do bonfim e depósito de água-
dir_clr = ((clr_ah_dp+clr_ah_ir-200+clr_ah_ip-200+clr_ah_dr)/4)*(180/200);
dir_cm = ((cm_ah_dp+cm_ah_ir-200+cm_ah_ip-200+cm_ah_dr)/4)*(180/200);
dir_il = ((il_ah_dp+il_ah_ir-200+il_ah_ip-200+il_ah_dr)/4)*(180/200);
dir_jn = ((jn_ah_dp+jn_ah_ir-200+jn_ah_ip-200+jn_ah_dr)/4)*(180/200);
dir_da = ((da_ah_dp+da_ah_ir-200+da_ah_ip-200+da_ah_dr)/4)*(180/200);
dir_ib = ((ib_ah_dp+ib_ah_ir-200+ib_ah_ip-200+ib_ah_dr)/4)*(180/200);
dir_g = ((g_ah_dp+g_ah_ir-200+g_ah_ip-200+g_ah_dr+400)/4)*(180/200);
%Calculo rumos BA e BC (ponto A – Câmara do Porto, B- Depósito de água e C-
%Igreja do bonfim)
R_BA = atand((cm_M-da_M)/(cm_P-da_P))+180;
R_BC = atand((ib_M-da_M)/(ib_P-da_P))+180;
%Calculo do angulo phi
a_phi=R_BA-R_BC;
%Calculo distâncias horizontais
d_BA = sqrt((cm_M-da_M)^2+(cm_P-da_P)^2);
d_BC = sqrt((ib_M-da_M)^2+(ib_P-da_P)^2);
%Calculo do R
a_alpha = dir_da – dir_cm;
a_beta = dir_ib – dir_da;
R = 360-(a_alpha+a_beta+a_phi);
%Calculo do S
S=(d_BC+sind(a_alpha))/(d_BA*sind(a_beta));
%Calculo do gama
a_gama = atand(sind(R)/(S+cosd(R)))+90;
%Calculo tetha
a_theta=R-a_gama;
%calculo phi1
a_phi1= 180-(a_theta+a_alpha);
%Calculo distancia Camara do Porto(A) ao ponto P(local observação)
d_AP=d_BA*((sind(a_phi1))/sind(a_alpha));
%Calculo Rumo AP
RAP = R_BA-180+a_theta;
%Coordenadas aproximadas M0 e P0
M0 = cm_M + d_AP*sind(RAP);
P0 = cm_P + d_AP*cosd(RAP);
%Distancia ao ponto aproximado
d_clr = sqrt((M0-clr_M)^2+(P0-clr_P)^2);
d_cm = sqrt((M0-cm_M)^2+(P0-cm_P)^2);
d_il = sqrt((M0-il_M)^2+(P0-il_P)^2);
d_jn = sqrt((M0-jn_M)^2+(P0-jn_P)^2);
d_da = sqrt((M0-da_M)^2+(P0-da_P)^2);
d_ib = sqrt((M0-ib_M)^2+(P0-ib_P)^2);
d_g = sqrt((M0-g_M)^2+(P0-g_P)^2);
%Rumos ao ponto aproximado
r_clr = atand((clr_M-M0)/(clr_P-P0));
r_cm = atand((cm_M-M0)/(cm_P-P0));
r_il = atand((il_M-M0)/(il_P-P0))+360;
r_jn = atand((jn_M-M0)/(jn_P-P0));
r_da = atand((da_M-M0)/(da_P-P0));
r_ib = atand((ib_M-M0)/(ib_P-P0))+360;
r_g = atand((g_M-M0)/(g_P-P0))+360;
%Matriz dos coeficientes
A = [-(clr_P-P0)/d_clr^2*180/pi (clr_M-M0)/d_clr^2*180/pi -1;
-(cm_P-P0)/d_cm^2*180/pi (cm_M-M0)/d_cm^2*180/pi -1;
-(il_P-P0)/d_il^2*180/pi (il_M-M0)/d_il^2*180/pi -1;
-(jn_P-P0)/d_jn^2*180/pi (jn_M-M0)/d_jn^2*180/pi -1;
-(da_P-P0)/d_da^2*180/pi (da_M-M0)/d_da^2*180/pi -1;
-(ib_P-P0)/d_ib^2*180/pi (ib_M-M0)/d_ib^2*180/pi -1;
-(g_P-P0)/d_g^2*180/pi (g_M-M0)/d_g^2*180/pi -1];
%Vetor b
b = [dir_clr-r_clr;
dir_cm-r_cm;
dir_il-r_il;
dir_jn-r_jn;
dir_da-r_da;
dir_ib-r_ib;
dir_g-r_g];
%Matriz dos pesos
W=eye(7);
%Matriz equações normais
N=A’*W*A ;
%Calculo correções coordenadas
delta = inv(N) * A’ * W * b;
%coordenadas compensadas
M0_f=M0+delta(1);
P0_f=P0+delta(2); topography, matrices MATLAB Answers — New Questions