VR-Engage  2.2
Loading...
Searching...
No Matches
makRadarFx::DtSarResponse Class Reference

Detailed Description

This class encapsulates the response from the RadarFX server to a SAR image request. It contains the image data itself (or a file path to the saved image), metadata about the image, and any error or warning information. The class also provides methods to access the platform position, orientation, and other contextual information at the time the image was captured.

#include <rfxSarMessage.h>

Inheritance diagram for makRadarFx::DtSarResponse:
[legend]

Public Member Functions

 DtSarResponse ()
 
virtual ~DtSarResponse ()
 
virtual void setError (DtImageError error)
 
virtual DtImageError error ()
 
virtual void setWarning (DtImageWarning error)
 
virtual DtImageWarning warning ()
 
virtual void setReturnMethod (unsigned int method)
 
virtual unsigned int returnMethod ()
 
virtual void setImageFormat (DtImageFormat format)
 
virtual DtImageFormat imageFormat ()
 
virtual void setImageSize (const DtImageSize &size)
 
virtual DtImageSize imageSize ()
 
virtual void setImageDataType (DtImageDataType type)
 
virtual DtImageDataType imageDataType ()
 
virtual void setFilename (const std::string &filename)
 
virtual std::string filename ()
 
virtual int dataLength ()
 
virtual void setData (unsigned char *buffer, int length)
 
virtual unsigned char * data ()
 
virtual void setOwnshipLocation (DtVector location)
 
virtual DtVector ownshipLocation ()
 
virtual void setOwnshipOrientation (DtTaitBryan orientation)
 
virtual DtTaitBryan ownshipOrientation ()
 
virtual void setSystemTime (double time)
 
virtual double systemTime ()
 
virtual void setCenterPosition (double lat, double lon, double alt)
 
virtual void getCenterPosition (double &lat, double &lon, double &alt)
 
virtual void setSensorViewDirection (double azimuth, double elevation)
 
virtual void getSensorViewDirection (double &azimuth, double &elevation)
 
virtual int messageSize ()
 
virtual DtBaseMessageclone ()
 
- Public Member Functions inherited from makRadarFx::DtImageResponse
 DtImageResponse ()
 
virtual ~DtImageResponse ()
 
- Public Member Functions inherited from makRadarFx::DtBaseMessage
 DtBaseMessage ()
 
virtual ~DtBaseMessage ()
 
virtual unsigned int messageType () const
 
virtual unsigned char * encode ()
 
virtual void setRequestorId (const std::string &requestor)
 
virtual std::string requestorId ()
 
virtual void setRequestId (int id)
 
virtual int requestId ()
 

Static Public Member Functions

static DtBaseMessagedecode (unsigned char *buffer, int length)
 

Protected Member Functions

virtual void serialize (DtStreamWriter &writer)
 
virtual void deserialize (DtStreamReader &reader)
 

Protected Attributes

DtImageError myError
 
DtImageWarning myWarning
 
DtImageSize myImageSize
 
unsigned int myReturnMethod
 
DtImageFormat myImageFormat
 
DtImageDataType myImageDataType
 
std::string myFilename
 
int myDataLength
 
unsigned char * myData
 
DtVector myOwnshipLocation
 
DtTaitBryan myOwnshipOrientation
 
double mySystemTime
 
double myCenterLat
 
double myCenterLon
 
double myCenterAlt
 
double mySensorDirectionAzimuth
 
double mySensorDirectionElevation
 
- Protected Attributes inherited from makRadarFx::DtBaseMessage
unsigned int myMessageType
 
std::string myRequestorId
 
int myRequestId
 

Constructor & Destructor Documentation

◆ DtSarResponse()

makRadarFx::DtSarResponse::DtSarResponse ( )

Default constructor.

Initializes a new SAR image response message with default settings

◆ ~DtSarResponse()

virtual makRadarFx::DtSarResponse::~DtSarResponse ( )
virtual

Virtual destructor.

Cleans up the response resources, including any allocated image data

Member Function Documentation

