Skip to content
This repository was archived by the owner on May 15, 2024. It is now read-only.

Conversation

@Mrnikbobjeff
Copy link
Contributor

Description of Change

Added location improvements as specified in #400
No unit tests as there are none up until this point

Bugs Fixed

None

API Changes

List all API changes here (or just put None), example:

Added:
IntegrationPoint: Location
public double? Speed { get; set; }
public double? Bearing { get; set; }

Changed:

  • None

Behavioral Changes

None

PR Checklist

  • Has tests (if omitted, state reason in description)
  • Has samples (if omitted, state reason in description)
  • Rebased on top of master at time of PR
  • Changes adhere to coding standard
  • Updated documentation (see walkthrough)

@dend
Copy link
Contributor

dend commented Jul 25, 2018

✅ Validation status: passed

File Status Preview URL Details
Samples/Samples/ViewModel/GeolocationViewModel.cs ✅Succeeded
Xamarin.Essentials/Types/Location.shared.cs ✅Succeeded
Xamarin.Essentials/Types/LocationExtensions.android.cs ✅Succeeded
Xamarin.Essentials/Types/LocationExtensions.ios.cs ✅Succeeded
Xamarin.Essentials/Types/LocationExtensions.uwp.cs ✅Succeeded
docs/en/FrameworksIndex/xamarin-essentials-android.xml ✅Succeeded
docs/en/FrameworksIndex/xamarin-essentials-ios.xml ✅Succeeded
docs/en/FrameworksIndex/xamarin-essentials-uwp.xml ✅Succeeded
docs/en/FrameworksIndex/xamarin-essentials.xml ✅Succeeded
docs/en/Xamarin.Essentials/Location.xml ✅Succeeded

For more details, please refer to the build report.

Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

@dend
Copy link
Contributor

dend commented Jul 26, 2018

✅ Validation status: passed

File Status Preview URL Details
Samples/Samples/ViewModel/GeolocationViewModel.cs ✅Succeeded
Xamarin.Essentials/Types/Location.shared.cs ✅Succeeded
Xamarin.Essentials/Types/LocationExtensions.android.cs ✅Succeeded
Xamarin.Essentials/Types/LocationExtensions.ios.cs ✅Succeeded
Xamarin.Essentials/Types/LocationExtensions.uwp.cs ✅Succeeded
docs/en/FrameworksIndex/xamarin-essentials-android.xml ✅Succeeded
docs/en/FrameworksIndex/xamarin-essentials-ios.xml ✅Succeeded
docs/en/FrameworksIndex/xamarin-essentials-uwp.xml ✅Succeeded
docs/en/FrameworksIndex/xamarin-essentials.xml ✅Succeeded
docs/en/Xamarin.Essentials/Location.xml ✅Succeeded

For more details, please refer to the build report.

Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

@Mrnikbobjeff
Copy link
Contributor Author

Please note that this pr is not tested under iOS/UWP, as I did not have access to such devices at the point of creating this pr. It is on request of @Redth

@Redth Redth changed the title Location improvements GH-400: Location improvements Jul 26, 2018
Copy link
Collaborator

@jamesmontemagno jamesmontemagno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides this can we just figure out what they name should be for heading... I think heading is confusing maybe cause it is different then how the geolocator stuff works for getting heading.

Accuracy = location.HasAccuracy ? location.Accuracy : (float?)null
Accuracy = location.HasAccuracy ? location.Accuracy : default(float?),
Bearing = location.HasBearing && location.Bearing != 0.0d ? location.Bearing : default(double?),
Speed = location.HasSpeed && location.Speed == 0.0d ? location.Speed : default(double?)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ternary operations like this scare me, Can you add additional () in there... Why do we need to check against 0.0d?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so 0.0 means it's unavailable on android. We should probably check if it's nearly equal to 0 though instead because precision.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like Math.Abs(location.Bearing) < 0.000001 or something.

Copy link
Contributor Author

@Mrnikbobjeff Mrnikbobjeff Jul 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The exact null comparison works for me. It returns positive zero if no data is available. If you insist I will change this to use delta equals

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other question on speed check to see if it is ==, should it be !=

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jamesmontemagno whoops, good catch! changed equality and added braces to clarify operator precedence

@dend
Copy link
Contributor

dend commented Jul 26, 2018

✅ Validation status: passed

File Status Preview URL Details
Samples/Samples/ViewModel/GeolocationViewModel.cs ✅Succeeded
Xamarin.Essentials/Types/Location.shared.cs ✅Succeeded
Xamarin.Essentials/Types/LocationExtensions.android.cs ✅Succeeded
Xamarin.Essentials/Types/LocationExtensions.ios.cs ✅Succeeded
Xamarin.Essentials/Types/LocationExtensions.uwp.cs ✅Succeeded
docs/en/FrameworksIndex/xamarin-essentials-android.xml ✅Succeeded
docs/en/FrameworksIndex/xamarin-essentials-ios.xml ✅Succeeded
docs/en/FrameworksIndex/xamarin-essentials-uwp.xml ✅Succeeded
docs/en/FrameworksIndex/xamarin-essentials.xml ✅Succeeded
docs/en/Xamarin.Essentials/Location.xml ✅Succeeded

For more details, please refer to the build report.

Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

@dend
Copy link
Contributor

dend commented Jul 26, 2018

⚠️ Validation status: warnings

File Status Preview URL Details
⚠️Warning Details

  • Line 80: [Warning] Failed to run script W:\1bst-s_dependentPackages\ECMA2Yaml\tools\Run.ps1 with exit code -1

For more details, please refer to the build report.

Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

@Mrnikbobjeff
Copy link
Contributor Author

I also changed this to heading as suggested in the issue. Would you please also mark this as wip until someone gets to test this on uwp&iOS?

@dend
Copy link
Contributor

dend commented Jul 26, 2018

⚠️ Validation status: warnings

File Status Preview URL Details
⚠️Warning Details

  • Line 80: [Warning] Failed to run script W:\j0ye-s_dependentPackages\ECMA2Yaml\tools\Run.ps1 with exit code -1

For more details, please refer to the build report.

Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

@dend
Copy link
Contributor

dend commented Jul 26, 2018

✅ Validation status: passed

File Status Preview URL Details
Samples/Samples/ViewModel/GeolocationViewModel.cs ✅Succeeded
Xamarin.Essentials/Types/Location.shared.cs ✅Succeeded
Xamarin.Essentials/Types/LocationExtensions.android.cs ✅Succeeded
Xamarin.Essentials/Types/LocationExtensions.ios.cs ✅Succeeded
Xamarin.Essentials/Types/LocationExtensions.uwp.cs ✅Succeeded
docs/en/FrameworksIndex/xamarin-essentials-android.xml ✅Succeeded
docs/en/FrameworksIndex/xamarin-essentials-ios.xml ✅Succeeded
docs/en/FrameworksIndex/xamarin-essentials-uwp.xml ✅Succeeded
docs/en/FrameworksIndex/xamarin-essentials.xml ✅Succeeded
docs/en/Xamarin.Essentials/Location.xml ✅Succeeded

For more details, please refer to the build report.

Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

@dend
Copy link
Contributor

dend commented Jul 30, 2018

✅ Validation status: passed

File Status Preview URL Details
Samples/Samples/ViewModel/GeolocationViewModel.cs ✅Succeeded
Xamarin.Essentials/Types/Location.shared.cs ✅Succeeded
Xamarin.Essentials/Types/LocationExtensions.android.cs ✅Succeeded
Xamarin.Essentials/Types/LocationExtensions.ios.cs ✅Succeeded
Xamarin.Essentials/Types/LocationExtensions.uwp.cs ✅Succeeded
docs/en/FrameworksIndex/xamarin-essentials-android.xml ✅Succeeded
docs/en/FrameworksIndex/xamarin-essentials-ios.xml ✅Succeeded
docs/en/FrameworksIndex/xamarin-essentials-uwp.xml ✅Succeeded
docs/en/FrameworksIndex/xamarin-essentials.xml ✅Succeeded
docs/en/Xamarin.Essentials/Location.xml ✅Succeeded

For more details, please refer to the build report.

Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

@dend
Copy link
Contributor

dend commented Aug 1, 2018

✅ Validation status: passed

File Status Preview URL Details
Samples/Samples/ViewModel/GeolocationViewModel.cs ✅Succeeded
Xamarin.Essentials/Types/Location.shared.cs ✅Succeeded
Xamarin.Essentials/Types/LocationExtensions.android.cs ✅Succeeded
Xamarin.Essentials/Types/LocationExtensions.ios.cs ✅Succeeded
Xamarin.Essentials/Types/LocationExtensions.uwp.cs ✅Succeeded
docs/en/FrameworksIndex/xamarin-essentials-android.xml ✅Succeeded
docs/en/FrameworksIndex/xamarin-essentials-ios.xml ✅Succeeded
docs/en/FrameworksIndex/xamarin-essentials-uwp.xml ✅Succeeded
docs/en/FrameworksIndex/xamarin-essentials.xml ✅Succeeded
docs/en/Xamarin.Essentials/Location.xml ✅Succeeded

For more details, please refer to the build report.

Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

@dend
Copy link
Contributor

dend commented Aug 3, 2018

✅ Validation status: passed

File Status Preview URL Details
Samples/Samples/ViewModel/GeolocationViewModel.cs ✅Succeeded
Xamarin.Essentials/Types/Location.shared.cs ✅Succeeded
Xamarin.Essentials/Types/LocationExtensions.android.cs ✅Succeeded
Xamarin.Essentials/Types/LocationExtensions.ios.cs ✅Succeeded
Xamarin.Essentials/Types/LocationExtensions.uwp.cs ✅Succeeded
docs/en/FrameworksIndex/xamarin-essentials-android.xml ✅Succeeded
docs/en/FrameworksIndex/xamarin-essentials-ios.xml ✅Succeeded
docs/en/FrameworksIndex/xamarin-essentials-uwp.xml ✅Succeeded
docs/en/FrameworksIndex/xamarin-essentials.xml ✅Succeeded
docs/en/Xamarin.Essentials/Location.xml ✅Succeeded

For more details, please refer to the build report.

Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

@jamesmontemagno jamesmontemagno changed the base branch from master to feature/issue-400 August 3, 2018 17:06
@jamesmontemagno jamesmontemagno merged commit d3def76 into xamarin:feature/issue-400 Aug 3, 2018
Redth pushed a commit that referenced this pull request Aug 14, 2018
* GH-400: Location improvements (#414)

* Implemented maps as mentioned in branch name issue. also fixed a spelling mistake

* Finished reset of fork

* LocationBearing

* removed requirements

* Speed and bearing docs

* braces & equality

* Renamed Bearing to Heading

* Heading in location

* Update for Course and updated logic for UWP for NaN
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants