- 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.
Is it possible to add a custom sensor with rectangular FOV with the aerospace toolbox?
10 次查看(过去 30 天)
显示 更早的评论
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?
0 个评论
采纳的回答
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:
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Satellite Mission Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!