VgINavigation represents a Navigation object
VgNavigationModule::VgINavigation::VgINavigation |
( |
| ) |
|
|
inlineprotected |
virtual VgNavigationModule::VgINavigation::~VgINavigation |
( |
| ) |
|
|
inlinevirtual |
Destructor.
References addListener(), getClosestPositionOnRoute(), getCurrentInstructionClosestPositionNextSubIndex(), getCurrentInstructionIndex(), getCurrentPosition(), getDistanceFromRoute(), getInstruction(), getInstructionGeofenceDistance(), getNumInstructions(), getRequestParameters(), removeListener(), setInstructionGeofenceDistance(), and updateCurrentPosition().
Adds a listener to the navgiation object. If the listener already exists, it does not add it.
- Parameters
-
pListener | The navigation listener to be added. |
Referenced by ~VgINavigation().
virtual const VgEngine::VgPosition& VgNavigationModule::VgINavigation::getClosestPositionOnRoute |
( |
| ) |
const |
|
pure virtual |
virtual unsigned int VgNavigationModule::VgINavigation::getCurrentInstructionClosestPositionNextSubIndex |
( |
| ) |
const |
|
pure virtual |
Used to determine where on the current instruction the closest position on route is.
const& pNavigation
{
...
unsigned int lNbInstructions = pNavigation->getNumInstructions();
unsigned int lCurrentInstructnionIndex = pNavigation->getCurrentInstructionIndex();
unsigned int lPositionNextSubIndex = pNavigation->getCurrentInstructionClosestPositionNextSubIndex();
mInstruction = pNavigation->getInstruction(lCurrentInstructnionIndex);
lCurrentLD->
mPositions.push_back(lClosestPosition);
std::vector<VgEngine::VgPosition>::const_iterator lPosIter;
for (lPosIter = (lInstructionPositions.begin() + lPositionNextSubIndex);
lPosIter != lInstructionPositions.end();
++lPosIter)
{
VgEngine::VgPosition lPosition = *lPosIter;
}
}
- Returns
- the index of the next position in VgINavigationInstruction::getInstructionPositions after the getClosestPositionOnRoute(). Initial value is 1, maximum value is currentInstruction getPositions().size()
- Version
- 2.1.3
Referenced by ~VgINavigation().
virtual unsigned int VgNavigationModule::VgINavigation::getCurrentInstructionIndex |
( |
| ) |
const |
|
pure virtual |
Gets the last position that was notified. This value will be the same as the last value given by VgINavigationListener::notifyPositionUpdated().
- Returns
- Last injected position, if no position has been injected, it will return the first position of the navigation.
- Since
- 2.1.3 Updated default value when it has not been initialized.
Referenced by ~VgINavigation().
virtual double VgNavigationModule::VgINavigation::getDistanceFromRoute |
( |
| ) |
const |
|
pure virtual |
Gets the distance between current position (VgINavigation::getCurrentPosition()) and closest position on route
- Returns
- Distance in meters from route. If no position has been injected, it will return 0.
- Since
- 2.1.3 Updated default value when it has not been initialized.
Referenced by ~VgINavigation().
virtual double VgNavigationModule::VgINavigation::getInstructionGeofenceDistance |
( |
| ) |
const |
|
pure virtual |
Gets the distance in meters of the threshold when to switch instructions.
- Returns
- the radius distance in meters. Default value is 2.5 meters
Referenced by ~VgINavigation().
virtual const unsigned int VgNavigationModule::VgINavigation::getNumInstructions |
( |
| ) |
const |
|
pure virtual |
Gets the number of navigation instructions
- Returns
- Number of instructions
Referenced by ~VgINavigation().
- Returns
- the NavigationRequest parameters with which the request was made, without the callback.
- Version
- 2.1.8 cleared mCallback to avoid possible circular dependencies.
Referenced by ~VgINavigation().
Removes a listener from the navigation object.
- Parameters
-
pListener | The navigation listener to be removed. |
Referenced by ~VgINavigation().
virtual void VgNavigationModule::VgINavigation::setInstructionGeofenceDistance |
( |
double |
pDistanceInMeters | ) |
|
|
pure virtual |
Sets the distance in meters of the threshold when to switch instructions. this number is a function of the accuracy of the position information. If too large, instructions will switch rapidly, if too small, instructions will not change.
- Note
- This function should be called at the moment the application is notified of the result of a navigation computation.
- Parameters
-
pDistanceInMeters | Radius distance in meters. Initial value is 2.5 meters. |
Referenced by ~VgINavigation().
virtual void VgNavigationModule::VgINavigation::updateCurrentPosition |
( |
const VgEngine::VgPosition & |
pPosition, |
|
|
double |
pTime |
|
) |
| |
|
pure virtual |
The documentation for this class was generated from the following file: