![]() |
VR-Forces Developer's Guide
|
Class definition for one track created from AIS messages, i.e. the identifying information and time-stamped position data for one vessel (i.e. unique MMSI identifier).
Public Member Functions | |
| DtAisTrack () | |
| ~DtAisTrack () | |
| virtual bool | computePathBoundingBox (bool debug=false) |
| virtual int | netRepSize () const |
| virtual bool | setFromNet (const char *contentBuffer, unsigned contentSize=0) |
| virtual bool | setToNet (char *contentBuffer) |
| void | setMmsi (const int mmsi) |
| int | mmsi () const |
| void | setShipType (const std::string) |
| std::string | shipType () const |
| void | setShipName (const std::string) |
| std::string | shipName () const |
| void | setCallSign (const std::string) |
| std::string | callSign () const |
| void | setCountryCode (const std::string) |
| std::string | countryCode () const |
| void | setImoNumber (const int) |
| int | imoNumber () const |
| void | setLength (const double) |
| double | length () const |
| void | setWidth (const double) |
| double | width () const |
| void | setDistanceToBow (const double) |
| double | distanceToBow () const |
| void | setDistanceToStarboard (const double) |
| double | distanceToStarboard () const |
| void | setDraft (const double) |
| double | draft () const |
| void | setDestination (const std::string) |
| std::string | destination () const |
| void | setEta (const DtTime eta) |
| DtTime | eta () const |
| void | addPathPoint (const DtPathPoint &point) |
| const DtAisPathPointMap & | path () const |
| DtAisPathPointMap & | path () |
This data is derived from the path data. The values is set in computePathBoundingBox. It is not valid if the path changes until computePathBoundingBox is called again. | |
| double | maxNorth () const |
| double | maxSouth () const |
| double | maxEast () const |
| double | maxWest () const |
| bool | crosses180Line () const |
| DtTime | startTime () const |
| DtTime | endTime () const |
Protected Attributes | |
| int | myMmsi |
| std::string | myShipType |
| std::string | myName |
| std::string | myCallSign |
| std::string | myCountryCode |
| int | myImoNumber |
| std::string | myDestination |
| DtTime | myEta |
| DtAisPathPointMap | myPath |
| float | myLength |
| float | myWidth |
| float | myDistanceToBow |
| float | myDistanceToStarboard |
| float | myDraft |
| float | myMaxNorth |
| float | myMaxSouth |
| float | myMaxEast |
| float | myMaxWest |
| bool | myCrosses180Line |
| DtTime | myStartTime |
| DtTime | myEndTime |
| DtAisTrack::DtAisTrack | ( | ) |
| DtAisTrack::~DtAisTrack | ( | ) |
Find the bounding box of the ship path. Fills in myMaxN-S-E-W in the class and the flag myCrosses180Line. Note that if the path goes across the +-180 longitude line, the west coordinate will be > the east coordinate value. Also records the start and end times of the path.
|
virtual |
Returns the size of the full network representation padded to an 8-byte boundary.
|
virtual |
Fills in the task from the network buffer. Content size is not used.
Fills in the network buffer with the task contents. Buffer must be allocated by the caller, with size netRepSize.
| void DtAisTrack::setMmsi | ( | const int | mmsi | ) |
9 digit (normally) ID number for AIS transmitter. Numbers with fewer than 9 digits are still assumed to have the Maritime ID (MID) in the most significant 3 digits.
| int DtAisTrack::mmsi | ( | ) | const |
| void DtAisTrack::setShipType | ( | const std::string | ) |
2 characters (normally) that are digits representing the type. Some types are 3 digits– not defined in AIS spec.
| std::string DtAisTrack::shipType | ( | ) | const |
| void DtAisTrack::setShipName | ( | const std::string | ) |
| std::string DtAisTrack::shipName | ( | ) | const |
| void DtAisTrack::setCallSign | ( | const std::string | ) |
| std::string DtAisTrack::callSign | ( | ) | const |
| void DtAisTrack::setCountryCode | ( | const std::string | ) |
2 character country code.
| std::string DtAisTrack::countryCode | ( | ) | const |
| void DtAisTrack::setImoNumber | ( | const int | ) |
Ship ID number.
| int DtAisTrack::imoNumber | ( | ) | const |
| void DtAisTrack::setLength | ( | const double | ) |
Represented internally as a float, since AID data is not more precise than that.
| double DtAisTrack::length | ( | ) | const |
| void DtAisTrack::setWidth | ( | const double | ) |
Represented internally as a float, since AID data is not more precise than that.
| double DtAisTrack::width | ( | ) | const |
| void DtAisTrack::setDistanceToBow | ( | const double | ) |
Location of the ship position sensor fore-aft. Represented internally as a float, since AID data is not more precise than that.
| double DtAisTrack::distanceToBow | ( | ) | const |
| void DtAisTrack::setDistanceToStarboard | ( | const double | ) |
Location of the ship position sensor port-starboard. Represented internally as a float, since AID data is not more precise than that.
| double DtAisTrack::distanceToStarboard | ( | ) | const |
| void DtAisTrack::setDraft | ( | const double | ) |
Represented internally as a float, since AID data is not more precise than that.
| double DtAisTrack::draft | ( | ) | const |
| void DtAisTrack::setDestination | ( | const std::string | ) |
Free text.
| std::string DtAisTrack::destination | ( | ) | const |
| void DtAisTrack::setEta | ( | const DtTime | eta | ) |
Estimated time of arrival.
| DtTime DtAisTrack::eta | ( | ) | const |
| void DtAisTrack::addPathPoint | ( | const DtPathPoint & | point | ) |
Add the given point to the path for this track. Note that this invalidates the derived data (maxNSEW and start/endTime).
| const DtAisPathPointMap& DtAisTrack::path | ( | ) | const |
Get the points in the track path.
| DtAisPathPointMap& DtAisTrack::path | ( | ) |
| double DtAisTrack::maxNorth | ( | ) | const |
| double DtAisTrack::maxSouth | ( | ) | const |
| double DtAisTrack::maxEast | ( | ) | const |
| double DtAisTrack::maxWest | ( | ) | const |
| bool DtAisTrack::crosses180Line | ( | ) | const |
| DtTime DtAisTrack::startTime | ( | ) | const |
| DtTime DtAisTrack::endTime | ( | ) | const |
|
protected |
Should be a 9-digit number. If shorter, the first 3 (most significant) digits still represent the Maritime ID Digits (MID).
|
protected |
2 characters
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
In meters:
|
protected |
In meters:
|
protected |
In meters:
|
protected |
In meters:
|
protected |
In meters:
|
protected |
|
protected |
|
protected |
The key is the timestamp.
|
protected |
Derived values.
|
protected |
Derived values.
|
protected |
Derived values.
|
protected |
Derived values.
|
protected |
Derived values.
|
protected |
Derived values.
|
protected |
Derived values.