◆ setError()

virtual void makRadarFx::DtSarResponse::setError ( DtImageError error)
virtual

Sets the error code for this response.

Parameters
errorThe error code to set

Sets the error status for this SAR image response. Use IMAGE_NO_ERROR if the image was generated successfully.

References error().

◆ error()

virtual DtImageError makRadarFx::DtSarResponse::error ( )
virtual

Gets the error code for this response.

Returns
The current error code

Returns the error status for this SAR image response.

Referenced by setError(), and setWarning().

◆ setWarning()

virtual void makRadarFx::DtSarResponse::setWarning ( DtImageWarning error)
virtual

Sets the warning code for this response.

Parameters
errorThe warning code to set

Sets the warning status for this SAR image response. Unlike errors, warnings indicate that the image was generated but there may be quality issues or other non-critical problems.

References error().

◆ warning()

virtual DtImageWarning makRadarFx::DtSarResponse::warning ( )
virtual

Gets the warning code for this response.

Returns
The current warning code

Returns the warning status for this SAR image response.

◆ setReturnMethod()

virtual void makRadarFx::DtSarResponse::setReturnMethod ( unsigned int method)
virtual

Sets the image delivery method used.

Parameters
methodBitfield of DtImageReturnMethod values

Sets the delivery method actually used for this SAR image response. This may differ from what was requested if there were problems with the requested method.

◆ returnMethod()

virtual unsigned int makRadarFx::DtSarResponse::returnMethod ( )
virtual

Gets the image delivery method used.

Returns
Bitfield of delivery methods used

Returns the delivery method that was actually used for this SAR image.

◆ setImageFormat()

virtual void makRadarFx::DtSarResponse::setImageFormat ( DtImageFormat format)
virtual

Sets the image format used.

Parameters
formatThe image format enumeration value used

Sets the format that was actually used for the returned SAR image data. This may differ from what was requested if there were compatibility issues.

◆ imageFormat()

virtual DtImageFormat makRadarFx::DtSarResponse::imageFormat ( )
virtual

Gets the image format used.

Returns
The image format enumeration value used

Returns the format that was actually used for the SAR image.

◆ setImageSize()

virtual void makRadarFx::DtSarResponse::setImageSize ( const DtImageSize & size)
virtual

Sets the actual dimensions of the returned image.

Parameters
sizeThe actual image dimensions in pixels

Sets the actual dimensions of the returned SAR image in pixels. This may differ from what was requested due to image rotation or other processing requirements.

◆ imageSize()

virtual DtImageSize makRadarFx::DtSarResponse::imageSize ( )
virtual

Gets the actual dimensions of the returned image.

Returns
The actual image dimensions in pixels

Returns the actual dimensions of the returned SAR image.

◆ setImageDataType()

virtual void makRadarFx::DtSarResponse::setImageDataType ( DtImageDataType type)
virtual

Sets the image data type used.

Parameters
typeThe image data type enumeration value used

Sets the data type that was actually used for the pixel values in the SAR image. This is only relevant for RAW and NITF image formats and may differ from what was requested if there were compatibility issues.

◆ imageDataType()

virtual DtImageDataType makRadarFx::DtSarResponse::imageDataType ( )
virtual

Gets the image data type used.

Returns
The image data type enumeration value used

Returns the data type that was actually used for the SAR image pixels.

◆ setFilename()

virtual void makRadarFx::DtSarResponse::setFilename ( const std::string & filename)
virtual

Sets the full path of the saved image.

Parameters
filenameFull path to the saved image file

Sets the full path of the image file that was saved on the server. This is only applicable when the FILESYSTEM return method was used.

References filename().

◆ filename()

virtual std::string makRadarFx::DtSarResponse::filename ( )
virtual

Gets the full path of the saved image.

Returns
Full path to the saved image file

Returns the full path of the image file that was saved on the server. This will be empty if the FILESYSTEM return method was not used or if the save operation failed.

Referenced by setFilename().

◆ dataLength()

virtual int makRadarFx::DtSarResponse::dataLength ( )
virtual

Gets the size of the image data in bytes.

Returns
Size of the image data in bytes

Returns the size of the binary image data in bytes. This is only applicable when the STREAM return method was used.

◆ setData()

virtual void makRadarFx::DtSarResponse::setData ( unsigned char * buffer,
int length )
virtual

Sets the binary image data.

Parameters
bufferPointer to the image data buffer
lengthLength of the image data in bytes

Sets the binary image data for this response. This message class will take ownership of the buffer and manage its memory. This is only applicable when the STREAM return method is used.

◆ data()

virtual unsigned char * makRadarFx::DtSarResponse::data ( )
virtual

Gets the binary image data.

Returns
Pointer to the image data buffer

Returns a pointer to the binary image data. This will be nullptr if the STREAM return method was not used or if there was an error. The caller should not attempt to free this memory, as it is owned by this message object.

◆ setOwnshipLocation()

virtual void makRadarFx::DtSarResponse::setOwnshipLocation ( DtVector location)
virtual

Sets the platform position at the time of image capture.

Parameters
locationVector containing the platform position (latitude, longitude, altitude)

Sets the position of the platform (ownship) at the time when the SAR image was captured. This provides context for the image and can be used for geolocation purposes.

◆ ownshipLocation()

virtual DtVector makRadarFx::DtSarResponse::ownshipLocation ( )
virtual

Gets the platform position at the time of image capture.

Returns
Vector containing the platform position (latitude, longitude, altitude)

Returns the position of the platform (ownship) at the time the image was captured.

◆ setOwnshipOrientation()

virtual void makRadarFx::DtSarResponse::setOwnshipOrientation ( DtTaitBryan orientation)
virtual

Sets the platform orientation at the time of image capture.

Parameters
orientationTait-Bryan angles representing the platform orientation

Sets the orientation of the platform (ownship) at the time when the SAR image was captured. This provides context for the image and can be used for geolocation purposes.

◆ ownshipOrientation()

virtual DtTaitBryan makRadarFx::DtSarResponse::ownshipOrientation ( )
virtual

Gets the platform orientation at the time of image capture.

Returns
Tait-Bryan angles representing the platform orientation

Returns the orientation of the platform (ownship) at the time the image was captured.

◆ setSystemTime()

virtual void makRadarFx::DtSarResponse::setSystemTime ( double time)
virtual

Sets the UTC time when the image was captured.

Parameters
timeUTC time value (seconds since Unix epoch)

Sets the UTC time when the SAR image was captured. This provides temporal context for the image and can be used for synchronization with other data.

◆ systemTime()

virtual double makRadarFx::DtSarResponse::systemTime ( )
virtual

Gets the UTC time when the image was captured.

Returns
UTC time value (seconds since Unix epoch)

Returns the UTC time when the SAR image was captured.

◆ setCenterPosition()

virtual void makRadarFx::DtSarResponse::setCenterPosition ( double lat,
double lon,
double alt )
virtual

Sets the center position of the SAR image.

Parameters
latLatitude in degrees
lonLongitude in degrees
altAltitude in meters

Sets the geographic coordinates of the center point of the SAR image. This is the point where the sensor's view vector intersects with the terrain.

◆ getCenterPosition()

virtual void makRadarFx::DtSarResponse::getCenterPosition ( double & lat,
double & lon,
double & alt )
virtual

Gets the center position of the SAR image.

Parameters
latReference to store the latitude in degrees
lonReference to store the longitude in degrees
altReference to store the altitude in meters

Retrieves the geographic coordinates of the center point of the SAR image.

◆ setSensorViewDirection()

virtual void makRadarFx::DtSarResponse::setSensorViewDirection ( double azimuth,
double elevation )
virtual

Sets the sensor view direction.

Parameters
azimuthAzimuth angle in radians (clockwise from north)
elevationElevation angle in radians (from horizontal)

Sets the direction in which the radar sensor was pointing when the SAR image was captured. The azimuth is measured clockwise from north, and the elevation is measured from the horizontal plane.

