Skip to content

Commit

Permalink
GPS shift support implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
mkorniichuk committed Nov 7, 2018
1 parent 961ff1c commit 648d282
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,36 @@ const char kTP[] = "TP";
const char kREG[] = "REG";
// RdsData struct

// SisData struct
const char kStationShortName[] = "stationShortName";
const char kStationIDNumber[] = "stationIDNumber";
const char kStationLongName[] = "stationLongName";
const char kStationLocation[] = "stationLocation";
const char kStationMessage[] = "stationMessage";
// SisData struct

// GPSData struct
const char kLongitudeDegrees[] = "longitudeDegrees";
const char kLatitudeDegrees[] = "latitudeDegrees";
const char kUtcYear[] = "utcYear";
const char kUtcMonth[] = "utcMonth";
const char kUtcDay[] = "utcDay";
const char kUtcHours[] = "utcHours";
const char kUtcMinutes[] = "utcMinutes";
const char kUtcSeconds[] = "utcSeconds";
const char kCompassDirection[] = "compassDirection";
const char kPdop[] = "pdop";
const char kHdop[] = "hdop";
const char kVdop[] = "vdop";
const char kActual[] = "actual";
const char kSatellites[] = "satellites";
const char kDimension[] = "dimension";
const char kAltitude[] = "altitude";
const char kHeading[] = "heading";
const char kSpeed[] = "speed";
const char kShifted[] = "shifted";
// GPSData struct

// RadioControlData struct
const char kFrequencyInteger[] = "frequencyInteger";
const char kFrequencyFraction[] = "frequencyFraction";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,19 @@ TEST_F(
(*mobile_message)[application_manager::strings::msg_params]
[message_params::kModuleType] = module_type;
smart_objects::SmartObject radio_data;
smart_objects::SmartObject sis_data;
smart_objects::SmartObject gps_data;

gps_data[message_params::kLongitudeDegrees] = 1.0;
gps_data[message_params::kLatitudeDegrees] = 1.0;
gps_data[message_params::kShifted] = true;

sis_data[message_params::kStationShortName] = "dummy_short_name";
sis_data[message_params::kStationLocation] = gps_data;

radio_data[message_params::kBand] = enums_value::kAM;
radio_data[message_params::kSisData] = sis_data;

std::shared_ptr<
rc_rpc_plugin::commands::GetInteriorVehicleDataRequest> command =
CreateRCCommand<rc_rpc_plugin::commands::GetInteriorVehicleDataRequest>(
Expand Down
7 changes: 7 additions & 0 deletions src/components/interfaces/HMI_API.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1827,6 +1827,13 @@
<param name="speed" type="Float" minvalue="0" maxvalue="500" mandatory="false">
<description>The speed in KPH</description>
</param>
<param name="shifted" type="Boolean" mandatory="false">
<description>
True, if GPS lat/long, time, and altitude have been purposefully shifted (requires a proprietary algorithm to unshift).
False, if the GPS data is raw and un-shifted.
If not provided, then value is assumed False.
</description>
</param>
</struct>

<struct name="SisData">
Expand Down
7 changes: 7 additions & 0 deletions src/components/interfaces/MOBILE_API.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1984,6 +1984,13 @@
<param name="speed" type="Float" minvalue="0" maxvalue="500" mandatory="true" since="2.0" until="5.0"/>
</history>
</param>
<param name="shifted" type="Boolean" mandatory="false" since="5.0">
<description>
True, if GPS lat/long, time, and altitude have been purposefully shifted (requires a proprietary algorithm to unshift).
False, if the GPS data is raw and un-shifted.
If not provided, then value is assumed False.
</description>
</param>
</struct>

<struct name="VehicleDataResult" since="2.0">
Expand Down

0 comments on commit 648d282

Please sign in to comment.