|
PSPSDK 2026-10-30
|
#include <psptypes.h>
Go to the source code of this file.
Data Structures | |
| struct | SceUsbGpsPositionData |
| Position information returned by sceUsbGpsGetData. More... | |
| struct | SceUsbGpsSv |
| Information about a single GPS satellite. More... | |
| struct | SceUsbGpsSatelliteData |
| Satellite information returned by sceUsbGpsGetData. More... | |
Macros | |
| #define | PSP_USBGPS_PID (0x283) |
| #define | PSP_USBGPS_DRIVERNAME "USBGps_Driver" |
| #define | PSP_USBGPS_NUM_SATELLITE (32) |
| Maximum number of satellites reported in SceUsbGpsSatelliteData. | |
| #define | PSP_USBGPS_ERROR_NOT_STARTED (0x80244001) |
| #define | PSP_USBGPS_ERROR_NOT_OPENED (0x80244002) |
| #define | PSP_USBGPS_ERROR_ALREADY_OPENED (0x80244003) |
| #define | PSP_USBGPS_ERROR_NOT_AVAILABLE (0x80244004) |
| #define | PSP_USBGPS_ERROR_BUSY (0x80244005) |
| #define | PSP_USBGPS_ERROR_PRIV_REQUIRED (0x80244006) |
| #define | PSP_USBGPS_ERROR_INVALID_PARAM (0x80244007) |
| #define | PSP_USBGPS_ERROR_FATAL (0x80244010) |
| #define | PSP_USBGPS_ERROR_NO_INIT_DATA (0x802440FF) |
Typedefs | |
| typedef struct SceUsbGpsPositionData | SceUsbGpsPositionData |
| Position information returned by sceUsbGpsGetData. | |
| typedef struct SceUsbGpsSv | SceUsbGpsSv |
| Information about a single GPS satellite. | |
| typedef struct SceUsbGpsSatelliteData | SceUsbGpsSatelliteData |
| Satellite information returned by sceUsbGpsGetData. | |
Functions | |
| int | sceUsbGpsOpen (void) |
| Initializes the GPS driver and starts GPS receiver operation. | |
| int | sceUsbGpsClose (void) |
| Stops GPS receiver operation and shuts down the GPS driver. | |
| int | sceUsbGpsGetState (u32 *state) |
| Gets the state of the GPS receiver. | |
| int | sceUsbGpsGetData (SceUsbGpsPositionData *pos, SceUsbGpsSatelliteData *sat) |
| Gets position and satellite information. | |
| int | sceUsbGpsSetStaticNavMode (u8 mode) |
| Sets the static navigation mode. | |
| int | sceUsbGpsGetStaticNavMode (u8 *mode) |
| Gets the current static navigation mode. | |
| int | sceUsbGpsSetInitDataLocation (u32 datalocation) |
| Selects the file the GPS init (assistance) data is loaded from when the receiver starts and saved to by sceUsbGpsSaveInitData. | |
| int | sceUsbGpsGetInitDataLocation (u32 *datalocation) |
| Gets the file currently selected for the GPS init (assistance) data. | |
| int | sceUsbGpsSaveInitData (void) |
| Saves the GPS init (assistance) data to the file selected with sceUsbGpsSetInitDataLocation. | |
| int | sceUsbGpsSetPowerSaveMode (u32 mode, u32 interval) |
| Sets the GPS receiver power-save mode. | |
| int | sceUsbGpsGetPowerSaveMode (u32 *mode, u32 *interval) |
| Gets the current GPS receiver power-save settings. | |
| int | sceUsbGpsReset (u32 type) |
| Restarts the GPS receiver at the given reset level, controlling how much of its acquired data is discarded. | |
| int | sceUsbGpsResetInitialPosition (float latitude, float longitude, float altitude, float geoidsep) |
| Seeds the GPS receiver with a known starting position to shorten the time to first fix. | |
| #define PSP_USBGPS_DRIVERNAME "USBGps_Driver" |
| #define PSP_USBGPS_ERROR_ALREADY_OPENED (0x80244003) |
| #define PSP_USBGPS_ERROR_BUSY (0x80244005) |
| #define PSP_USBGPS_ERROR_FATAL (0x80244010) |
| #define PSP_USBGPS_ERROR_INVALID_PARAM (0x80244007) |
| #define PSP_USBGPS_ERROR_NO_INIT_DATA (0x802440FF) |
| #define PSP_USBGPS_ERROR_NOT_AVAILABLE (0x80244004) |
| #define PSP_USBGPS_ERROR_NOT_OPENED (0x80244002) |
| #define PSP_USBGPS_ERROR_NOT_STARTED (0x80244001) |
| #define PSP_USBGPS_ERROR_PRIV_REQUIRED (0x80244006) |
| #define PSP_USBGPS_NUM_SATELLITE (32) |
Maximum number of satellites reported in SceUsbGpsSatelliteData.
| #define PSP_USBGPS_PID (0x283) |
| typedef struct SceUsbGpsPositionData SceUsbGpsPositionData |
Position information returned by sceUsbGpsGetData.
| typedef struct SceUsbGpsSatelliteData SceUsbGpsSatelliteData |
Satellite information returned by sceUsbGpsGetData.
| typedef struct SceUsbGpsSv SceUsbGpsSv |
Information about a single GPS satellite.
Storage locations for the GPS init data file, used by sceUsbGpsSetInitDataLocation and sceUsbGpsGetInitDataLocation.
Power-save modes for sceUsbGpsSetPowerSaveMode.
Each selects how much the receiver sleeps between fixes while the PSP is active vs. idle. Sleeping more saves power but reduces the fix frequency.
| enum PspUsbGpsResetType |
Receiver reset levels for sceUsbGpsReset, ordered from most to least data discarded.
Each performs a full receiver restart. They differ only in what acquired data is kept.
| enum PspUsbGpsState |
GPS receiver states returned by sceUsbGpsGetState.
Static navigation modes for sceUsbGpsSetStaticNavMode.
| Enumerator | |
|---|---|
| PSP_USBGPS_STATIC_NAV_MODE_DISABLE | |
| PSP_USBGPS_STATIC_NAV_MODE_ENABLE | |
| int sceUsbGpsClose | ( | void | ) |
Stops GPS receiver operation and shuts down the GPS driver.
Available on firmware 2.70 and higher only.
| int sceUsbGpsGetData | ( | SceUsbGpsPositionData * | pos, |
| SceUsbGpsSatelliteData * | sat ) |
Gets position and satellite information.
Available on firmware 2.70 and higher only.
| pos | - pointer to a structure that receives the position data, or NULL if not needed |
| sat | - pointer to a structure that receives the satellite data, or NULL if not needed |
| int sceUsbGpsGetInitDataLocation | ( | u32 * | datalocation | ) |
Gets the file currently selected for the GPS init (assistance) data.
Available on firmware 2.70 and higher only.
| datalocation | - pointer to a variable that receives the current location, one of PspUsbGpsInitDataLocation |
Gets the current GPS receiver power-save settings.
Available on firmware 3.00 and higher only.
| mode | - pointer that receives the mode, one of PspUsbGpsPowerSaveMode, or NULL if not needed |
| interval | - pointer that receives the idle time in seconds, or NULL if not needed |
| int sceUsbGpsGetState | ( | u32 * | state | ) |
Gets the state of the GPS receiver.
Available on firmware 2.70 and higher only.
| state | - pointer to a variable that receives the state, one of PspUsbGpsState |
| int sceUsbGpsGetStaticNavMode | ( | u8 * | mode | ) |
Gets the current static navigation mode.
Available on firmware 3.70 and higher only.
| mode | - pointer to a variable that receives the mode, one of PspUsbGpsStaticNavMode |
| int sceUsbGpsOpen | ( | void | ) |
Initializes the GPS driver and starts GPS receiver operation.
The GPS modules have to be loaded with sceUtilityLoadModule(PSP_MODULE_USB_GPS) and the USB bus, accessory and GPS drivers started with sceUsbStart before calling this.
Available on firmware 2.70 and higher only.
| int sceUsbGpsReset | ( | u32 | type | ) |
Restarts the GPS receiver at the given reset level, controlling how much of its acquired data is discarded.
Available on firmware 2.70 and higher only.
| type | - one of PspUsbGpsResetType |
| int sceUsbGpsResetInitialPosition | ( | float | latitude, |
| float | longitude, | ||
| float | altitude, | ||
| float | geoidsep ) |
Seeds the GPS receiver with a known starting position to shorten the time to first fix.
Takes effect while the receiver is still searching. It is a no-op once the receiver already has a fix. The receiver is restarted with the new position automatically.
The latitude, longitude and altitude can be taken straight from a prior sceUsbGpsGetData result. altitude + geoidsep is the WGS84 ellipsoidal height. Pass geoidsep as 0 when it is unknown (the resulting error is negligible for a seed).
Available on firmware 3.30 and higher only.
| latitude | - latitude in degrees, -90 to 90 (south negative) |
| longitude | - longitude in degrees, -180 to 180 (west negative) |
| altitude | - height above mean sea level in meters, -10000 to 10000 |
| geoidsep | - geoid-to-ellipsoid separation in meters, -1000 to 1000 |
| int sceUsbGpsSaveInitData | ( | void | ) |
Saves the GPS init (assistance) data to the file selected with sceUsbGpsSetInitDataLocation.
The data (last known position, time and ephemeris/almanac) is produced by the receiver while it runs. This call only writes the current in-memory copy to storage so the next session can obtain a fix faster.
Available on firmware 2.70 and higher only.
| int sceUsbGpsSetInitDataLocation | ( | u32 | datalocation | ) |
Selects the file the GPS init (assistance) data is loaded from when the receiver starts and saved to by sceUsbGpsSaveInitData.
The default is PSP_USBGPS_INIT_DATA_LOCATION_FLASH1. Should be called right after sceUsbGpsOpen, before the receiver starts and the file is read.
Available on firmware 2.70 and higher only.
| datalocation | - one of PspUsbGpsInitDataLocation |
Sets the GPS receiver power-save mode.
Power saving engages once the PSP has been idle (no user input) for the given interval, after which the receiver duty-cycles as described by PspUsbGpsPowerSaveMode. Should be called immediately after sceUsbGpsOpen. It fails once the receiver has started running.
Available on firmware 3.00 and higher only.
| mode | - one of PspUsbGpsPowerSaveMode |
| interval | - idle time in seconds before power saving engages, 30 to 600 |
| int sceUsbGpsSetStaticNavMode | ( | u8 | mode | ) |
Sets the static navigation mode.
When enabled, the receiver filters out small movements at low speed to keep the reported position stable. Can be called any time after sceUsbGpsOpen. Takes effect immediately if the receiver is running, otherwise when it starts.
Available on firmware 3.70 and higher only.
| mode | - one of PspUsbGpsStaticNavMode |