Is it possible to add a custom sensor with rectangular FOV with the aerospace toolbox?

10 ビュー (過去 30 日間)
Enrico Resta
Enrico Resta 2023 年 11 月 20 日
回答済み: Moksh 2023 年 12 月 13 日
Hi all,
I have a simple satellite scenario
startTime = datetime(2023,2,21,18,0,0);
stopTime = startTime + hours(1);
sampleTime = 60; % seconds
sc = satelliteScenario(startTime,stopTime,sampleTime);
numSat = 33;
sats = walkerStar(sc, 500e3+6378.14e3, 86.4, numSat, 3, 2);
% sensor
g = gimbal(sats);
camSensor = conicalSensor(g,MaxViewAngle=60);
I would like to use, instead of a conical sensor that's built in in the aerospace toolbox, a rectangular sensor with two FOV angles. Is there a way to modify the conical sensor object or to build a new one that can be parented to the satellites?

採用された回答

Moksh
Moksh 2023 年 12 月 13 日
Hi Enrico,
I understand that in your satellite scenario generated from the “Aerospace Toolbox” in MATLAB, you want to use a rectangular sensor instead of a “conicalSensor”.
There is no built-in function for a rectangular sensor in the Aerospace toolbox, instead you can try the following possible workarounds:
  • Set the “MaxAngleView” property in the “conicalSensor” function to resemble a rectangular sensor as close as possible. This approach has limitations as this will always be an approximation and may not work in all the cases.
  • Build a custom sensor: You can create a new sensor class with 2 defined FOV angles and your desired measurement logic. This approach will offer greater accuracy and control to implement the desired logic.
Here is an example template for the custom class "RectangularSensor":
classdef RectangularSensor
properties
ParentSatellite % Parent satellite object
MaxViewAngleX % Maximum view angle in the X direction
MaxViewAngleY % Maximum view angle in the Y direction
end
methods
% Constructor for the custom Rectangular Sensor class
function obj = RectangularSensor(parentSatellite, maxViewAngleX, maxViewAngleY)
obj.ParentSatellite = parentSatellite;
obj.MaxViewAngleX = maxViewAngleX;
obj.MaxViewAngleY = maxViewAngleY;
end
function measurement = takeMeasurement(obj)
% Implement measurement logic for the rectangular sensor as per
% requirements
measurement = None;
end
end
end
Usage code for the above defined custom class:
% Create a satellite scenario
startTime = datetime(2023, 2, 21, 18, 0, 0);
stopTime = startTime + hours(1);
sampleTime = 60; % seconds
sc = satelliteScenario(startTime, stopTime, sampleTime);
% Create satellites
numSat = 33;
sats = walkerStar(sc, 500e3+6378.14e3, 86.4, numSat, 3, 2);
g = gimbal(sats);
% Create the custom rectangular sensor and attach it to the satellites
rectSensor = RectangularSensor(sats, 30, 40); % Example FOV angle
Refer to the following document, for more information about user-defined classes in MATLAB:
Hope this information helps resolve the query.
Best Regards,
Moksh Aggarwal

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeReference Applications についてさらに検索

タグ

製品


リリース

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by