◆ getSensorViewDirection()

virtual void makRadarFx::DtSarResponse::getSensorViewDirection ( double & azimuth,
double & elevation )
virtual

Gets the sensor view direction.

Parameters
azimuthReference to store the azimuth angle in radians
elevationReference to store the elevation angle in radians

Retrieves the direction in which the radar sensor was pointing when the SAR image was captured.

◆ messageSize()

virtual int makRadarFx::DtSarResponse::messageSize ( )
virtual

size of the message

Reimplemented from makRadarFx::DtBaseMessage.

◆ decode()

static DtBaseMessage * makRadarFx::DtSarResponse::decode ( unsigned char * buffer,
int length )
static

decode a message. Used by the factory

◆ clone()

virtual DtBaseMessage * makRadarFx::DtSarResponse::clone ( )
virtual

clone a message. Caller of function is responsible managing this memory

Implements makRadarFx::DtBaseMessage.

◆ serialize()

virtual void makRadarFx::DtSarResponse::serialize ( DtStreamWriter & writer)
protectedvirtual

Serializes the message data to a stream writer.

Parameters
writerReference to the stream writer to write the data to

Writes the message data to the provided stream writer. This protected method is called by the encode() method to convert the object to a byte array.

Reimplemented from makRadarFx::DtBaseMessage.

◆ deserialize()

virtual void makRadarFx::DtSarResponse::deserialize ( DtStreamReader & reader)
protectedvirtual

Deserializes message data from a stream reader.

Parameters
readerReference to the stream reader to read the data from

Reads the message data from the provided stream reader. This protected method is called by the decode() method to convert a byte array back to an object.

Reimplemented from makRadarFx::DtBaseMessage.

Member Data Documentation

◆ myError

DtImageError makRadarFx::DtSarResponse::myError
protected

Error code for this response.

◆ myWarning

DtImageWarning makRadarFx::DtSarResponse::myWarning
protected

Warning code for this response.

◆ myImageSize

DtImageSize makRadarFx::DtSarResponse::myImageSize
protected

Actual dimensions of the returned image.

◆ myReturnMethod

unsigned int makRadarFx::DtSarResponse::myReturnMethod
protected

Delivery method used for the image.

◆ myImageFormat

DtImageFormat makRadarFx::DtSarResponse::myImageFormat
protected

Format used for the image data.

◆ myImageDataType

DtImageDataType makRadarFx::DtSarResponse::myImageDataType
protected

Data type used for the image pixels.

◆ myFilename

std::string makRadarFx::DtSarResponse::myFilename
protected

Full path to the saved image file.

◆ myDataLength

int makRadarFx::DtSarResponse::myDataLength
protected

Length of the image data in bytes.

◆ myData

unsigned char* makRadarFx::DtSarResponse::myData
protected

Pointer to the binary image data.

◆ myOwnshipLocation

DtVector makRadarFx::DtSarResponse::myOwnshipLocation
protected

Platform position at time of image capture.

◆ myOwnshipOrientation

DtTaitBryan makRadarFx::DtSarResponse::myOwnshipOrientation
protected

Platform orientation at time of image capture.

◆ mySystemTime

double makRadarFx::DtSarResponse::mySystemTime
protected

UTC time of image capture.

◆ myCenterLat

double makRadarFx::DtSarResponse::myCenterLat
protected

Latitude of the image center point.

◆ myCenterLon

double makRadarFx::DtSarResponse::myCenterLon
protected

Longitude of the image center point.

◆ myCenterAlt

double makRadarFx::DtSarResponse::myCenterAlt
protected

Altitude of the image center point.

◆ mySensorDirectionAzimuth

double makRadarFx::DtSarResponse::mySensorDirectionAzimuth
protected

Azimuth angle of the sensor view direction.

◆ mySensorDirectionElevation

double makRadarFx::DtSarResponse::mySensorDirectionElevation
protected

Elevation angle of the sensor view direction.


The documentation for this class was generated from the following file: