Skip to content

Should calculate_vp use use the geo attributes #749

Description

@bart1

I noticed this issue causing incorrect vp altitudes. That is meanwhile fixed. However I wondered if calculate_vp should fall back to x$geo$height if x$attributes$where$height is not available. Below you see how the antenna is assumed to be at the ground when no height is present in the attributes. I would see to possible improvements:

  • Warn when the height is absent
  • Warn when the assumption of height 0 is made
  • Use the height from geo when possible
require(getRad)
#> Loading required package: getRad
a<-getRad::get_pvol("fikau", Sys.time()-10000)
a$attributes$where$height
#> [1] 463
a$geo$height
#> [1] 463
plot(bioRad::calculate_vp(a), main="original")
#> Running vol2birdSetUp
#> Warning: radial velocities will be dealiased...

b<-a; b$geo$height<-NULL
plot(bioRad::calculate_vp(b), main="no geo height")
#> Running vol2birdSetUp
#> Warning: radial velocities will be dealiased...

b<-a; b$attributes$where$height<-NULL
plot(bioRad::calculate_vp(b), main="no attribute height")
#> Running vol2birdSetUp
#> Warning: radial velocities will be dealiased...

Created on 2025-10-13 with reprex v2.1.1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions