Comments (15)
I'm using the latest Goolge Chrome on Windows 10 for the browser.
Here's the YAML for the card:
entity: sensor.msp_piaware_flights
columns:
- flag
- registration
- flight
- icon
- altitude
- speed
- distance
hide:
empty:
- distance
popup: true
zone: zone.home
sort: distance
I did look at the .json and it looked like flights that were showing up that way did have lat and long values. So maybe the problem has something to do with the math to determine the distance. The values for my zone.home are latitude: 44.97865681506032, longitude: -93.05218862841296.
Another possible clue that I've noticed is that when I leave that page displayed and it gets updated, the flights often are no longer sorted by distance. When I just opened the page for the very first time today to get the YAML for this post, I noticed that the first time, all of the flights had distance values. But then when it refreshed, a couple had the "NaN". It makes me wonder if there might be a problem with variable reinitialization or something like that.
from fr24_card.
Sure, I can manually download and install to test. Should I use the develop branch or that specific bugfix branch?
from fr24_card.
That testing was from my primary home zone which was the first one.
from fr24_card.
@BrettEBowman Can you supply me with the JSON for when you have that result?
from fr24_card.
Here's a .json file as well as what the fr24 card displays. (Both from approximately the same time, so they should roughly match up.)
from fr24_card.
Thanks, @BrettEBowman. I've tested it with this JSON, and I don't see the NaN
. This might be because of the client. What browser or app are you using when you get the NaN
?
Can you also give me YAML of the card confirguration?
from fr24_card.
Thanks, that is useful info. I'm looking into it. It might have something to do with the coordinates of the zone. When I used your card config I had no issue. When I added an extra zone with your coordinates I did get a NaN
.
from fr24_card.
FYI I have another HA server at my other house. And I've seen the NaNs there, too. It's zone info is: latitude: 35.62409358633958, longitude: -82.62928962707521.
from fr24_card.
As mentioned I found the NaN
in my test environment when I used your configuration and the first zone you gave. With the second zone I didn't have it. But that might be because of the content of aircraft.json
. Same as I didn't get it with my local data.
I used a different method to calculate the distance. This time based on the documentation of Google. With his method I don't see the NaN
with your data and configuration.
Are you able to test this branch before I merge it into the code?
I didn't see an option to use anything other than master
or a version in HACS. So if you want to test it you may have to download it. See the instructions on https://github.com/fratsloos/fr24_card/blob/master/readme/installation.md.
Just saw a typo on that page, will fix that with the next release :)
from fr24_card.
You should use the bugfix branch connected to this issue.
from fr24_card.
It's possible that I didn't manually install properly... I copied the files from the dist folder onto my HA server in the folder where the fr24 files were. There weren't .gz versions in the downloaded dist folder, so I created those. I restarted the HA supervisor, opened my Flights dashboard, and did a forced Ctrl-F5 refresh.
At first, it seemed better, but then I started getting the NaNs again. I captured a couple of aircraft.json files and corresponding displays.
from fr24_card.
I think I figured out what I did wrong in the installation. I didn't change the Resource mapping, so it still had references to the HACS package. When I redid it, then the page started working OK. And I'm not seeing the NaNs. So, I think the change fixed the problem.
from fr24_card.
Thanks for testing. The compressed files (.gz
) are created by HACS. I'll check the new JSON files in the coming days. Just to be sure, were you testing from the first or second zone?
from fr24_card.
I think I figured out what I did wrong in the installation. I didn't change the Resource mapping, so it still had references to the HACS package. When I redid it, then the page started working OK. And I'm not seeing the NaNs. So, I think the change fixed the problem.
Great! :) Just to be sure I'll test with the new JSON files as well before I release the fix.
Don't forget to switch back to the HACS implementation after testing.
from fr24_card.
The fix is published in the latest release: v0.5.1.
from fr24_card.
Related Issues (20)
- Add elevation angle above the horizon to columns HOT 3
- [Feature Request] Optional Title HOT 3
- Configurable table head colors (both background and text) HOT 4
- [Feature Request] Dont include nulls option HOT 1
- Filter (e.g., distance < X, altitude < Y) HOT 3
- Origin/Destination airport codes HOT 16
- Adding a column for Aircraft Type? HOT 8
- e is undefined HOT 17
- Allow to filter by squawk HOT 1
- Pop up no longer works with updated browser-mod HOT 16
- Icon color based on altitude HOT 5
- Ground Vehicles switch HOT 6
- v1.0.0-alpha Built-in Pop-up missing Close button HOT 5
- Disable link to provider when required data is not available
- Width of popup exeeds window size on Android app HOT 1
- Split documentation in multiple files
- Make photo optional
- Config of popup should be an object HOT 4
- Minor 'bug' in English text HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fr24_card.