Skip to main content

Message Definition API

raptor_sync_message_definition.proto

ActivateApiLogIndication

The ActivateApiLogIndication requests the server to activate API logging for the given stream.

FieldTypeDescription
stream_iduint64The stream for which the API logging shall be activated.

ApiError

An ApiError is returned by the server in response to a malformed or unexpected UserMessage.

FieldType
error_typeApiError.ErrorType

Attitude

Attitude message. All input attitude values to Raptor Sync is expected to be degrees. All response values from Raptor Sync will be degrees.

For KLV oriented user applications yaw is equal to heading/azimuth angle, pitch is pitch/elevation angle and roll is roll angle.

FieldType
yawdouble
pitchdouble
rolldouble

DeactivateApiLogIndication

The DeactivateApiLogInication requests the server to deactivate API logging for the given stream.

FieldTypeDescription
stream_iduint64The stream for which the API logging shall be deactivated.

FieldOfView

Field of view message. All input field of view to Raptor Sync is expected to be degrees. All response values from Raptor Sync will be degrees.

FieldType
horizontaldouble
verticaldouble

Frame

The Frame message encapsulate raster data as well as metadata for an image.

FieldTypeDescription
metadataImageMetadataImage metadata.
rgb_imageRgbImage
png_imagePngImage
grayscale_imageGrayscaleImage

GeoRegistration

Geo registration message. A grid of 3D points earth intersection points produced by ray/terrain intersections.

The grid size and layout is specified through Raptor Sync configuration outside the message API.

Each point in the grid represents a UV coordinate (normalized image space, see below) and the 3D coordinate where a ray from the camera through that UV coordinate intersect the terrain.

If Raptor Sync is unable to perform the ray intersection (e.g. because outside of database, image is looking into the sky) the 3D point for an earth intersection is NaN (not a number).

The UV coordinates used by Raptor Sync looks like:

 U axis ----->       V axis
|
0 0 ------- 1 0 |
| | |
| | |
| 0.5 0.5 | |
| | |
| | |
0 1 ------- 1 1 \ /
FieldTypeLabelDescription
earth_intersectionGeoRegistration.EarthIntersectionrepeatedAn array of earth intersection.

GeoRegistration.EarthIntersection

EarthIntersection message.

FieldTypeDescription
udoubleU coordinate in range [0.0 - 1.0].
vdoubleV coordinate in range [0.0 - 1.0].
locationPointThe location where the ray intersects the terrain.

GrayscaleImage

FieldTypeDescription
widthuint32Pixel width of the image.
heightuint32Pixel height of the image.
rawbytesRaster data is inlined in the message body.
pathstringRaster data is external and can be read from the the file system at path.

ImageMetadata

Image metadata message. The message contains information describing how the image was captured.

FieldTypeDescription
positionPointSensor position.
attitudeAttitudeSensor attitude.
fovFieldOfViewImage field of view.
lens_parametersLensParametersLens distortion parameters.

LensParameters

Lens distortion message. Parameters are describing radial distortion.

Can be set to zero.

FieldType
k2double
k3double
k4double

ListReferenceDatasetsRequest

Request the list of reference datasets used for the given stream. The server will response with a ListReferenceDatasetsResponse message.

FieldTypeDescription
stream_iduint64The stream for which to list reference datasets.

ListReferenceDatasetsResponse

Message listing reference datasets used by particular stream, sent in response to a successful ListReferenceDatasetsRequest user message.

FieldTypeLabelDescription
stream_iduint64The stream from which the list of reference datasets comes.
reference_datasetsstringrepeatedPaths to reference datasets used by the stream.

OpenStreamRequest

Request the server to open a new registration stream. The server will respond with an OpenStreamResponse message.

FieldTypeLabelDescription
reference_datasetsstringrepeatedPaths to reference datasets to use for the stream. May be empty, in which case the server must have been started with default reference datasets.

OpenStreamResponse

Message sent in response to a successful OpenStreamRequest user message.

FieldTypeDescription
stream_iduint64The stream id assigned to the new stream.

PngImage

PngImage message.

FieldTypeDescription
rawbytesImage data inlined in message body.
pathstringImage data is external and can be read from the file system at path.

Point

A 3D point message. Shall be interpreted according to the coordinate system being used.

latitude and longitude are in degrees, and height is expressed as a negative number.

FieldType
latitudedouble
longitudedouble
heightdouble

RaptorSyncMessage

The RaptorSyncMessage is an enumeration of messages that can be sent from Raptor Sync to the user application.

FieldType
responseRegistrationResponse
errorRegistrationError
apiErrorApiError
openStreamResponseOpenStreamResponse
versionResponseVersionResponse
listReferenceDatasetsResponseListReferenceDatasetsResponse

RegistrationError

The RegistrationError is sent from Raptor Sync to the user in case of an error related to registration of a frame.

FieldTypeDescription
stream_iduint64Identity for the stream. The message will reply with the identifier from the request.
frame_iduint64Identity for the frame. The message will reply with the identifier from the request.
error_typeRegistrationError.ErrorType
error_stringstringSome more information about the error in string form.

RegistrationRequest

The RegistrationRequest message initiates the start of an image registration.

FieldTypeDescription
stream_iduint64Identity for the stream which the image belongs to. Images from different feeds/sources must not be mixed in the same stream. The user application is expected to manage the streams properly. Raptor Sync will create an internal context when it receives a request with an unknown stream identifier. Raptor Sync may remove the internal context for streams that are inactive.
frame_iduint64Identity for the frame. Assigned by the user application.
frameFrameFrame content.

RegistrationResponse

The RegistrationResponse message is the reply from Raptor Sync to the user application.

FieldTypeDescription
stream_iduint64Identity for the stream. The response will reply with the identifier from the request.
frame_iduint64Identity for the frame. The response will reply with the identifier from the request.
figure_of_meritdoubleFigure of merit, or FOM, is a value describing the similarity (correlation) between the input image and the best fitting image rendered from the database during the registration procedure. Successful registrations will return FOM-values in range [0.0 - 1.0]. A higher value indicates a better result. In case of error Raptor Sync will return -1.
metadataImageMetadataImage metadata updated during the Raptor Sync procedure.
geo_registrationGeoRegistrationA grid of geo registration points from the registered image's footprint on ground. The size and layout of the geo registration grid is configured outside the message API.

RgbImage

RgbImage message.

FieldTypeDescription
widthuint32Pixel width of the image.
heightuint32Pixel height of the image.
rawbytesRaster data is inlined in the message body.
pathstringRaster data is external and can be read from the the file system at path.

UserMessage

The UserMessage is an enumeration of messages that can be sent from the user application.

FieldType
requestRegistrationRequest
activateApiLogIndicationActivateApiLogIndication
deactivateApiLogIndicationDeactivateApiLogIndication
openStreamRequestOpenStreamRequest
versionRequestVersionRequest
listReferenceDatasetsRequestListReferenceDatasetsRequest

VersionRequest

Request version information from the server. The server will respond with a VersionResponse message.

VersionResponse

Message with server version information, sent in response to a VersionRequest user message.

FieldTypeDescription
branchstringRaptor Sync server branch.
revisionstringRaptor Sync server revision.

ApiError.ErrorType

Enumeration of possible types of error.

NameNumberDescription
INVALID_STREAM_ID0The stream id specified in a user message could not be matched to a live stream.
NO_REFERENCE_DATASETS1No reference datasets have been specified when attempting to start a new stream.

RegistrationError.ErrorType

Enumeration of possible types of error.

NameNumberDescription
MISSING_FRAME0The Frame object was missing from the RegistrationRequest
MISSING_METADATA1The ImageMetadata object was missing from the Frame object
MISSING_IMAGE2No RgbImage or PngImage was present in the Frame object
INVALID_INPUT_COORDINATE_SYSTEM3Raptor Sync could not decipher the input coordinate system, check the error_string for more information
INTERNAL_FAIL_CREATE_IMAGE4Raptor Sync could not internally create an image, check the error_string for more information
INTERNAL_FAIL_CREATE_PROJECTION5Raptor Sync could not internally create a projection from the input metadata, check the error_string for more information
INTERNAL_FAIL_REGISTRATION6Raptor Sync failed to register the provided frame. This can typically happen if the frame lies outside of the provided database, or if the frame points away from the database, e.g. to the sky
NO_REFERENCE_DATASETS7No reference datasets have been set for this stream.

Scalar Value Types

.proto TypeNotesC++JavaPythonGoC#PHPRuby
doubledoubledoublefloatfloat64doublefloatFloat
floatfloatfloatfloatfloat32floatfloatFloat
int32Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead.int32intintint32intintegerBignum or Fixnum (as required)
int64Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead.int64longint/longint64longinteger/stringBignum
uint32Uses variable-length encoding.uint32intint/longuint32uintintegerBignum or Fixnum (as required)
uint64Uses variable-length encoding.uint64longint/longuint64ulonginteger/stringBignum or Fixnum (as required)
sint32Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.int32intintint32intintegerBignum or Fixnum (as required)
sint64Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.int64longint/longint64longinteger/stringBignum
fixed32Always four bytes. More efficient than uint32 if values are often greater than 2^28.uint32intintuint32uintintegerBignum or Fixnum (as required)
fixed64Always eight bytes. More efficient than uint64 if values are often greater than 2^56.uint64longint/longuint64ulonginteger/stringBignum
sfixed32Always four bytes.int32intintint32intintegerBignum or Fixnum (as required)
sfixed64Always eight bytes.int64longint/longint64longinteger/stringBignum
boolboolbooleanbooleanboolboolbooleanTrueClass/FalseClass
stringA string must always contain UTF-8 encoded or 7-bit ASCII text.stringStringstr/unicodestringstringstringString (UTF-8)
bytesMay contain any arbitrary sequence of bytes.stringByteStringstr[]byteByteStringstringString (ASCII-8BIT)