author | William Roberts <williamr@symbian.org> |
Wed, 31 Mar 2010 12:33:34 +0100 | |
branch | Symbian3 |
changeset 4 | 837f303aceeb |
parent 2 | 2fe1408b6811 |
permissions | -rw-r--r-- |
williamr@2 | 1 |
// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). |
williamr@2 | 2 |
// All rights reserved. |
williamr@2 | 3 |
// This component and the accompanying materials are made available |
williamr@4 | 4 |
// under the terms of "Eclipse Public License v1.0" |
williamr@2 | 5 |
// which accompanies this distribution, and is available |
williamr@4 | 6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html". |
williamr@2 | 7 |
// |
williamr@2 | 8 |
// Initial Contributors: |
williamr@2 | 9 |
// Nokia Corporation - initial contribution. |
williamr@2 | 10 |
// |
williamr@2 | 11 |
// Contributors: |
williamr@2 | 12 |
// |
williamr@2 | 13 |
// Description: |
williamr@2 | 14 |
// |
williamr@2 | 15 |
|
williamr@2 | 16 |
#ifndef __LBSSATELLITE_H__ |
williamr@2 | 17 |
#define __LBSSATELLITE_H__ |
williamr@2 | 18 |
|
williamr@2 | 19 |
#include <lbsposition.h> |
williamr@2 | 20 |
#include <lbspositioninfo.h> |
williamr@2 | 21 |
|
williamr@2 | 22 |
|
williamr@2 | 23 |
/** |
williamr@2 | 24 |
Maximum number of satellites in view |
williamr@2 | 25 |
|
williamr@2 | 26 |
@publishedAll |
williamr@2 | 27 |
@released |
williamr@2 | 28 |
*/ |
williamr@2 | 29 |
const TUint KPositionMaxSatellitesInView = 20; |
williamr@2 | 30 |
|
williamr@2 | 31 |
|
williamr@2 | 32 |
class TSatelliteData |
williamr@2 | 33 |
/** |
williamr@2 | 34 |
This class is used to transfer data about a satellite |
williamr@2 | 35 |
|
williamr@2 | 36 |
@publishedAll |
williamr@2 | 37 |
@released |
williamr@2 | 38 |
*/ |
williamr@2 | 39 |
{ |
williamr@2 | 40 |
public: |
williamr@2 | 41 |
IMPORT_C TSatelliteData(); |
williamr@2 | 42 |
|
williamr@2 | 43 |
IMPORT_C TInt SatelliteId() const; |
williamr@2 | 44 |
IMPORT_C void SetSatelliteId(TInt aSatelliteId); |
williamr@2 | 45 |
|
williamr@2 | 46 |
IMPORT_C TReal32 Azimuth() const; |
williamr@2 | 47 |
IMPORT_C void SetAzimuth(TReal32 aAzimuth); |
williamr@2 | 48 |
|
williamr@2 | 49 |
IMPORT_C TReal32 Elevation() const; |
williamr@2 | 50 |
IMPORT_C void SetElevation(TReal32 aElevation); |
williamr@2 | 51 |
|
williamr@2 | 52 |
IMPORT_C TBool IsUsed() const; |
williamr@2 | 53 |
IMPORT_C void SetIsUsed(TBool aIsUsed); |
williamr@2 | 54 |
|
williamr@2 | 55 |
IMPORT_C TInt SignalStrength() const; |
williamr@2 | 56 |
IMPORT_C void SetSignalStrength(TInt aSignalStrength); |
williamr@2 | 57 |
|
williamr@2 | 58 |
protected: |
williamr@2 | 59 |
/** The ID (in GPS, the PRN) */ |
williamr@2 | 60 |
TInt iSatelliteId; |
williamr@2 | 61 |
/** The azimuth, in degrees */ |
williamr@2 | 62 |
TReal32 iAzimuth; |
williamr@2 | 63 |
/** The elevation, in degrees */ |
williamr@2 | 64 |
TReal32 iElevation; |
williamr@2 | 65 |
/** Whether the satellite is used */ |
williamr@2 | 66 |
TBool iIsUsed; |
williamr@2 | 67 |
/** The signal strength, in decibels */ |
williamr@2 | 68 |
TInt iSignalStrength; |
williamr@2 | 69 |
|
williamr@2 | 70 |
private: |
williamr@2 | 71 |
/** Unused variable for future expansion. */ |
williamr@2 | 72 |
TUint8 iReserved[16]; |
williamr@2 | 73 |
}; |
williamr@2 | 74 |
|
williamr@2 | 75 |
class TPositionSatelliteInfo : public TPositionCourseInfo |
williamr@2 | 76 |
/** |
williamr@2 | 77 |
This class is used to store information about positions obtained by satellites. |
williamr@2 | 78 |
|
williamr@2 | 79 |
@publishedAll |
williamr@2 | 80 |
@released |
williamr@2 | 81 |
*/ |
williamr@2 | 82 |
{ |
williamr@2 | 83 |
public: |
williamr@2 | 84 |
IMPORT_C TPositionSatelliteInfo(); |
williamr@2 | 85 |
|
williamr@2 | 86 |
IMPORT_C TInt GetSatelliteData(TUint aIndex, TSatelliteData& aSatelliteData) const; |
williamr@2 | 87 |
IMPORT_C TInt AppendSatelliteData(const TSatelliteData& aSatelliteData); |
williamr@2 | 88 |
|
williamr@2 | 89 |
IMPORT_C TInt NumSatellitesInView() const; |
williamr@2 | 90 |
IMPORT_C void ClearSatellitesInView(); |
williamr@2 | 91 |
|
williamr@2 | 92 |
IMPORT_C TInt NumSatellitesUsed() const; |
williamr@2 | 93 |
|
williamr@2 | 94 |
IMPORT_C TTime SatelliteTime() const; |
williamr@2 | 95 |
IMPORT_C void SetSatelliteTime(TTime aTime); |
williamr@2 | 96 |
|
williamr@2 | 97 |
IMPORT_C TReal32 HorizontalDoP() const; |
williamr@2 | 98 |
IMPORT_C TReal32 VerticalDoP() const; |
williamr@2 | 99 |
IMPORT_C TReal32 TimeDoP() const; |
williamr@2 | 100 |
|
williamr@2 | 101 |
IMPORT_C void SetHorizontalDoP(TReal32 aDoPValue); |
williamr@2 | 102 |
IMPORT_C void SetVerticalDoP(TReal32 aDoPValue); |
williamr@2 | 103 |
IMPORT_C void SetTimeDoP(TReal32 aDoPValue); |
williamr@2 | 104 |
|
williamr@2 | 105 |
protected: |
williamr@2 | 106 |
/** The number of satellites in view */ |
williamr@2 | 107 |
TUint iNumSatellitesInView; |
williamr@2 | 108 |
/** The number of satellites used */ |
williamr@2 | 109 |
TUint iNumSatellitesUsed; |
williamr@2 | 110 |
/** The time according to the satellite */ |
williamr@2 | 111 |
TTime iSatelliteTime; |
williamr@2 | 112 |
/** The horizontal dilution of precision */ |
williamr@2 | 113 |
TReal32 iHorizontalDoPValue; |
williamr@2 | 114 |
/** The vertical dilution of precision */ |
williamr@2 | 115 |
TReal32 iVerticalDoPValue; |
williamr@4 | 116 |
/** The time dilution of precision */ |
williamr@2 | 117 |
TReal32 iTimeDoPValue; |
williamr@2 | 118 |
/** The satellites in view */ |
williamr@2 | 119 |
TFixedArray<TSatelliteData, KPositionMaxSatellitesInView> iSatellitesInView; |
williamr@2 | 120 |
|
williamr@2 | 121 |
private: |
williamr@2 | 122 |
/** Unused variable for future expansion. */ |
williamr@2 | 123 |
TUint8 iReserved[24]; |
williamr@2 | 124 |
}; |
williamr@2 | 125 |
|
williamr@2 | 126 |
#endif //__LBSSATELLITE_H__ |