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