268 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
2
votes
3
answers
209
views
Issue trying to aggregate wind directions on a hourly basis, i.e. computing vector averages of wind data
I need to calculate hourly averages of wind directions using proper vector averages. Arithmetic averages result in the issue where averaging 350° and 10° gives 180° instead of 0°.
The following is the ...
-4
votes
1
answer
113
views
Pygame image not facing the mouse [duplicate]
Here is my rotating code:
pos = pygame.mouse.get_pos()
x_dist = pos[0] - self.rect.centerx
y_dist = -(pos[1] - self.rect.centery)
self.angle = math.degrees(math.atan2(y_dist, x_dist))
self.image = ...
0
votes
0
answers
530
views
How to get correct angle of trendline in excel?
I am using excel SLOPE and ANGLE function to calculate the angle of trendline given the data points. But it always shows very high angle (~88 degrees). And if I change my x axis coordinates to same as ...
1
vote
0
answers
469
views
C++ conversion from decimal degrees to DMS
I have the following code to convert decimal degrees to/from degrees,minutes,seconds.
#include <cmath>
#include <iostream>
void toDMS(double decimalDegrees, int& degrees, unsigned int&...
33
votes
2
answers
4k
views
Why do trigonometric functions give a seemingly incorrect result? [duplicate]
When attempting to use a trigonometric function in my programming language, I get a seemingly wildly incorrect result.
For example,
sin(90) = 0.8939966636005579
But I would expect sin(90) to be 1. ...
0
votes
1
answer
956
views
How to display " °C " in OLED Display for STM32 IDE?
I am unable to display the symbol for degree celsius in my display, is there anyway to do it other than drawing a circle manually?
I tried giving the "char ASCII code" for some symbols to ...
0
votes
0
answers
350
views
Do we have an equivalent of rad2deg() in C++?
Do we have an equivalent of rad2deg() in C++ ?
rad2deg() is available in php, perl, Matlab, numpy-python, etc.
It converts radians to degrees. This is the relationship:
π radian = 180°
0
votes
1
answer
2k
views
trying to print degree symbol after integer
I am trying to do the find-angle challenge in hacker rank, I got the value of the angle as an integer but hacker rank requires me to give the output with " ° " symbol at the end, how do I ...
-1
votes
2
answers
399
views
Algorithm to rotate a float value between 0 and 360 degrees by +180 degrees
I want to take a floating point number (which will be between 0.0 and 360.0) and rotate that value by + 180 degrees.
So 0.0 would become 180.0
90.0 would become 270.0
180.0 would become 0.0
270 would ...
1
vote
2
answers
112
views
Google Sheets is changing my data - deg:arcmin:arcsec format
As an astronomer, I've been using Google Sheets to keep track of observation planning. Common practice in astronomy is for degree-based measurements to be written DD:MM:SS, where DD is degrees (0:180, ...
0
votes
1
answer
67
views
Difference in 3 Angles
Hoping you all can help with my math mind block I am having.
I have 3 blade pitch angles: (degrees)
B1 = 2.264, B2 = 2.250, B3 = 2.258
I am trying to find the difference between all three. As in ...
3
votes
1
answer
341
views
Is Scratch's (sin of (n)) function incorrect, or am I doing something wrong?
I found a double pendulum ODEs simulation on Desmos, credit to @AlexRLJones, and I am trying to recreate it entirely in Scratch.
While writing the code, I noticed that when I put sin(θ1) with θ1=50 on ...
0
votes
1
answer
79
views
Why are the degrees not showing up in my plot?
I'm making a ggplot of a basemap with some points overlaid. I believe the default for plotting a basemap is to have the axes plot in latlong with degrees N/W (even though its projected in web mercator)...
0
votes
1
answer
48
views
Pygame walk towards rotation
i'm trying to make a circle go towards the way its looking, when i put 0 it goes towards 0 but when i put 90 for some reason it goes towards like 200 or something
import pygame
import math
import ...
0
votes
1
answer
120
views
Degrees in I graph
I am a Newbie in I-graph. I wish to know.
How to isolate nodes with a specific degree value?
How to know their node IDs
Can we draw a new graph with degrees above the given thresholds. Say nodes ...